Making WordPress.org

Changeset 5325


Ignore:
Timestamp:
04/12/2017 10:31:34 PM (8 years ago)
Author:
tellyworth
Message:

Plugin directory: include a SVN link in the Interested In Development section. Props @SergeyBiryukov

See #2664

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/shortcodes/class-developers.php

    r5257 r5325  
    5656
    5757
    58         $output   .= '<h3>' . __( 'Interested in development?', 'wporg-plugins' ) . '</h3>';
    59         /* Translators: 1: Trac URL; 2: Development log URL; 3: RSS URL; */
    60         $format    = __( '<a href="%1$s">Browse the code</a> or subscribe to the <a href="%2$s">development log</a> by <a href="%3$s">RSS</a>.' );
    61         $email_url = '';
     58        $output .= '<h3>' . __( 'Interested in development?', 'wporg-plugins' ) . '</h3>';
    6259
    6360        if ( is_user_logged_in() ) {
    64             /* Translators: 1: Trac URL; 2: Development log URL; 3: RSS URL; 4: Email subscription URL; */
    65             $format     = __( '<a href="%1$s">Browse the code</a> or subscribe to the <a href="%2$s">development log</a> by <a href="%4$s">email</a> or <a href="%3$s">RSS</a>.' );
    6661            $subscribed = Tools::subscribed_to_plugin_commits( $post, get_current_user_id() );
    6762            $email_url  = esc_url( add_query_arg( array(
     
    6964                ( $subscribed ? 'unsubscribe' : 'subscribe' ) => '1',
    7065            ), home_url( "wp-json/plugins/v1/plugin/{$slug}/commit-subscription" ) ) );
     66
     67            $output .= '<p>' . sprintf(
     68                /* Translators: 1: Trac URL; 2: SVN repository URL, 3: Development log URL; 4: RSS URL; 5: Email subscription URL; */
     69                __( '<a href="%1$s">Browse the code</a>, check out the <a href="%2$s">SVN repository</a>, or subscribe to the <a href="%3$s">development log</a> by <a href="%4$s">email</a> or <a href="%5$s">RSS</a>.', 'wporg-plugins' ),
     70                esc_url( "https://plugins.trac.wordpress.org/browser/{$slug}/" ),
     71                esc_url( "https://plugins.svn.wordpress.org/{$slug}/" ),
     72                esc_url( "https://plugins.trac.wordpress.org/log/{$slug}/" ),
     73                esc_url( "https://plugins.trac.wordpress.org/log/{$slug}/?limit=100&mode=stop_on_copy&format=rss" ),
     74                $email_url
     75            ) . '</p>';
     76        } else {
     77            $output .= '<p>' . sprintf(
     78                /* Translators: 1: Trac URL; 2: Development log URL; 3: RSS URL; */
     79                __( '<a href="%1$s">Browse the code</a> or subscribe to the <a href="%2$s">development log</a> by <a href="%3$s">RSS</a>.', 'wporg-plugins' ),
     80                esc_url( "https://plugins.trac.wordpress.org/browser/{$slug}/" ),
     81                esc_url( "https://plugins.trac.wordpress.org/log/{$slug}/" ),
     82                esc_url( "https://plugins.trac.wordpress.org/log/{$slug}/?limit=100&mode=stop_on_copy&format=rss" )
     83            ) . '</p>';
    7184        }
    72 
    73         $output .= '<p>' . sprintf(
    74             $format,
    75             esc_url( "https://plugins.trac.wordpress.org/browser/{$slug}/" ),
    76             esc_url( "https://plugins.trac.wordpress.org/log/{$slug}/" ),
    77             esc_url( "https://plugins.trac.wordpress.org/log/{$slug}/?limit=100&mode=stop_on_copy&format=rss" ),
    78             $email_url
    79         ) . '</p>';
    8085
    8186        return $output;
Note: See TracChangeset for help on using the changeset viewer.