Making WordPress.org

Changeset 6284


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

Plugins: Conform to WPCS.

Location:
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins
Files:
1 added
23 edited

Legend:

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

    r5352 r6284  
    2020
    2121            <div class="page-content">
    22                 <p><?php printf( __( 'Try searching from the field above, or go to the <a href="%s">home page</a>.', 'wporg-plugins' ), get_home_url() ); ?></p>
     22                <p>
     23                    <?php
     24                    /* translators: URL to home page. */
     25                    printf( wp_kses_post( __( 'Try searching from the field above, or go to the <a href="%s">home page</a>.', 'wporg-plugins' ) ), esc_url( get_home_url() ) );
     26                    ?>
     27                </p>
    2328
    2429                <div class="logo-swing">
    25                     <img src="<?php echo get_theme_file_uri( '/images/wp-logo-blue-trans-blur.png' ); ?>" class="wp-logo" />
    26                     <img src="<?php echo get_theme_file_uri( '/images/wp-logo-blue.png' ); ?>" class="wp-logo" />
     30                    <img src="<?php echo esc_url( get_theme_file_uri( '/images/wp-logo-blue-trans-blur.png' ) ); ?>" class="wp-logo" />
     31                    <img src="<?php echo esc_url( get_theme_file_uri( '/images/wp-logo-blue.png' ) ); ?>" class="wp-logo" />
    2732                </div>
    2833            </div><!-- .page-content -->
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/archive.php

    r4223 r6284  
    1515        <main id="main" class="site-main" role="main">
    1616
    17         <?php
    18         if ( have_posts() ) : ?>
     17        <?php if ( have_posts() ) : ?>
    1918
    2019            <header class="page-header">
    2120                <?php
    22                     the_archive_title( '<h1 class="page-title">', '</h1>' );
    23                     the_archive_description( '<div class="taxonomy-description">', '</div>' );
     21                the_archive_title( '<h1 class="page-title">', '</h1>' );
     22                the_archive_description( '<div class="taxonomy-description">', '</div>' );
    2423                ?>
    2524            </header><!-- .page-header -->
     
    4544            get_template_part( 'template-parts/content', 'none' );
    4645
    47         endif; ?>
     46        endif;
     47        ?>
    4848
    4949        </main><!-- #main -->
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/footer.php

    r3193 r6284  
    1111
    1212namespace WordPressdotorg\Plugin_Directory\Theme;
     13
    1314?>
    1415
  • 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();
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/functions.php

    r6249 r6284  
    99
    1010namespace WordPressdotorg\Plugin_Directory\Theme;
     11
    1112use WordPressdotorg\Plugin_Directory\Plugin_Directory;
    1213use WordPressdotorg\Plugin_Directory\Template;
     
    2425    add_theme_support( 'automatic-feed-links' );
    2526
    26     // Don't include Adjacent Posts functionality
     27    // Don't include Adjacent Posts functionality.
    2728    remove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head' );
    2829
     
    6061function scripts() {
    6162    $suffix = is_rtl() ? '-rtl' : '';
    62     wp_enqueue_style( 'wporg-plugins-style', get_template_directory_uri() . "/css/style{$suffix}.css", ['open-sans'], '20171206a' );
     63    wp_enqueue_style( 'wporg-plugins-style', get_template_directory_uri() . "/css/style{$suffix}.css", [ 'open-sans', 'dashicons' ], '20171206a' );
    6364
    6465    wp_enqueue_script( 'wporg-plugins-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20151215', true );
     
    9899    }
    99100
    100     // React is currently only used on detail pages
     101    // React is currently only used on detail pages.
    101102    if ( is_single() ) {
    102103        wp_enqueue_script( 'wporg-plugins-client', get_template_directory_uri() . '/js/theme.js', array(), '20170501', true );
     
    111112                'Plural-Forms' => _x( 'nplurals=2; plural=n != 1;', 'plural forms', 'wporg-plugins' ),
    112113                'Language'     => _x( 'en', 'language (fr, fr_CA)', 'wporg-plugins' ),
    113                 'localeSlug'   => _x( 'en', 'locale slug', 'wporg-plugins' ) ,
     114                'localeSlug'   => _x( 'en', 'locale slug', 'wporg-plugins' ),
    114115            ),
    115116        ) );
     
    148149
    149150    // Remove version argument.
    150     if ( in_array( $handle, ['open-sans'], true ) ) {
     151    if ( in_array( $handle, [ 'open-sans' ], true ) ) {
    151152        $src = remove_query_arg( 'ver', $src );
    152153    }
     
    154155    return $src;
    155156}
    156 add_filter( 'style_loader_src',  __NAMESPACE__ . '\loader_src', 10, 2 );
     157add_filter( 'style_loader_src', __NAMESPACE__ . '\loader_src', 10, 2 );
    157158add_filter( 'script_loader_src', __NAMESPACE__ . '\loader_src', 10, 2 );
    158159
     
    171172 */
    172173function customize_register( $wp_customize ) {
    173     $wp_customize->get_setting( 'blogname' )->transport         = 'postMessage';
    174     $wp_customize->get_setting( 'blogdescription' )->transport  = 'postMessage';
     174    $wp_customize->get_setting( 'blogname' )->transport        = 'postMessage';
     175    $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';
    175176}
    176177add_action( 'customize_register', __NAMESPACE__ . '\customize_register' );
     
    182183    wp_enqueue_script( 'wporg_plugins_customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), '20151215', true );
    183184}
    184 add_action( 'customize_preview_init',  __NAMESPACE__ . '\customize_preview_js' );
    185 
    186 
     185add_action( 'customize_preview_init', __NAMESPACE__ . '\customize_preview_js' );
     186
     187/**
     188 * Filters the list of CSS body classes for the current post or page.
     189 *
     190 * @param array $classes An array of body classes.
     191 * @return array
     192 */
    187193function custom_body_class( $classes ) {
    188194    $classes[] = 'no-js';
     
    206212function document_title( $title ) {
    207213    if ( is_front_page() ) {
    208         $title['title'] = __( 'WordPress Plugins', 'wporg-plugins' );
     214        $title['title']   = __( 'WordPress Plugins', 'wporg-plugins' );
    209215        $title['tagline'] = __( 'Plugins extend and expand the functionality of WordPress.', 'wporg-plugins' );
    210216    } else {
     
    260266    }
    261267
    262     $banner  = Template::get_plugin_banner();
     268    $icon   = Template::get_plugin_icon();
     269    $banner = Template::get_plugin_banner();
     270
    263271    $banner['banner_2x'] = $banner['banner_2x'] ? $banner['banner'] : false;
    264     $icon = Template::get_plugin_icon();
    265272
    266273    printf( '<meta property="og:title" content="%s" />' . "\n", the_title_attribute( array( 'echo' => false ) ) );
     
    295302add_action( 'wp_head', function() {
    296303    add_filter( 'post_type_archive_title', __NAMESPACE__ . '\strong_archive_title' );
    297     add_filter( 'single_term_title',       __NAMESPACE__ . '\strong_archive_title' );
    298     add_filter( 'single_cat_title',        __NAMESPACE__ . '\strong_archive_title' );
    299     add_filter( 'single_tag_title',        __NAMESPACE__ . '\strong_archive_title' );
    300     add_filter( 'get_the_date',            __NAMESPACE__ . '\strong_archive_title' );
     304    add_filter( 'single_term_title', __NAMESPACE__ . '\strong_archive_title' );
     305    add_filter( 'single_cat_title', __NAMESPACE__ . '\strong_archive_title' );
     306    add_filter( 'single_tag_title', __NAMESPACE__ . '\strong_archive_title' );
     307    add_filter( 'get_the_date', __NAMESPACE__ . '\strong_archive_title' );
    301308} );
    302309
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/header.php

    r5174 r6284  
    2828            <div class="site-branding">
    2929                <?php if ( is_home() ) : ?>
    30                     <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php _ex( 'Plugins','Site title', 'wporg-plugins' ); ?></a></h1>
     30                    <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php echo esc_html_x( 'Plugins', 'Site title', 'wporg-plugins' ); ?></a></h1>
    3131
    3232                    <p class="site-description">
     
    3535                        printf(
    3636                            /* Translators: Total number of plugins. */
    37                             _n( 'Extend your WordPress experience with %s plugin.', 'Extend your WordPress experience with %s plugins.', $plugin_count, 'wporg-plugins' ),
    38                             number_format_i18n( $plugin_count )
     37                            esc_html( _n( 'Extend your WordPress experience with %s plugin.', 'Extend your WordPress experience with %s plugins.', $plugin_count, 'wporg-plugins' ) ),
     38                            esc_html( number_format_i18n( $plugin_count ) )
    3939                        );
    4040                        ?>
     
    4242                    <?php get_search_form(); ?>
    4343                <?php else : ?>
    44                     <p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php _ex( 'Plugins','Site title', 'wporg-plugins' ); ?></a></p>
     44                    <p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php echo esc_html_x( 'Plugins', 'Site title', 'wporg-plugins' ); ?></a></p>
    4545
    4646                    <nav id="site-navigation" class="main-navigation" role="navigation">
     
    5050                                <?php
    5151                                foreach ( $menu_items as $path => $text ) :
    52                                     $class = false !== strpos( $_SERVER['REQUEST_URI'], $path ) ? 'class="active" ' : '';
     52                                    $class = false !== strpos( $_SERVER['REQUEST_URI'], $path ) ? 'active' : ''; // phpcs:ignore
    5353                                ?>
    54                                 <li class="page_item"><a <?php echo $class; ?>href="<?php echo esc_url( home_url( $path ) ); ?>"><?php echo esc_html( $text ); ?></a></li>
     54                                <li class="page_item"><a class="<?php echo esc_attr( $class ); ?>" href="<?php echo esc_url( home_url( $path ) ); ?>"><?php echo esc_html( $text ); ?></a></li>
    5555                                <?php endforeach; ?>
    5656                                <li><?php get_search_form(); ?></li>
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/inc/template-tags.php

    r6251 r6284  
    99
    1010namespace WordPressdotorg\Plugin_Directory\Theme;
     11
    1112use WordPressdotorg\Plugin_Directory\Template;
    1213use WordPressdotorg\Plugin_Directory\Tools;
    1314
    14 // Returns an absolute url to the current url, no matter what that actually is.
    15 function wporg_plugins_self_link() {
    16     $site_path = preg_replace( '!^' . preg_quote( parse_url( home_url(), PHP_URL_PATH ), '!' ) . '!', '', $_SERVER['REQUEST_URI'] );
    17     return home_url( $site_path );
    18 }
    19 
    20 function wporg_plugins_template_last_updated() {
    21     return '<span title="' . get_the_time('Y-m-d') . '">' . sprintf( _x( '%s ago', 'wporg-plugins' ), human_time_diff( get_the_time( 'U' ), current_time( 'timestamp' ) ) ) . '</span>';
    22 }
    23 
    24 function wporg_plugins_template_compatible_up_to() {
    25     $tested = get_post_meta( get_the_id(), 'tested', true ) ;
    26     if ( ! $tested ) {
    27         $tested = _x( 'unknown', 'unknown version', 'wporg-plugins' );
    28     }
    29     return esc_html( $tested );
    30 }
    31 
    32 function wporg_plugins_template_requires() {
    33     return esc_html( get_post_meta( get_the_id(), 'requires', true ) );
    34 }
    35 
    36 function wporg_plugins_the_version() {
    37     return esc_html( get_post_meta( get_the_id(), 'version', true ) );
    38 }
    39 
    40 function wporg_plugins_download_link() {
    41     return esc_url( Template::download_link( get_the_id() ) );
    42 }
    43 
     15/**
     16 * Returns a list of authors.
     17 *
     18 * @return string
     19 */
    4420function wporg_plugins_template_authors() {
    4521    $contributors = get_post_meta( get_the_id(), 'contributors', true );
     
    5834
    5935    $author_links = array();
    60     $and_more = false;
     36    $and_more     = false;
    6137    foreach ( $authors as $user ) {
    6238        $author_links[] = sprintf( '<a href="%s">%s</a>', 'https://profiles.wordpress.org/' . $user->user_nicename . '/', $user->display_name );
     
    6844
    6945    if ( $and_more ) {
    70         return sprintf( '<cite> By: %s, and others.</cite>', implode(', ', $author_links ) );
     46        return sprintf( '<cite> By: %s, and others.</cite>', implode( ', ', $author_links ) );
    7147    } else {
    72         return sprintf( '<cite> By: %s</cite>', implode(', ', $author_links ) );
    73     }
    74 }
    75 
     48        return sprintf( '<cite> By: %s</cite>', implode( ', ', $author_links ) );
     49    }
     50}
    7651
    7752/**
     
    8156 */
    8257function the_plugin_banner( $post = null ) {
    83     echo Template::get_plugin_banner( $post, 'html' );
     58    echo Template::get_plugin_banner( $post, 'html' ); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped
    8459}
    8560
     
    9570
    9671    $is_favorited = Tools::favorited_plugin( get_post( $post ) );
    97 ?>
    98 <div class="plugin-favorite">
    99     <a href="<?php echo esc_url( Template::get_favorite_link() ); ?>" class="plugin-favorite-heart<?php echo $is_favorited ? ' favorited' : ''; ?>">
     72    ?>
     73    <div class="plugin-favorite">
     74        <a href="<?php echo esc_url( Template::get_favorite_link() ); ?>" class="plugin-favorite-heart<?php echo $is_favorited ? ' favorited' : ''; ?>">
    10075        <span class="screen-reader-text">
    10176            <?php
    10277            if ( $is_favorited ) {
    10378                /* translators: %s: plugin name */
    104                 printf( __( 'Unfavorite %s', 'wporg-plugins' ), get_the_title() );
     79                printf( esc_html__( 'Unfavorite %s', 'wporg-plugins' ), get_the_title() );
    10580            } else {
    10681                /* translators: %s: plugin name */
    107                 printf( __( 'Favorite %s', 'wporg-plugins' ), get_the_title() );
     82                printf( esc_html__( 'Favorite %s', 'wporg-plugins' ), get_the_title() );
    10883            }
    10984            ?>
    11085        </span>
    111     </a>
    112     <script>
    113         jQuery( '.plugin-favorite-heart' )
    114             .on( 'click touchstart animationend', function() {
    115                 jQuery( this ).toggleClass( 'is-animating' );
    116             } )
    117             .on( 'click', function() {
    118                 jQuery( this ).toggleClass( 'favorited' );
    119             } );
    120     </script>
    121 </div>
    122 <?php
     86        </a>
     87        <script>
     88            jQuery( '.plugin-favorite-heart' )
     89                .on( 'click touchstart animationend', function () {
     90                    jQuery( this ).toggleClass( 'is-animating' );
     91                } )
     92                .on( 'click', function () {
     93                    jQuery( this ).toggleClass( 'favorited' );
     94                } );
     95        </script>
     96    </div>
     97    <?php
    12398}
    12499
     
    133108    $url    = get_post_meta( $post->ID, 'header_author_uri', true );
    134109    $author = strip_tags( get_post_meta( $post->ID, 'header_author', true ) ) ?: get_the_author();
    135     $author = esc_html( Template::encode( $author ) );
    136110    $author = $url ? '<a class="url fn n" rel="nofollow" href="' . esc_url( $url ) . '">' . $author . '</a>' : $author;
    137111
    138     printf( _x( 'By %s', 'post author', 'wporg-plugins' ), '<span class="author vcard">' . $author . '</span>' );
     112    /* translators: post author. */
     113    printf( esc_html_x( 'By %s', 'post author', 'wporg-plugins' ), '<span class="author vcard">' . wp_kses_post( $author ) . '</span>' );
    139114}
    140115
     
    145120 */
    146121function the_active_plugin_notice( $post = null ) {
    147     if ( ! in_array( get_post_status( $post ), ['rejected', 'closed'], true ) ) {
    148         echo get_plugin_status_notice( $post );
     122    if ( ! in_array( get_post_status( $post ), [ 'rejected', 'closed' ], true ) ) {
     123        echo wp_kses_post( get_plugin_status_notice( $post ) );
    149124    };
    150125}
     
    156131 */
    157132function the_closed_plugin_notice( $post = null ) {
    158     echo get_closed_plugin_notice( $post );
     133    echo wp_kses_post( get_closed_plugin_notice( $post ) );
    159134}
    160135
     
    169144    $notice = '';
    170145
    171     if ( in_array( get_post_status( $post ), ['rejected', 'closed'], true ) ) {
     146    if ( in_array( get_post_status( $post ), [ 'rejected', 'closed' ], true ) ) {
    172147        $notice = get_plugin_status_notice( $post );
    173148
    174         if ( get_current_user_id() == $post->post_author ) {
     149        if ( get_current_user_id() === (int) $post->post_author ) {
    175150            $info_notice = '<div class="plugin-notice notice notice-info notice-alt"><p>%s</p></div><!-- .plugin-notice -->';
    176151            $message     = sprintf(
    177             /* translators: 1: plugins@wordpress.org */
     152                /* translators: 1: plugins@wordpress.org */
    178153                __( 'If you did not request this change, please contact <a href="mailto:%1$s">%1$s</a> for a status. All developers with commit access are contacted when a plugin is closed, with the reasons why, so check your spam email too.', 'wporgplugins' ),
    179154                'plugins@wordpress.org'
     
    244219            $closed_date = get_post_meta( get_the_ID(), 'plugin_closed_date', true );
    245220            if ( ! empty( $closed_date ) ) {
     221                /* translators: Closing date. */
    246222                $message = sprintf( __( 'This plugin was closed on %s and is no longer available for download.', 'wporg-plugins' ), mysql2date( get_option( 'date_format' ), $closed_date ) );
    247223            } else {
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/index.php

    r3193 r6284  
    1515namespace WordPressdotorg\Plugin_Directory\Theme;
    1616
    17 get_header(); ?>
     17get_header();
     18?>
    1819
    1920    <main id="main" class="site-main" role="main">
    2021
    2122    <?php
    22         if ( have_posts() ) :
    23             if ( is_home() && ! is_front_page() ) :
    24     ?>
     23    if ( have_posts() ) :
     24        if ( is_home() && ! is_front_page() ) :
     25        ?>
    2526        <header>
    2627            <h1 class="page-title screen-reader-text"><?php single_post_title(); ?></h1>
    2728        </header>
     29        <?php
     30        endif;
    2831
    29     <?php
    30             endif;
     32        /* Start the Loop */
     33        while ( have_posts() ) :
     34            the_post();
    3135
    32             /* Start the Loop */
    33             while ( have_posts() ) :
    34                 the_post();
     36            get_template_part( 'template-parts/plugin', 'index' );
     37        endwhile;
    3538
    36                 get_template_part( 'template-parts/plugin', 'index' );
    37             endwhile;
    38 
    39             the_posts_pagination();
     39        the_posts_pagination();
    4040
    4141        else :
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/package.json

    r5117 r6284  
    4141    "lodash": "^4.13.1",
    4242    "pixrem": "^3.0.2",
     43    "postcss": "^6.0.14",
    4344    "react": "^15.2.1",
    4445    "react-dom": "^15.2.1",
     
    5051    "redux-router": "^2.1.2",
    5152    "redux-thunk": "^2.1.0",
     53    "rtlcss": "^2.2.1",
    5254    "webpack": "^1.13.1",
    5355    "webpack-dev-server": "^1.14.1"
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/page-add.php

    r4210 r6284  
    1212    <main id="main" class="site-main" role="main">
    1313
    14         <?php while ( have_posts() ) : the_post(); ?>
     14        <?php
     15        while ( have_posts() ) :
     16            the_post();
     17        ?>
    1518
    1619        <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    1720            <header class="entry-header">
    18                 <h1 class="entry-title"><?php _e( 'Add Your Plugin', 'wporg-plugins' ); ?></h1>
     21                <h1 class="entry-title"><?php esc_html_e( 'Add Your Plugin', 'wporg-plugins' ); ?></h1>
    1922            </header><!-- .entry-header -->
    2023
     
    2225                <section>
    2326                    <div class="container">
    24                         <p><?php printf( __( 'Once submitted, your plugin will be manually reviewed for any common errors as well as ensuring it complies with <a href="%s">all the guidelines</a>.', 'wporg-plugins' ), esc_url( 'https://developer.wordpress.org/plugins/wordpress-org/detailed-plugin-guidelines/' ) ); ?></p>
     27                        <p>
     28                            <?php
     29                            printf(
     30                                /* translators: URL to plugin guidelines. */
     31                                wp_kses_post( __( 'Once submitted, your plugin will be manually reviewed for any common errors as well as ensuring it complies with <a href="%s">all the guidelines</a>.', 'wporg-plugins' ) ),
     32                                esc_url( 'https://developer.wordpress.org/plugins/wordpress-org/detailed-plugin-guidelines/' )
     33                            );
     34                            ?>
     35                        </p>
    2536
    2637                        <?php echo do_shortcode( '[wporg-plugin-upload]' ); ?>
    2738
    28                         <p><?php _e( 'Even if you&#8217;ve submitted a dozen plugins, take the time to refresh your memory with the following information:', 'wporg-plugins' ); ?>
     39                        <p><?php esc_html_e( 'Even if you&#8217;ve submitted a dozen plugins, take the time to refresh your memory with the following information:', 'wporg-plugins' ); ?>
    2940                        <ul>
    30                             <li><a href="https://developer.wordpress.org/plugins/wordpress-org/how-to-use-subversion/"><?php _e( 'How to use SVN', 'wporg-plugins' ); ?></a></li>
    31                             <li><a href="https://developer.wordpress.org/plugins/wordpress-org/plugin-assets/"><?php _e( 'Plugin Assets (and how to use them)', 'wporg-plugins' ); ?></a></li>
    32                             <li><a href="https://developer.wordpress.org/plugins/wordpress-org/plugin-developer-faq/"><?php _e( 'Developer FAQ', 'wporg-plugins' ); ?></a></li>
     41                            <li><a href="https://developer.wordpress.org/plugins/wordpress-org/how-to-use-subversion/"><?php esc_html_e( 'How to use SVN', 'wporg-plugins' ); ?></a></li>
     42                            <li><a href="https://developer.wordpress.org/plugins/wordpress-org/plugin-assets/"><?php esc_html_e( 'Plugin Assets (and how to use them)', 'wporg-plugins' ); ?></a></li>
     43                            <li><a href="https://developer.wordpress.org/plugins/wordpress-org/plugin-developer-faq/"><?php esc_html_e( 'Developer FAQ', 'wporg-plugins' ); ?></a></li>
    3344                        </ul>
    3445                    </div>
     
    3748                <section>
    3849                    <div class="container">
    39                         <h2 id="faq"><?php _e( 'FAQ', 'wporg-plugins' ); ?></h2>
     50                        <h2 id="faq"><?php esc_html_e( 'FAQ', 'wporg-plugins' ); ?></h2>
    4051
    41                         <h3><?php _e( 'How long will the review process take?', 'wporg-plugins' ); ?></h3>
    42                         <p><?php printf( __( 'This is in the <a href="%s">Developer FAQ</a>. It takes anywhere between 1 and 10 days. We attempt to review all plugins within 5 business days of submission, but the process takes as long as it takes, depending on the complexity of your plugin.', 'wporg-plugins' ), esc_url( 'https://developer.wordpress.org/plugins/wordpress-org/plugin-developer-faq/' ) ); ?></p>
     52                        <h3><?php esc_html_e( 'How long will the review process take?', 'wporg-plugins' ); ?></h3>
     53                        <p>
     54                            <?php
     55                            printf(
     56                                /* translators: URL to plugin developer FAQ. */
     57                                wp_kses_post( __( 'This is in the <a href="%s">Developer FAQ</a>. It takes anywhere between 1 and 10 days. We attempt to review all plugins within 5 business days of submission, but the process takes as long as it takes, depending on the complexity of your plugin.', 'wporg-plugins' ) ),
     58                                esc_url( 'https://developer.wordpress.org/plugins/wordpress-org/plugin-developer-faq/' )
     59                            );
     60                            ?>
     61                        </p>
    4362
    44                         <h3><?php _e( 'What will my plugin URL be?', 'wporg-plugins' ); ?></h3>
    45                         <p><?php _e( 'Your plugin&#8217;s URL will be populated based on the value of <code>Plugin Name</code> in your main plugin file (the one with the plugin headers). If you set yours as <code>Plugin Name: Boaty McBoatface</code> then your URL will be <code>https://wordpress.org/plugins/boaty-mcboatface</code> and your slug will be <code>boaty-mcboatface</code> for example. If there is an existing plugin with your name, then you will be <code>boaty-mcboatface-2</code> and so on. It behaves exactly like WordPress post names.', 'wporg-plugins' ); ?></p>
    46                         <p><?php _e( 'Once your plugin is approved, it <em>cannot</em> be renamed.', 'wporg-plugins' ); ?></p>
     63                        <h3><?php esc_html_e( 'What will my plugin URL be?', 'wporg-plugins' ); ?></h3>
     64                        <p><?php echo wp_kses_post( __( 'Your plugin&#8217;s URL will be populated based on the value of <code>Plugin Name</code> in your main plugin file (the one with the plugin headers). If you set yours as <code>Plugin Name: Boaty McBoatface</code> then your URL will be <code>https://wordpress.org/plugins/boaty-mcboatface</code> and your slug will be <code>boaty-mcboatface</code> for example. If there is an existing plugin with your name, then you will be <code>boaty-mcboatface-2</code> and so on. It behaves exactly like WordPress post names.', 'wporg-plugins' ) ); ?></p>
     65                        <p><?php echo wp_kses_post( __( 'Once your plugin is approved, it <em>cannot</em> be renamed.', 'wporg-plugins' ) ); ?></p>
    4766
    48                         <h3><?php _e( 'I made a mistake in my plugin name. Should I resubmit?', 'wporg-plugins' ); ?></h3>
    49                         <p><?php _e( 'Please don&#8217;t! Instead email <code>plugins@wordpress.org</code> and we can rename your plugin as long as it&#8217;s not approved. Since we check emails first, the odds are we&#8217;ll catch it. If we don&#8217;t, just email us and explain the mistake. We&#8217;ll explain what do to.', 'wporg-plugins' ); ?></p>
     67                        <h3><?php esc_html_e( 'I made a mistake in my plugin name. Should I resubmit?', 'wporg-plugins' ); ?></h3>
     68                        <p><?php echo wp_kses_post( __( 'Please don&#8217;t! Instead email <code>plugins@wordpress.org</code> and we can rename your plugin as long as it&#8217;s not approved. Since we check emails first, the odds are we&#8217;ll catch it. If we don&#8217;t, just email us and explain the mistake. We&#8217;ll explain what do to.', 'wporg-plugins' ) ); ?></p>
    5069
    51                         <h3><?php _e( 'Why was I told my plugin name was unacceptable?', 'wporg-plugins' ); ?></h3>
    52                         <p><?php printf( __( 'This is explained in detail in our <a href="%s">detailed plugin guidelines</a>, but currently we give you the chance to rename it during the review process if the plugin name violates the guideline. Some terms (like &#8220;plugin&#8221; and &#8220;wordpress&#8221;) will be removed for you, as those should not be used at all. We get it; you&#8217;re a WordPress Plugin.', 'wporg-plugins' ), esc_url( 'https://developer.wordpress.org/plugins/wordpress-org/detailed-plugin-guidelines/' ) ); ?></p>
    53                         <p><?php _e( 'Regarding the names and trademarks of other companies and plugins, don&#8217;t use them at the start of your plugin name. If you&#8217;re not Facebook, you shouldn&#8217;t submit a plugin that uses <code>facebook</code> as the first term in your slug. &#8220;Facebook Like Sharer&#8221; (which would be <code>facebook-like-sharer</code>) is not acceptable, but &#8220;Like Sharer for Facebook&#8221; (which would be <code>like-sharer-for-facebook</code>) would be alright.', 'wporg-plugins' ); ?></p>
     70                        <h3><?php esc_html_e( 'Why was I told my plugin name was unacceptable?', 'wporg-plugins' ); ?></h3>
     71                        <p>
     72                            <?php
     73                            printf(
     74                                /* translators: URL to plugin guidelines. */
     75                                wp_kses_post( __( 'This is explained in detail in our <a href="%s">detailed plugin guidelines</a>, but currently we give you the chance to rename it during the review process if the plugin name violates the guideline. Some terms (like &#8220;plugin&#8221; and &#8220;WordPress&#8221;) will be removed for you, as those should not be used at all. We get it; you&#8217;re a WordPress Plugin.', 'wporg-plugins' ) ),
     76                                esc_url( 'https://developer.wordpress.org/plugins/wordpress-org/detailed-plugin-guidelines/' )
     77                            );
     78                            ?>
     79                        </p>
     80                        <p><?php echo wp_kses_post( __( 'Regarding the names and trademarks of other companies and plugins, don&#8217;t use them at the start of your plugin name. If you&#8217;re not Facebook, you shouldn&#8217;t submit a plugin that uses <code>facebook</code> as the first term in your slug. &#8220;Facebook Like Sharer&#8221; (which would be <code>facebook-like-sharer</code>) is not acceptable, but &#8220;Like Sharer for Facebook&#8221; (which would be <code>like-sharer-for-facebook</code>) would be alright.', 'wporg-plugins' ) ); ?></p>
    5481                    </div>
    5582                </section>
     
    6087                edit_post_link(
    6188                    sprintf(
    62                     /* translators: %s: Name of current post */
     89                        /* translators: %s: Name of current post */
    6390                        esc_html__( 'Edit %s', 'wporg-plugins' ),
    6491                        the_title( '<span class="screen-reader-text">"', '"</span>', false )
     
    7198        </article><!-- #post-## -->
    7299
    73         <?php endwhile; ?>
     100        <?php endwhile; ?>
    74101
    75102    </main><!-- #main -->
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/page-developers.php

    r6231 r6284  
    1212    <main id="main" class="site-main" role="main">
    1313
    14         <?php while ( have_posts() ) : the_post(); ?>
     14        <?php
     15        while ( have_posts() ) :
     16            the_post();
     17        ?>
    1518
    1619        <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    1720            <header class="entry-header">
    18                 <h1 class="entry-title"><?php _e( 'Developer Information', 'wporg-plugins' ); ?></h1>
     21                <h1 class="entry-title"><?php esc_html_e( 'Developer Information', 'wporg-plugins' ); ?></h1>
    1922            </header><!-- .entry-header -->
    2023
    2124            <div class="entry-content">
     25                <p>
     26                    <?php
     27                    /* translators: URL to plugin submission form. */
     28                    printf( wp_kses_post( __( 'You&#8217;ve got a cool new plugin and are hoping to give it some exposure. You&#8217;re in the right place. Just <a href="%s">ask us to host it for you</a>. You&#8217;ll be able to:', 'wporg-plugins' ) ), esc_url( home_url( 'developers/add/' ) ) );
     29                    ?>
     30                </p>
     31                <ul>
     32                    <li><?php esc_html_e( 'Keep track of how many people have downloaded it.', 'wporg-plugins' ); ?></li>
     33                    <li><?php esc_html_e( 'Let people leave comments about your plugin.', 'wporg-plugins' ); ?></li>
     34                    <li><?php esc_html_e( 'Get your plugin rated against all the other cool WordPress plugins.', 'wporg-plugins' ); ?></li>
     35                    <li><?php esc_html_e( 'Give your plugin lots of exposure in this centralized repository.', 'wporg-plugins' ); ?></li>
     36                </ul>
    2237
    23                         <p><?php printf( __( 'You&#8217;ve got a cool new plugin and are hoping to give it some exposure. You&#8217;re in the right place. Just <a href="%s">ask us to host it for you</a>. You&#8217;ll be able to:', 'wporg-plugins' ), esc_url( home_url( 'developers/add/' ) ) ); ?></p>
    24                         <ul>
    25                             <li><?php _e( 'Keep track of how many people have downloaded it.', 'wporg-plugins' ); ?></li>
    26                             <li><?php _e( 'Let people leave comments about your plugin.', 'wporg-plugins' ); ?></li>
    27                             <li><?php _e( 'Get your plugin rated against all the other cool WordPress plugins.', 'wporg-plugins' ); ?></li>
    28                             <li><?php _e( 'Give your plugin lots of exposure in this centralized repository.', 'wporg-plugins' ); ?></li>
    29                         </ul>
     38                <h3><?php esc_html_e( 'There are some restrictions', 'wporg-plugins' ); ?></h3>
     39                <ul>
     40                    <li>
     41                        <?php
     42                        /* translators: URL to licence list. */
     43                        printf( wp_kses_post( __( 'Your plugin must be compatible with the <a href="%s">GNU General Public License v2</a>, or any later version. We strongly recommend using the same license as WordPress — &#8220;GPLv2 or later.&#8221;', 'wporg-plugins' ) ), esc_url( 'https://www.gnu.org/licenses/license-list.html#GPLCompatibleLicenses' ) );
     44                        ?>
     45                    </li>
     46                    <li><?php esc_html_e( 'The plugin must not do anything illegal or be morally offensive (that&#8217;s subjective, we know).', 'wporg-plugins' ); ?></li>
     47                    <li>
     48                        <?php
     49                        /* translators: URL to Subversion. */
     50                        printf( wp_kses_post( __( 'You have to actually use the <a href="%s">Subversion</a> repository we give you in order for your plugin to show up on this site. The WordPress Plugin Directory is a hosting site, not a listing site.', 'wporg-plugins' ) ), esc_url( 'https://subversion.apache.org/' ) );
     51                        ?>
     52                    </li>
     53                    <li><?php esc_html_e( 'The plugin must not embed external links on the public site (like a &#8220;powered by&#8221; link) without explicitly asking the user&#8217;s permission.', 'wporg-plugins' ); ?></li>
     54                    <li>
     55                        <?php
     56                        /* translators: URL to plugin guidelines. */
     57                        printf( wp_kses_post( __( 'Your plugin must abide by our list of <a href="%s">detailed guidelines</a>, which include not being a spammer and not abusing the systems.', 'wporg-plugins' ) ), esc_url( 'https://developer.wordpress.org/plugins/wordpress-org/detailed-plugin-guidelines/' ) );
     58                        ?>
     59                    </li>
     60                </ul>
    3061
    31                         <h3><?php _e( 'There are some restrictions', 'wporg-plugins' ); ?></h3>
    32                         <ul>
    33                             <li><?php printf( __( 'Your plugin must be compatible with the <a href="%s">GNU General Public License v2</a>, or any later version. We strongly recommend using the same license as WordPress — &#8220;GPLv2 or later.&#8221;', 'wporg-plugins' ), esc_url( 'https://www.gnu.org/licenses/license-list.html#GPLCompatibleLicenses' ) ); ?></li>
    34                             <li><?php _e( 'The plugin must not do anything illegal or be morally offensive (that&#8217;s subjective, we know).', 'wporg-plugins' ); ?></li>
    35                             <li><?php printf( __( 'You have to actually use the <a href="%s">Subversion</a> repository we give you in order for your plugin to show up on this site. The WordPress Plugin Directory is a hosting site, not a listing site.', 'wporg-plugins' ), esc_url( 'https://subversion.apache.org/' ) ); ?></li>
    36                             <li><?php _e( 'The plugin must not embed external links on the public site (like a &#8220;powered by&#8221; link) without explicitly asking the user&#8217;s permission.', 'wporg-plugins' ); ?></li>
    37                             <li><?php printf( __( 'Your plugin must abide by our list of <a href="%s">detailed guidelines</a>, which include not being a spammer and not abusing the systems.', 'wporg-plugins' ), esc_url( 'https://developer.wordpress.org/plugins/wordpress-org/detailed-plugin-guidelines/' ) ); ?></li>
    38                         </ul>
     62                <h3><?php esc_html_e( 'Submission is Simple', 'wporg-plugins' ); ?></h3>
     63                <ol>
     64                    <li>
     65                        <?php
     66                        /* translators: URL to registration form. */
     67                        printf( wp_kses_post( __( '<a href="%s">Sign up</a> for an account on WordPress.org.', 'wporg-plugins' ) ), esc_url( wp_registration_url() ) );
     68                        ?>
     69                    </li>
     70                    <li>
     71                        <?php
     72                        /* translators: URL to plugin submission form. */
     73                        printf( wp_kses_post( __( '<a href="%s">Submit your plugin for review</a>.', 'wporg-plugins' ) ), esc_url( home_url( 'developers/add/' ) ) );
     74                        ?>
     75                    </li>
     76                    <li>
     77                        <?php
     78                        /* translators: URL to submission FAQ. */
     79                        printf( wp_kses_post( __( 'After your plugin is <a href="%s">manually reviewed</a>, it will either be approved or you will be emailed and asked to provide more information and/or make corrections.', 'wporg-plugins' ) ), esc_url( 'https://developer.wordpress.org/plugins/wordpress-org/plugin-developer-faq/#questions-about-submissions-and-approval' ) );
     80                        ?>
     81                    </li>
     82                    <li>
     83                        <?php
     84                        /* translators: URL to Subversion how-to page. */
     85                        printf( wp_kses_post( __( 'Once approved, you&#8217;ll be given access to a <a id="subversion" href="%s">Subversion Repository</a> where you&#8217;ll store your plugin.', 'wporg-plugins' ) ), esc_url( 'https://developer.wordpress.org/plugins/wordpress-org/how-to-use-subversion/' ) );
     86                        ?>
     87                    </li>
     88                    <li>
     89                        <?php
     90                        /* translators: 1: URL to readme section; 2: URL to home page; */
     91                        printf( wp_kses_post( __( 'Shortly after you upload your plugin (and a <a href="%1$s">readme file</a>!) to that repository, it will be automatically displayed in the <a href="%2$s">plugins browser</a>.', 'wporg-plugins' ) ), '#readme', esc_url( home_url( '/' ) ) );
     92                        ?>
     93                    </li>
     94                    <li>
     95                        <?php
     96                        /* translators: URL to developer FAQ. */
     97                        printf( wp_kses_post( __( 'Check out the <strong><a href="%s">FAQ</a></strong> for more information.', 'wporg-plugins' ) ), esc_url( 'https://developer.wordpress.org/plugins/wordpress-org/plugin-developer-faq/' ) );
     98                        ?>
     99                    </li>
     100                </ol>
    39101
    40                         <h3><?php _e( 'Submission is Simple', 'wporg-plugins' ); ?></h3>
    41                         <ol>
    42                             <li><?php printf( __( '<a href="%s">Sign up</a> for an account on WordPress.org.', 'wporg-plugins' ), esc_url( wp_registration_url() ) ); ?></li>
    43                             <li><?php printf( __( '<a href="%s">Submit your plugin for review</a>.', 'wporg-plugins' ), esc_url( home_url( 'developers/add/' ) ) ); ?></li>
    44                             <li><?php printf( __( 'After your plugin is <a href="%s">manually reviewed</a>, it will either be approved or you will be emailed and asked to provide more information and/or make corrections.', 'wporg-plugins' ), esc_url( 'https://developer.wordpress.org/plugins/wordpress-org/plugin-developer-faq/#questions-about-submissions-and-approval' ) ); ?></li>
    45                             <li><?php printf( __( 'Once approved, you&#8217;ll be given access to a <a id="subversion" href="%s">Subversion Repository</a> where you&#8217;ll store your plugin.', 'wporg-plugins' ), esc_url( 'https://developer.wordpress.org/plugins/wordpress-org/how-to-use-subversion/' ) ); ?></li>
    46                             <li>
    47                                 <?php
    48                                 /* translators: 1: URL to readme section; 2: URL to home page; */
    49                                 printf( __( 'Shortly after you upload your plugin (and a <a href="%1$s">readme file</a>!) to that repository, it will be automatically displayed in the <a href="%2$s">plugins browser</a>.', 'wporg-plugins' ), '#readme', esc_url( home_url( '/' ) ) );
    50                                 ?>
    51                             </li>
    52                             <li><?php printf( __( 'Check out the <strong><a href="%s">FAQ</a></strong> for more information.', 'wporg-plugins' ), esc_url( 'https://developer.wordpress.org/plugins/wordpress-org/plugin-developer-faq/' ) ); ?></li>
    53                         </ol>
    54 
    55                         <h3 id="readme"><?php _e( 'Readme files', 'wporg-plugins' ); ?></h3>
    56                         <p>
    57                             <?php
    58                             /* translators: 1: URL to readme file; 2: URL to readme validator; */
    59                             printf( __( 'To make your entry in the plugin browser most useful, each plugin should have a readme file named <code>readme.txt</code> that adheres to the <a href="%1$s">WordPress plugin readme file standard</a>. You can put your readme file through the <a href="%2$s">readme validator</a> to check it.', 'wporg-plugins' ), esc_url( home_url( 'files/2017/03/readme.txt' ) ), esc_url( home_url( '/developers/readme-validator/' ) ) );
    60                             ?>
    61                         </p>
     102                <h3 id="readme"><?php esc_html_e( 'Readme files', 'wporg-plugins' ); ?></h3>
     103                <p>
     104                    <?php
     105                    /* translators: 1: URL to readme file; 2: URL to readme validator; */
     106                    printf( wp_kses_post( __( 'To make your entry in the plugin browser most useful, each plugin should have a readme file named <code>readme.txt</code> that adheres to the <a href="%1$s">WordPress plugin readme file standard</a>. You can put your readme file through the <a href="%2$s">readme validator</a> to check it.', 'wporg-plugins' ) ), esc_url( home_url( 'files/2017/03/readme.txt' ) ), esc_url( home_url( '/developers/readme-validator/' ) ) );
     107                    ?>
     108                </p>
    62109            </div><!-- .entry-content -->
    63110
     
    66113                edit_post_link(
    67114                    sprintf(
    68                     /* translators: %s: Name of current post */
     115                        /* translators: %s: Name of current post */
    69116                        esc_html__( 'Edit %s', 'wporg-plugins' ),
    70117                        the_title( '<span class="screen-reader-text">"', '"</span>', false )
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/page.php

    r3193 r6284  
    2020
    2121        <?php
    22         while ( have_posts() ) : the_post();
     22        while ( have_posts() ) :
     23            the_post();
    2324
    2425            get_template_part( 'template-parts/content', 'page' );
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/search.php

    r4223 r6284  
    1313    <main id="main" class="site-main" role="main">
    1414
    15         <?php
    16             if ( have_posts() ) : ?>
     15        <?php if ( have_posts() ) : ?>
    1716
    18                 <header class="page-header">
    19                     <h1 class="page-title"><?php printf( esc_html__( 'Showing results for: %s', 'wporg-plugins' ), '<strong>' . get_search_query() . '</strong>' ); ?></h1>
    20                 </header><!-- .page-header -->
     17            <header class="page-header">
     18                <h1 class="page-title">
     19                    <?php
     20                    printf(
     21                        /* translators: Search query. */
     22                        esc_html__( 'Showing results for: %s', 'wporg-plugins' ),
     23                        '<strong>' . get_search_query() . '</strong>'
     24                    );
     25                    ?>
     26                </h1>
     27            </header><!-- .page-header -->
    2128
    22                 <?php
    23                 /* Start the Loop */
    24                 while ( have_posts() ) :
    25                     the_post();
     29            <?php
     30            /* Start the Loop */
     31            while ( have_posts() ) :
     32                the_post();
    2633
    27                     get_template_part( 'template-parts/plugin', 'index' );
    28                 endwhile;
     34                get_template_part( 'template-parts/plugin', 'index' );
     35            endwhile;
    2936
    30                 the_posts_pagination();
     37            the_posts_pagination();
    3138
    32             else :
    33                 get_template_part( 'template-parts/content', 'none' );
    34             endif;
     39        else :
     40            get_template_part( 'template-parts/content', 'none' );
     41        endif;
    3542        ?>
    3643
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/searchform.php

    r4223 r6284  
    11<?php
     2/**
     3 * The template for displaying search forms.
     4 *
     5 * @package WordPressdotorg\Plugin_Directory\Theme
     6 */
     7
    28namespace WordPressdotorg\Plugin_Directory\Theme;
     9
    310?>
    411<form role="search" method="get" class="search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>">
    5     <label for="s" class="screen-reader-text"><?php _ex( 'Search for:', 'label', 'wporg-plugins' ); ?></label>
     12    <label for="s" class="screen-reader-text"><?php echo esc_html_x( 'Search for:', 'label', 'wporg-plugins' ); ?></label>
    613    <input type="search" id="s" class="search-field" placeholder="<?php echo esc_attr_x( 'Search plugins', 'placeholder', 'wporg-plugins' ); ?>" value="<?php the_search_query(); ?>" name="s" />
    7     <button class="button button-primary button-search"><i class="dashicons dashicons-search"></i><span class="screen-reader-text"><?php _e( 'Search plugins', 'wporg-plugins' ); ?></span></button>
     14    <button class="button button-primary button-search"><i class="dashicons dashicons-search"></i><span class="screen-reader-text"><?php esc_html_e( 'Search plugins', 'wporg-plugins' ); ?></span></button>
    815</form>
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/single.php

    r4223 r6284  
    1515
    1616        <?php
    17             while ( have_posts() ) :
    18                 the_post();
     17        while ( have_posts() ) :
     18            the_post();
    1919
    20                 get_template_part( 'template-parts/plugin', 'single' );
    21             endwhile; // End of the loop.
     20            get_template_part( 'template-parts/plugin', 'single' );
     21        endwhile; // End of the loop.
    2222        ?>
    2323
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/template-parts/content-none.php

    r6024 r6284  
    1616
    1717    <div class="page-content">
    18         <?php
    19         if ( is_home() && current_user_can( 'publish_posts' ) ) : ?>
     18        <?php if ( is_home() && current_user_can( 'publish_posts' ) ) : ?>
    2019
    21             <p><?php printf( wp_kses( __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'wporg-plugins' ), array( 'a' => array( 'href' => array() ) ) ), esc_url( admin_url( 'post-new.php' ) ) ); ?></p>
     20            <p>
     21                <?php
     22                /* translators: URL to post edit screen. */
     23                printf( wp_kses_post( __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'wporg-plugins' ) ), esc_url( admin_url( 'post-new.php' ) ) );
     24                ?>
     25            </p>
    2226
    2327        <?php elseif ( is_search() ) : ?>
     
    2933
    3034        elseif ( is_tax( 'plugin_section', 'favorites' ) ) :
    31           if ( is_user_logged_in() ) :
    32             $current_user = wp_get_current_user();
    33         ?>
    34        
     35            if ( is_user_logged_in() ) :
     36                $current_user = wp_get_current_user();
     37            ?>
     38
    3539            <p><?php esc_html_e( 'No favorites have been added, yet.', 'wporg-plugins' ); ?></p>
    36            
     40
    3741            <?php if ( get_query_var( 'favorites_user' ) === $current_user->user_nicename ) : ?>
    3842            <p><?php esc_html_e( 'Find a plugin and mark it as a favorite to see it here.', 'wporg-plugins' ); ?></p>
    39             <p><?php printf( __( 'Your favorite plugins are also shared on <a href="%s">your profile</a>.', 'wporg-plugins' ), esc_url( 'https://profiles.wordpress.org/' . $current_user->user_nicename ) ); ?></p>
     43            <p>
     44                <?php
     45                /* translators: Link to user profile. */
     46                printf( wp_kses_post( __( 'Your favorite plugins are also shared on <a href="%s">your profile</a>.', 'wporg-plugins' ) ), esc_url( 'https://profiles.wordpress.org/' . $current_user->user_nicename ) );
     47                ?>
     48            </p>
    4049            <?php endif; ?>
    4150
    42         <?php else : ?>
    43        
    44             <p><?php printf( __( '<a href="%s">Login to WordPress.org</a> to mark plugins as favorites.', 'wporg-plugins' ), esc_url( wp_login_url( 'https://wordpress.org/plugins/browse/favorites/' ) ) ); ?></p>
     51            <?php else : ?>
     52
     53            <p>
     54                <?php
     55                /* translators: URL to login scren. */
     56                printf( wp_kses_post( __( '<a href="%s">Login to WordPress.org</a> to mark plugins as favorites.', 'wporg-plugins' ) ), esc_url( wp_login_url( 'https://wordpress.org/plugins/browse/favorites/' ) ) );
     57                ?>
     58            </p>
    4559
    4660        <?php
    47           endif; // is_user_logged_in()
    48         else :
    49     ?>
     61            endif; // is_user_logged_in.
     62        else :
     63        ?>
    5064
    5165            <p><?php esc_html_e( 'It seems we can&#8217;t find what you&#8217;re looking for. Perhaps searching can help.', 'wporg-plugins' ); ?></p>
    52             <?php
    53                 get_search_form();
     66            <?php get_search_form(); ?>
    5467
    55         endif; ?>
     68        <?php endif; ?>
    5669    </div><!-- .page-content -->
    5770</section><!-- .no-results -->
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/template-parts/content-page.php

    r4223 r6284  
    3030        edit_post_link(
    3131            sprintf(
    32             /* translators: %s: Name of current post */
     32                /* translators: %s: Name of current post */
    3333                esc_html__( 'Edit %s', 'wporg-plugins' ),
    3434                the_title( '<span class="screen-reader-text">"', '"</span>', false )
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/template-parts/plugin-sidebar-advanced.php

    r5867 r6284  
    1515);
    1616
    17 the_widget( 'WordPressdotorg\Plugin_Directory\Widgets\Meta',    array(), $widget_args );
    18 the_widget( 'WordPressdotorg\Plugin_Directory\Widgets\Ratings',    array(), $widget_args );
    19 the_widget( 'WordPressdotorg\Plugin_Directory\Widgets\Support',    array(), $widget_args );
    20    
     17the_widget( 'WordPressdotorg\Plugin_Directory\Widgets\Meta', array(), $widget_args );
     18the_widget( 'WordPressdotorg\Plugin_Directory\Widgets\Ratings', array(), $widget_args );
     19the_widget( 'WordPressdotorg\Plugin_Directory\Widgets\Support', array(), $widget_args );
     20
    2121// If the user is not a contributor/committer for the plugin, we'll show the Donate metabox instead of the committer metabox.
    2222if ( current_user_can( 'plugin_admin_view', $post ) ) {
     
    2828
    2929the_widget( 'WordPressdotorg\Plugin_Directory\Widgets\Contributors', array(), array(
    30     'before_title' => '<h4 class="widget-title">',
    31     'after_title'  => '</h4>',
     30    'before_title'  => '<h4 class="widget-title">',
     31    'after_title'   => '</h4>',
    3232    'before_widget' => '<div id="plugin-contributors" class="widget plugin-contributors read-more" aria-expanded="false">',
    33     'after_widget' => sprintf( '</div><button type="button" class="button-link section-toggle" aria-controls="plugin-contributors">%s</button>', __( 'View more', 'wporg-plugins' ) ),
     33    'after_widget'  => sprintf( '</div><button type="button" class="button-link section-toggle" aria-controls="plugin-contributors">%s</button>', __( 'View more', 'wporg-plugins' ) ),
    3434) );
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/template-parts/plugin-sidebar.php

    r5399 r6284  
    1515);
    1616
    17 the_widget( 'WordPressdotorg\Plugin_Directory\Widgets\Meta',    array(), $widget_args );
     17the_widget( 'WordPressdotorg\Plugin_Directory\Widgets\Meta', array(), $widget_args );
    1818the_widget( 'WordPressdotorg\Plugin_Directory\Widgets\Ratings', array(), $widget_args );
    1919the_widget( 'WordPressdotorg\Plugin_Directory\Widgets\Contributors', array(), array(
    20     'before_title' => '<h4 class="widget-title">',
    21     'after_title'  => '</h4>',
     20    'before_title'  => '<h4 class="widget-title">',
     21    'after_title'   => '</h4>',
    2222    'before_widget' => '<div id="plugin-contributors" class="widget plugin-contributors read-more" aria-expanded="false">',
    23     'after_widget' => sprintf( '</div><button type="button" class="button-link section-toggle" aria-controls="plugin-contributors">%s</button>', __( 'View more', 'wporg-plugins' ) ),
     23    'after_widget'  => sprintf( '</div><button type="button" class="button-link section-toggle" aria-controls="plugin-contributors">%s</button>', __( 'View more', 'wporg-plugins' ) ),
    2424) );
    2525the_widget( 'WordPressdotorg\Plugin_Directory\Widgets\Support', array(), $widget_args );
    26 the_widget( 'WordPressdotorg\Plugin_Directory\Widgets\Donate',  array(), $widget_args );
     26the_widget( 'WordPressdotorg\Plugin_Directory\Widgets\Donate', array(), $widget_args );
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/template-parts/plugin-single.php

    r6252 r6284  
    99
    1010namespace WordPressdotorg\Plugin_Directory\Theme;
     11
    1112use WordPressdotorg\Plugin_Directory\Plugin_Directory;
    1213use WordPressdotorg\Plugin_Directory\Template;
     
    1516
    1617$content   = Plugin_Directory::instance()->split_post_content_into_pages( get_the_content() );
    17 $is_closed = in_array( get_post_status(), ['closed', 'disabled'], true );
     18$is_closed = in_array( get_post_status(), [ 'closed', 'disabled' ], true );
    1819?>
    1920
     
    2526
    2627        <div class="entry-thumbnail">
    27             <?php echo Template::get_plugin_icon( $post, 'html' ); ?>
     28            <?php
     29            // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped
     30            echo Template::get_plugin_icon( $post, 'html' );
     31            ?>
    2832        </div>
    2933
     
    3236
    3337            <?php if ( 'publish' === get_post_status() || current_user_can( 'plugin_admin_view', $post ) ) : ?>
    34                 <a class="plugin-download button download-button button-large" href="<?php echo esc_url( Template::download_link() ); ?>"><?php _e( 'Download', 'wporg-plugins' ); ?></a>
     38                <a class="plugin-download button download-button button-large" href="<?php echo esc_url( Template::download_link() ); ?>"><?php esc_html_e( 'Download', 'wporg-plugins' ); ?></a>
    3539            <?php endif; ?>
    3640        </div>
    3741
    3842        <?php $plugin_title = $is_closed ? $post->post_name : get_the_title(); ?>
    39         <h1 class="plugin-title"><a href="<?php echo esc_url( get_permalink() ); ?>"><?php echo $plugin_title; ?></a></h1>
     43        <h1 class="plugin-title"><a href="<?php echo esc_url( get_permalink() ); ?>"><?php echo wp_kses_post( $plugin_title ); ?></a></h1>
    4044
    4145        <span class="byline"><?php the_author_byline(); ?></span>
     
    4852        <span id="developers"></span>
    4953        <ul class="tabs clear">
    50             <li id="tablink-description"><a href="#description"><?php _e( 'Details', 'wporg-plugins' ); ?></a></li>
    51             <li id="tablink-reviews"><a href="#reviews"><?php _e( 'Reviews', 'wporg-plugins' ); ?></a></li>
     54            <li id="tablink-description"><a href="#description"><?php esc_html_e( 'Details', 'wporg-plugins' ); ?></a></li>
     55            <li id="tablink-reviews"><a href="#reviews"><?php esc_html_e( 'Reviews', 'wporg-plugins' ); ?></a></li>
    5256            <?php if ( isset( $content['installation'] ) && ! $is_closed ) : ?>
    5357                <li id="tablink-installation">
    54                     <a href="#installation"><?php _e( 'Installation', 'wporg-plugins' ); ?></a>
     58                    <a href="#installation"><?php esc_html_e( 'Installation', 'wporg-plugins' ); ?></a>
    5559                </li>
    5660            <?php endif; ?>
    5761            <li id="tablink-support">
    58                 <a href="<?php echo esc_url( Template::get_support_url() ); ?>"><?php _e( 'Support', 'wporg-plugins' ); ?></a>
     62                <a href="<?php echo esc_url( Template::get_support_url() ); ?>"><?php esc_html_e( 'Support', 'wporg-plugins' ); ?></a>
    5963            </li>
    60             <li id="tablink-developers"><a href="#developers"><?php _e( 'Development', 'wporg-plugins' ); ?></a></li>
     64            <li id="tablink-developers"><a href="#developers"><?php esc_html_e( 'Development', 'wporg-plugins' ); ?></a></li>
    6165        </ul>
    6266    <?php endif; ?>
     
    8084                    $section_content = get_closed_plugin_notice();
    8185
    82                 } else if ( ! in_array( $section_slug, ['screenshots', 'installation', 'faq', 'changelog'], true ) || ! $is_closed ) {
     86                } elseif ( ! in_array( $section_slug, [ 'screenshots', 'installation', 'faq', 'changelog' ], true ) || ! $is_closed ) {
    8387                    $section_content = trim( apply_filters( 'the_content', $content[ $section_slug ], $section_slug ) );
    8488                }
     
    97101                }
    98102
    99                 $section_read_more = ! in_array( $section_slug, $section_no_read_mores );
     103                $section_read_more = ! in_array( $section_slug, $section_no_read_mores, true );
    100104
    101105                get_template_part( 'template-parts/section' );
    102106            endforeach;
    103         endif; // plugin_advanced
     107        endif; // plugin_advanced.
    104108        ?>
    105109    </div><!-- .entry-content -->
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/template-parts/plugin.php

    r6027 r6284  
    99
    1010namespace WordPressdotorg\Plugin_Directory\Theme;
     11
    1112use WordPressdotorg\Plugin_Directory\Template;
    1213
    13 
    14 ?><article id="post-<?php the_ID(); ?>" <?php post_class( 'plugin-card' ); ?>>
     14$tested_up_to = (string) get_post_meta( $post->ID, 'tested', true );
     15?>
     16<article id="post-<?php the_ID(); ?>" <?php post_class( 'plugin-card' ); ?>>
    1517    <div class="entry-thumbnail">
    1618        <a href="<?php the_permalink(); ?>" rel="bookmark">
    17             <?php echo Template::get_plugin_icon( get_post(), 'html' ); ?>
     19            <?php
     20            // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped
     21            echo Template::get_plugin_icon( get_post(), 'html' );
     22            ?>
    1823        </a>
    1924    </div><div class="entry">
     
    2227        </header><!-- .entry-header -->
    2328
    24         <?php echo Template::get_star_rating(); ?>
     29        <?php echo wp_kses_post( Template::get_star_rating() ); ?>
    2530
    2631        <div class="entry-excerpt">
     
    3439        </span>
    3540        <span class="active-installs">
    36             <i class="dashicons dashicons-chart-area"></i> <?php printf( __( '%s active installations', 'wporg-plugins' ), Template::active_installs(false) ); ?>
     41            <i class="dashicons dashicons-chart-area"></i>
     42            <?php echo esc_html( Template::active_installs() ); ?>
    3743        </span>
    38         <span class="tested-with">
    39             <?php if ( $tested_up_to = (string) get_post_meta( $post->ID, 'tested', true ) ) { ?>
    40                 <i class="dashicons dashicons-wordpress-alt"></i> <?php printf( __( 'Tested with %s', 'wporg-plugins' ), $tested_up_to ); ?></span>
    41             <?php } ?>
    42         </span>
     44        <?php if ( $tested_up_to ) : ?>
     45            <span class="tested-with">
     46                <i class="dashicons dashicons-wordpress-alt"></i>
     47                <?php
     48                /* translators: WordPress version. */
     49                printf( esc_html__( 'Tested with %s', 'wporg-plugins' ), esc_html( $tested_up_to ) );
     50                ?>
     51            </span>
     52        <?php endif; ?>
    4353        <span class="last-updated">
    44             <i class="dashicons dashicons-calendar"></i> <?php
    45                 /* Translators: Plugin modified time. */
    46                 printf( __( 'Updated %s ago', 'wporg-plugins' ), human_time_diff( get_post_modified_time() ) ); ?>
     54            <i class="dashicons dashicons-calendar"></i>
     55            <?php
     56            /* Translators: Plugin modified time. */
     57            printf( esc_html__( 'Updated %s ago', 'wporg-plugins' ), esc_html( human_time_diff( get_post_modified_time() ) ) );
     58            ?>
    4759        </span>
    4860        </span>
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/template-parts/section-advanced.php

    r6251 r6284  
    99
    1010namespace WordPressdotorg\Plugin_Directory\Theme;
     11
    1112use WordPressdotorg\Plugin_Directory\Template;
    1213
     
    1718    <?php the_closed_plugin_notice(); ?>
    1819
    19     <h2><?php _e( 'Plugin Stats', 'wporg-plugins' ); ?></h2>
     20    <h2><?php esc_html_e( 'Plugin Stats', 'wporg-plugins' ); ?></h2>
    2021
    21     <h4><?php _e( 'Active versions', 'wporg-plugins' ); ?></h4>
     22    <h4><?php esc_html_e( 'Active versions', 'wporg-plugins' ); ?></h4>
    2223    <div id="plugin-version-stats" class="chart version-stats"></div>
    2324
    24     <h4><?php _e( 'Downloads Per Day', 'wporg-plugins' ); ?></h4>
     25    <h4><?php esc_html_e( 'Downloads Per Day', 'wporg-plugins' ); ?></h4>
    2526    <div id="plugin-download-stats" class="chart download-stats"></div>
    2627
    27     <h4><?php _e( 'Active Install Growth', 'wporg-plugins' ); ?></h4>
     28    <h4><?php esc_html_e( 'Active Install Growth', 'wporg-plugins' ); ?></h4>
    2829    <div id="plugin-growth-stats" class="chart download-stats"></div>
    2930
    30     <h5><?php _e( 'Downloads history', 'wporg-plugins' ); ?></h5>
     31    <h5><?php esc_html_e( 'Downloads history', 'wporg-plugins' ); ?></h5>
    3132    <table id="plugin-download-history-stats" class="download-history-stats">
    3233        <tbody></tbody>
     
    4748        $tags = array_reverse( $tags );
    4849
    49         echo '<h5>' . __( 'Previous Versions', 'wporg-plugins' ) . '</h5>';
    50         echo '<div class="plugin-notice notice notice-info notice-alt"><p>' . __( 'Previous versions of this plugin may not be secure or stable and are available for testing purposes only.', 'wporg-plugins' ) . '</p></div>';
     50        echo '<h5>' . esc_html__( 'Previous Versions', 'wporg-plugins' ) . '</h5>';
     51        echo '<div class="plugin-notice notice notice-info notice-alt"><p>' . esc_html__( 'Previous versions of this plugin may not be secure or stable and are available for testing purposes only.', 'wporg-plugins' ) . '</p></div>';
    5152
    5253        echo '<select class="previous-versions" onchange="getElementById(\'download-previous-link\').href=this.value;">';
    5354        foreach ( $tags as $version ) {
    54             $text = ( 'trunk' == $version ? __( 'Development Version', 'wporg-plugins' ) : $version );
     55            $text = ( 'trunk' === $version ? esc_html__( 'Development Version', 'wporg-plugins' ) : $version );
    5556            printf( '<option value="%s">%s</option>', esc_attr( Template::download_link( $post, $version ) ), esc_html( $text ) );
    5657        }
     
    6061            '<a href="%s" id="download-previous-link" class="button">%s</a>',
    6162            esc_url( Template::download_link( $post, reset( $tags ) ) ),
    62             __( 'Download', 'wporg-plugins' )
     63            esc_html__( 'Download', 'wporg-plugins' )
    6364        );
    6465    }
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/template-parts/section.php

    r5399 r6284  
    1010global $section, $section_slug, $section_content, $section_read_more;
    1111
     12$prefix = in_array( $section_slug, array( 'screenshots', 'faq' ), true ) ? '' : 'tab-';
     13
     14$classes = [ 'plugin-' . $section_slug, 'section' ];
     15if ( $section_read_more ) {
     16    $classes[] = 'read-more';
     17}
     18$classes = implode( ' ', $classes );
    1219?>
    1320
    14 <div
    15 <?php if ( !in_array ( $section_slug, array( 'screenshots','faq' ) ) ) {
    16     $prefix = 'tab-';
    17 } else {
    18     $prefix = '';
    19 }
    20 ?>
    21     id="<?php echo esc_attr( $prefix.$section_slug ); ?>"
    22     class="plugin-<?php echo esc_attr( $section_slug ); ?> section <?php if ( $section_read_more ) { echo 'read-more'; } ?>"
    23 >
    24     <h2 id="<?php echo esc_attr( $section_slug . '-header' ); ?>"><?php echo $section['title']; ?></h2>
    25     <?php echo $section_content; ?>
     21<div id="<?php echo esc_attr( $prefix . $section_slug ); ?>" class="<?php echo esc_attr( $classes ); ?>">
     22    <h2 id="<?php echo esc_attr( $section_slug . '-header' ); ?>"><?php echo esc_html( $section['title'] ); ?></h2>
     23    <?php echo wp_kses_post( $section_content ); ?>
    2624</div>
    2725<?php if ( $section_read_more ) : ?>
    28 <button
    29     type="button"
    30     class="button-link section-toggle"
    31     aria-controls="<?php echo esc_attr( $prefix.$section_slug ); ?>"
    32     aria-describedby="<?php echo esc_attr( $section_slug . '-header' ); ?>"
    33     aria-expanded="false"
    34     data-show-less="<?php esc_attr_e( 'Show less', 'wporg-plugins' ); ?>"
    35     data-read-more="<?php esc_attr_e( 'Read more', 'wporg-plugins' ); ?>"
    36 ><?php _e( 'Read more', 'wporg-plugins' ); ?></button>
     26    <button
     27        type="button"
     28        class="button-link section-toggle"
     29        aria-controls="<?php echo esc_attr( $prefix . $section_slug ); ?>"
     30        aria-describedby="<?php echo esc_attr( $section_slug . '-header' ); ?>"
     31        aria-expanded="false"
     32        data-show-less="<?php esc_attr_e( 'Show less', 'wporg-plugins' ); ?>"
     33        data-read-more="<?php esc_attr_e( 'Read more', 'wporg-plugins' ); ?>"
     34    >
     35    <?php esc_html_e( 'Read more', 'wporg-plugins' ); ?>
     36    </button>
    3737<?php endif; ?>
Note: See TracChangeset for help on using the changeset viewer.