Making WordPress.org


Ignore:
Timestamp:
12/18/2017 05:42:35 PM (6 years ago)
Author:
obenland
Message:

Plugins: Conform to WPCS.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/front-page.php

    r5114 r6284  
    1111
    1212$sections = array(
    13     'featured' => __( 'Featured Plugins', 'wporg-plugins' ),
    14     'popular'  => __( 'Popular Plugins', 'wporg-plugins' ),
    15     'beta'     => __( 'Beta Plugins', 'wporg-plugins' ),
    16     'favorites' => __( 'My Favorites', 'wporg-plugins' ), 
     13    'featured'  => __( 'Featured Plugins', 'wporg-plugins' ),
     14    'popular'   => __( 'Popular Plugins', 'wporg-plugins' ),
     15    'beta'      => __( 'Beta Plugins', 'wporg-plugins' ),
     16    'favorites' => __( 'My Favorites', 'wporg-plugins' ),
    1717);
    1818
     
    2727    <main id="main" class="site-main" role="main">
    2828
    29         <?php foreach ( $sections as $browse => $section_title ) :
     29        <?php
     30        foreach ( $sections as $browse => $section_title ) :
    3031            // Only logged in users can have favorites.
    3132            if ( 'favorites' === $browse && ! is_user_logged_in() ) {
     
    5657                <header class="section-header">
    5758                    <h2 class="section-title"><?php echo esc_html( $section_title ); ?></h2>
    58                     <a class="section-link" href="<?php echo esc_url( home_url( "browse/$browse/" ) ); ?>"><?php
    59                         /* translators: %s: Section title as an accessibility text for screen readers. */
    60                         printf( _x( 'See all %s', 'plugins', 'wporg-plugins' ), "<span class=\"screen-reader-text\">{$section_title}</span>" );
    61                     ?></a>
     59                    <a class="section-link" href="<?php echo esc_url( home_url( "browse/$browse/" ) ); ?>">
     60                        <?php
     61                        printf(
     62                            /* translators: %s: Section title as an accessibility text for screen readers. */
     63                            esc_html_x( 'See all %s', 'plugins', 'wporg-plugins' ),
     64                            '<span class="screen-reader-text">' . esc_html( $section_title ) . '</span>'
     65                        );
     66                        ?>
     67                    </a>
    6268                </header>
    6369
     
    7985        the_widget( 'WP_Widget_Text', array(
    8086            'title' => __( 'Add Your Plugin', 'wporg-plugins' ),
    81             'text'  => sprintf( __( 'The WordPress Plugin Directory is the largest directory of free and open source WordPress plugins. Find out how to <a href="%s">host your plugin</a> on WordPress.org.', 'wporg-plugins' ), esc_url( home_url( 'developers' ) ) ),
     87            'text'  => sprintf(
     88                /* translators: URL to Developers page. */
     89                __( 'The WordPress Plugin Directory is the largest directory of free and open source WordPress plugins. Find out how to <a href="%s">host your plugin</a> on WordPress.org.', 'wporg-plugins' ),
     90                esc_url( home_url( 'developers' ) )
     91            ),
    8292        ), $widget_args );
    8393
    8494        the_widget( 'WP_Widget_Text', array(
    8595            'title' => __( 'Create a Plugin', 'wporg-plugins' ),
    86             'text'  => sprintf( __( 'Building a plugin has never been easier. Read through the <a href="%s">Plugin Developer Handbook</a> to learn all about WordPress plugin development.', 'wporg-plugins' ), esc_url( 'https://developer.wordpress.org/plugins/' ) ),
     96            'text'  => sprintf(
     97                /* translators: URL to Developer Handbook. */
     98                __( 'Building a plugin has never been easier. Read through the <a href="%s">Plugin Developer Handbook</a> to learn all about WordPress plugin development.', 'wporg-plugins' ),
     99                esc_url( 'https://developer.wordpress.org/plugins/' )
     100            ),
    87101        ), $widget_args );
    88102
    89103        the_widget( 'WP_Widget_Text', array(
    90104            'title' => __( 'Stay Up-to-Date', 'wporg-plugins' ),
    91             'text'  => sprintf( __( 'Plugin development is constantly changing with each new WordPress release. Keep up with the latest changes by following the <a href="%s">Plugin Review Team&#8217;s blog</a>.', 'wporg-plugins' ), esc_url( 'https://make.wordpress.org/plugins/' ) ),
     105            'text'  => sprintf(
     106                /* translators: URL to make/plugins site. */
     107                __( 'Plugin development is constantly changing with each new WordPress release. Keep up with the latest changes by following the <a href="%s">Plugin Review Team&#8217;s blog</a>.', 'wporg-plugins' ),
     108                esc_url( 'https://make.wordpress.org/plugins/' )
     109            ),
    92110        ), $widget_args );
    93111        ?>
    94112    </aside><!-- #secondary -->
    95     <?php
     113
     114<?php
    96115get_footer();
Note: See TracChangeset for help on using the changeset viewer.