Making WordPress.org

Changeset 6277


Ignore:
Timestamp:
12/15/2017 12:13:33 AM (9 years ago)
Author:
obenland
Message:

Main: Conform to WPCS.

See #2861.

Location:
sites/trunk/wordpress.org/public_html/wp-content/themes/pub
Files:
33 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/Gruntfile.js

    r5878 r6277  
     1/**
     2 * Gruntfile.js
     3 *
     4 * @package WordPressdotorg\MainTheme
     5 */
     6
    17/* global module:false, require:function, process:object */
    28
     
    2329                                                cascade: false
    2430                                        } ),
    25                                         require( 'pixrem' )
     31                                        require( 'pixrem' ),
    2632                                ]
    2733                        },
     
    3137                },
    3238                jshint: {
    33                         files: [
    34                                 'Gruntfile.js',
    35                                 'js/**/*.js'
    36                         ],
     39                        files: [ 'Gruntfile.js', 'js/**/*.js' ],
    3740                        options: grunt.file.readJSON( '.jshintrc' )
    3841                },
     
    5659
    5760                                        ['settings', 'tools', 'generic', 'base', 'objects', 'components', 'trumps'].forEach( function( component ) {
    58                                                 var paths = [
    59                                                         '../wporg/css/' + component + '/**/*.scss',
    60                                                         '!../wporg/css/' + component + '/_' + component + '.scss'
    61                                                 ];
     61                                                var paths = ['../wporg/css/' + component + '/**/*.scss', '!../wporg/css/' + component + '/_' + component + '.scss'];
    6262
    6363                                                if ( isChild ) {
     
    7676                rtlcss: {
    7777                        options: {
    78                                 // rtlcss options
     78                                // rtlcss options.
    7979                                opts: {
    8080                                        clean: false,
     
    9191                                                                ignoreCase: false
    9292                                                        }
    93                                                 }
     93                                                } // phpcs:ignore Generic.WhiteSpace.ScopeIndent.IncorrectExact
    9494                                        ]
    9595                                },
     
    107107                                                                expr: /content/im,
    108108                                                                action: function( prop, value ) {
    109                                                                         if ( value === '"\\f141"' ) { // dashicons-arrow-left
     109                                                                        if ( value === '"\\f141"' ) { // dashicons-arrow-left.
    110110                                                                                value = '"\\f139"';
    111                                                                         } else if ( value === '"\\f340"' ) { // dashicons-arrow-left-alt
     111                                                                        } else if ( value === '"\\f340"' ) { // dashicons-arrow-left-alt.
    112112                                                                                value = '"\\f344"';
    113                                                                         } else if ( value === '"\\f341"' ) { // dashicons-arrow-left-alt2
     113                                                                        } else if ( value === '"\\f341"' ) { // dashicons-arrow-left-alt2.
    114114                                                                                value = '"\\f345"';
    115                                                                         } else if ( value === '"\\f139"' ) { // dashicons-arrow-right
     115                                                                        } else if ( value === '"\\f139"' ) { // dashicons-arrow-right.
    116116                                                                                value = '"\\f141"';
    117                                                                         } else if ( value === '"\\f344"' ) { // dashicons-arrow-right-alt
     117                                                                        } else if ( value === '"\\f344"' ) { // dashicons-arrow-right-alt.
    118118                                                                                value = '"\\f340"';
    119                                                                         } else if ( value === '"\\f345"' ) { // dashicons-arrow-right-alt2
     119                                                                        } else if ( value === '"\\f345"' ) { // dashicons-arrow-right-alt2.
    120120                                                                                value = '"\\f341"';
    121121                                                                        }
    122122                                                                        return { prop: prop, value: value };
    123123                                                                }
    124                                                         }
     124                                                        } // phpcs:ignore Generic.WhiteSpace.ScopeIndent.IncorrectExact
    125125                                                ]
    126                                         }
     126                                        } // phpcs:ignore Generic.WhiteSpace.ScopeIndent.IncorrectExact
    127127                                ]
    128128                        },
     
    151151        }
    152152
    153         grunt.loadNpmTasks('grunt-sass');
    154         grunt.loadNpmTasks('grunt-rtlcss');
    155         grunt.loadNpmTasks('grunt-postcss');
    156         grunt.loadNpmTasks('grunt-sass-globbing');
    157         grunt.loadNpmTasks('grunt-contrib-watch');
    158         grunt.loadNpmTasks('grunt-contrib-jshint');
     153        grunt.loadNpmTasks( 'grunt-sass' );
     154        grunt.loadNpmTasks( 'grunt-rtlcss' );
     155        grunt.loadNpmTasks( 'grunt-postcss' );
     156        grunt.loadNpmTasks( 'grunt-sass-globbing' );
     157        grunt.loadNpmTasks( 'grunt-contrib-watch' );
     158        grunt.loadNpmTasks( 'grunt-contrib-jshint' );
    159159
    160         grunt.registerTask('css', ['sass_globbing', 'sass', 'postcss', 'rtlcss:dynamic']);
    161         grunt.registerTask('default', ['jshint', 'css']);
    162         grunt.registerTask('build', ['css']);
     160        grunt.registerTask( 'css', ['sass_globbing', 'sass', 'postcss', 'rtlcss:dynamic'] );
     161        grunt.registerTask( 'default', ['jshint', 'css'] );
     162        grunt.registerTask( 'build', ['css'] );
    163163};
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/front-page.php

    r6246 r6277  
    1313 */
    1414
     15// phpcs:disable WordPress.XSS.EscapeOutput.UnsafePrintingFunction, WordPress.XSS.EscapeOutput.OutputNotEscaped
     16
    1517namespace WordPressdotorg\MainTheme;
    1618
     
    4547                        <section class="showcase">
    4648                                <h2><?php _e( 'Trusted by the Best', 'wporg' ); ?></h2>
    47                                 <p class="subheading"><?php printf( __( '%s of the web uses WordPress, from hobby blogs to the biggest news sites online.', 'wporg' ), WP_MARKET_SHARE . '%' ); ?></p>
     49                                <p class="subheading">
     50                                        <?php
     51                                        printf(
     52                                                /* translators: WordPress market share: 29%; */
     53                                                __( '%s of the web uses WordPress, from hobby blogs to the biggest news sites online.', 'wporg' ),
     54                                                WP_MARKET_SHARE . '%'
     55                                        );
     56                                        ?>
     57                                </p>
    4858                                <div class="collage">
    4959
     
    8999                                        </li>
    90100                                </ul>
    91                                 <p><?php
     101                                <p>
     102                                        <?php
    92103                                        /* translators: %s: Link to Plugin Directory. */
    93                                         printf( __( 'Extend WordPress with over 45,000 plugins to help your website meet your needs. Add an online store, galleries, mailing lists, forums, analytics, and <a href="%s">much more</a>.', 'wporg' ), esc_url( home_url( '/plugins/' ) ) ); ?></p>
     104                                        printf( __( 'Extend WordPress with over 45,000 plugins to help your website meet your needs. Add an online store, galleries, mailing lists, forums, analytics, and <a href="%s">much more</a>.', 'wporg' ), esc_url( home_url( '/plugins/' ) ) );
     105                                        ?>
     106                                </p>
    94107                        </section>
    95108
     
    123136                                        'no_found_rows'       => true,
    124137                                ] );
     138
    125139                                while ( $featured->have_posts() ) :
    126140                                        $featured->the_post();
     141
    127142                                        the_title( sprintf( '<h5><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h5>' );
    128143                                        echo '<div class="entry-summary">' . apply_filters( 'the_excerpt', get_the_excerpt() ) . '</div>';
     
    136151
    137152                                <ol class="steps">
    138                                         <li class="one"><span></span><?php printf( __( '<a href="%s">Find a Web Host</a> and get great hosting while supporting WordPress at the same&nbsp;time.', 'wporg' ), esc_url( 'https://wordpress.org/hosting/' ) ); ?></li>
    139                                         <li class="two"><span></span><?php printf( __( '<a href="%s">Download &amp; Install WordPress</a> with our famous 5-minute&nbsp;installation. Feel like a rock star.', 'wporg' ),  esc_url( get_downloads_url() ) ); ?></li>
    140                                         <li class="three"><span></span><?php printf( __( '<a href="%s">Read the Documentation</a> and become a WordPress expert yourself, impress your friends.', 'wporg' ), esc_url( 'https://developer.wordpress.org' ) ); ?></li>
     153                                        <li class="one">
     154                                                <span></span>
     155                                                <?php
     156                                                printf(
     157                                                        /* translators: URL to Hosting page. */
     158                                                        __( '<a href="%s">Find a Web Host</a> and get great hosting while supporting WordPress at the same&nbsp;time.', 'wporg' ),
     159                                                        esc_url( 'https://wordpress.org/hosting/' )
     160                                                );
     161                                                ?>
     162                                        </li>
     163                                        <li class="two">
     164                                                <span></span>
     165                                                <?php
     166                                                printf(
     167                                                        /* translators: URL to Downloads page. */
     168                                                        __( '<a href="%s">Download &amp; Install WordPress</a> with our famous 5-minute&nbsp;installation. Feel like a rock star.', 'wporg' ),
     169                                                        esc_url( get_downloads_url() )
     170                                                );
     171                                                ?>
     172                                        </li>
     173                                        <li class="three">
     174                                                <span></span>
     175                                                <?php
     176                                                printf(
     177                                                        /* translators: URL to Developer Hub. */
     178                                                        __( '<a href="%s">Read the Documentation</a> and become a WordPress expert yourself, impress your friends.', 'wporg' ),
     179                                                        esc_url( 'https://developer.wordpress.org' )
     180                                                );
     181                                                ?>
     182                                        </li>
    141183                                </ol>
    142184                        </div>
     
    204246        </main><!-- #main -->
    205247
    206         <?php
     248<?php
    207249get_footer();
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/functions.php

    r6173 r6277  
    3535
    3636        add_filter( 'widget_links_args', function( $args ) {
    37                 $args['categorize']      = 0;
    38                 $args['category_before'] = '';
    39                 $args['category_after']  = '';
    40                 $args['title_li']        = __( 'Resources', 'wporg' );
     37                $args['categorize'] = 0;
     38                $args['title_li']   = __( 'Resources', 'wporg' );
    4139
    4240                return $args;
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/inc/template-tags.php

    r6142 r6277  
    66 */
    77
     8// phpcs:disable WordPress.VIP.RestrictedFunctions.get_page_by_path_get_page_by_path
     9
    810namespace WordPressdotorg\MainTheme;
    911
     
    1113 * Displays a table row with release information.
    1214 *
    13  * @param array $release
     15 * @param array $release Release to be processed.
    1416 */
    1517function release_row( $release ) {
     
    2931
    3032/**
    31  * Rerieve the localised downloads link.
     33 * Retrieve the localised downloads link.
    3234 *
    3335 * Uses the 'txt-download' page if exists, falling back to the 'releases' page for older sites, and finally, the english downloads page.
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/page-releases.php

    r6135 r6277  
    77
    88namespace WordPressdotorg\MainTheme;
     9
    910$releases = $GLOBALS['rosetta']->rosetta->get_releases_breakdown();
    1011
    1112the_post();
    12 get_header( 'page' ); ?>
     13get_header();
     14?>
    1315
    1416        <article id="post-<?php the_ID(); ?>" <?php post_class( 'col-12' ); ?> role="main">
     
    2224                                if ( isset( $releases['latest'] ) ) :
    2325                                        ?>
    24                                         <h3 id="latest"><?php _e( 'Latest release', 'wporg' ); ?></h3>
     26                                        <h3 id="latest"><?php esc_html_e( 'Latest release', 'wporg' ); ?></h3>
    2527                                        <table class="releases latest">
    2628                                                <?php release_row( $releases['latest'] ); ?>
     
    3234                                        echo '<a name="older" id="older"></a>';
    3335
    34                                         foreach ( $releases['branches'] as $branch => $branch_release ):
     36                                        foreach ( $releases['branches'] as $branch => $branch_release ) :
    3537                                                ?>
    36                                                 <h3><?php printf( __( '%s Branch', 'wporg' ), $branch );?></h3>
     38                                                <h3>
     39                                                        <?php
     40                                                        printf(
     41                                                                /* translators: Version number. */
     42                                                                esc_html__( '%s Branch', 'wporg' ),
     43                                                                esc_html( $branch )
     44                                                        );
     45                                                        ?>
     46                                                </h3>
    3747                                                <table class="releases">
    3848                                                        <?php
     
    4454                                                <?php
    4555                                        endforeach;
    46                                 endif; // any branches
     56                                endif; // Any branches.
    4757
    4858                                if ( ! empty( $releases['betas'] ) ) :
    4959                                        ?>
    50                                         <h3 id="betas"><?php _e( 'Beta &amp; RC releases', 'wporg' ); ?></h3>
     60                                        <h3 id="betas"><?php esc_html_e( 'Beta &amp; RC releases', 'wporg' ); ?></h3>
    5161                                        <table id="beta" class="releases">
    5262                                                <?php
    53                                                 foreach ( $releases['betas'] as $release ):
     63                                                foreach ( $releases['betas'] as $release ) :
    5464                                                        release_row( $release );
    5565                                                endforeach;
     
    5868
    5969                                        <?php
    60                                 endif; // any betas
    61                         else: // no releases
    62                                 echo '<p>' . __( 'There are no releases, yet.', 'wporg' ) . '</p>';
    63                         endif; // if releases
     70                                endif; // Any betas.
     71                        else : // No releases.
     72                                echo '<p>' . esc_html__( 'There are no releases, yet.', 'wporg' ) . '</p>';
     73                        endif; // if releases.
    6474                        ?>
    6575                </div><!-- .entry-content -->
     
    7787                ?>
    7888        </article><!-- #post-## -->
     89
    7990<?php
    8091get_footer();
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/page-templates/download.php

    r6145 r6277  
    1 <?php
     1<?php // phpcs:ignore Squiz.Commenting.FileComment.Missing -- See https://github.com/squizlabs/PHP_CodeSniffer/commit/ee0f50bf8f9f6d2ea1fa290c91cdadffd4b8d5d1
    22/**
    33 * Template Name: Downloads
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/page-txt-download.php

    r6093 r6277  
    99
    1010the_post();
    11 get_header( 'page' ); ?>
     11get_header();
     12?>
    1213
    1314        <main id="main" class="site-main col-12" role="main">
     
    2223                                        the_widget( __NAMESPACE__ . '\WPORG_Widget_Download' );
    2324
    24                                         printf( '<div class="widget %s">', 'widget_links' );
    2525                                        the_widget( 'WP_Widget_Links', array(), array(
    2626                                                'before_title' => '<h4>',
    27                                                 'after_title'  => '</h4>' . '<p>' . __( 'For help with installing or using WordPress, consult our documentation in your language.', 'wporg' ) . '</p>',
     27                                                'after_title'  => '</h4><p>' . __( 'For help with installing or using WordPress, consult our documentation in your language.', 'wporg' ) . '</p>',
    2828                                        ) );
    29                                         echo '</div>';
    3029                                        ?>
    3130                                </aside>
     
    5756        </main><!-- #main -->
    5857
    59         <?php
     58<?php
    6059get_footer();
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/style.css

    r6057 r6277  
     1/* phpcs:ignore */
    12/*!
    23Theme Name: WordPress.org Main
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/widgets/class-wporg-widget-download.php

    r6063 r6277  
    2424        public function __construct() {
    2525                parent::__construct( 'wporg_download', __( 'Download', 'wporg' ), array(
    26                         'classname' => 'widget_download',
    27                         'description' => __( 'WordPress download button.', 'wporg' ),
     26                        'classname'                   => 'widget_download',
     27                        'description'                 => __( 'WordPress download button.', 'wporg' ),
    2828                        'customize_selective_refresh' => true,
    2929                ) );
     
    5151                }
    5252
     53                // phpcs:disable WordPress.XSS.EscapeOutput.OutputNotEscaped
     54
    5355                echo $args['before_widget'];
    5456                ?>
    5557                <div>
    5658                        <a class="button button-primary button-large" href="<?php echo esc_url( $latest_release['zip_url'] ); ?>" role="button">
    57                                 <?php echo apply_filters( 'no_orphans', sprintf( __( 'Download WordPress %s', 'wporg' ), $latest_release['version'] ) ); ?>
     59                                <?php
     60                                echo apply_filters( 'no_orphans', sprintf(
     61                                        /* translators: WordPress version. */
     62                                        __( 'Download WordPress %s', 'wporg' ),
     63                                        $latest_release['version']
     64                                ) );
     65                                ?>
    5866                        </a>
    59                         <div><?php printf( __( '.zip &mdash; %s MB', 'wporg' ), esc_html( $latest_release['zip_size_mb'] ) ); ?></div>
     67                        <div>
     68                                <?php
     69                                printf(
     70                                        /* translators: Size of .zip file. */
     71                                        __( '.zip &mdash; %s MB', 'wporg' ),
     72                                        esc_html( $latest_release['zip_size_mb'] )
     73                                );
     74                                ?>
     75                        </div>
    6076                </div>
    6177
    6278                <div>
    6379                        <a href="<?php echo esc_url( $latest_release['targz_url'] ); ?>">
    64                                 <?php printf( __( 'Download .tar.gz &mdash; %s MB', 'wporg' ), esc_html( $latest_release['tar_size_mb'] ) ); ?>
     80                                <?php
     81                                printf(
     82                                        /* translators: Size of .tar.gz file. */
     83                                        __( 'Download .tar.gz &mdash; %s MB', 'wporg' ),
     84                                        esc_html( $latest_release['tar_size_mb'] )
     85                                );
     86                                ?>
    6587                        </a>
    6688                </div>
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg/404.php

    r6154 r6277  
    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' ), get_home_url() ); ?></p>
     22                                <p>
     23                                        <?php
     24                                        printf(
     25                                                /* translators: Home URL. */
     26                                                __( 'Try searching from the field above, or go to the <a href="%s">home page</a>.', 'wporg' ), // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped
     27                                                esc_url( get_home_url() )
     28                                        );
     29                                        ?>
     30                                </p>
    2331
    2432                                <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 id="hinge" src="<?php echo get_theme_file_uri( '/images/wp-logo-blue.png' ); ?>" class="wp-logo hinge" />
     33                                        <img src="<?php echo esc_url( get_theme_file_uri( '/images/wp-logo-blue-trans-blur.png' ) ); ?>" class="wp-logo" />
     34                                        <img id="hinge" src="<?php echo esc_url( get_theme_file_uri( '/images/wp-logo-blue.png' ) ); ?>" class="wp-logo hinge" />
    2735                                </div>
    2836                        </div><!-- .page-content -->
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg/Gruntfile.js

    r4879 r6277  
     1/**
     2 * Gruntfile.js
     3 *
     4 * @package WordPressdotorg\Theme
     5 */
     6
    17/* global module:false, require:function, process:object */
    28
     
    2329                                                cascade: false
    2430                                        } ),
    25                                         require( 'pixrem' )
     31                                        require( 'pixrem' ),
    2632                                ]
    2733                        },
     
    3137                },
    3238                jshint: {
    33                         files: [
    34                                 'Gruntfile.js',
    35                                 'js/**/*.js'
    36                         ],
     39                        files: [ 'Gruntfile.js', 'js/**/*.js' ],
    3740                        options: grunt.file.readJSON( '.jshintrc' )
    3841                },
     
    5659
    5760                                        ['settings', 'tools', 'generic', 'base', 'objects', 'components', 'trumps'].forEach( function( component ) {
    58                                                 var paths = [
    59                                                         '../wporg/css/' + component + '/**/*.scss',
    60                                                         '!../wporg/css/' + component + '/_' + component + '.scss'
    61                                                 ];
     61                                                var paths = [ '../wporg/css/' + component + '/**/*.scss', '!../wporg/css/' + component + '/_' + component + '.scss' ];
    6262
    6363                                                if ( isChild ) {
     
    7676                rtlcss: {
    7777                        options: {
    78                                 // rtlcss options
     78                                // rtlcss options.
    7979                                opts: {
    8080                                        clean: false,
     
    9191                                                                ignoreCase: false
    9292                                                        }
    93                                                 }
     93                                                } // phpcs:ignore Generic.WhiteSpace.ScopeIndent.IncorrectExact
    9494                                        ]
    9595                                },
     
    107107                                                                expr: /content/im,
    108108                                                                action: function( prop, value ) {
    109                                                                         if ( value === '"\\f141"' ) { // dashicons-arrow-left
     109                                                                        if ( value === '"\\f141"' ) { // dashicons-arrow-left.
    110110                                                                                value = '"\\f139"';
    111                                                                         } else if ( value === '"\\f340"' ) { // dashicons-arrow-left-alt
     111                                                                        } else if ( value === '"\\f340"' ) { // dashicons-arrow-left-alt.
    112112                                                                                value = '"\\f344"';
    113                                                                         } else if ( value === '"\\f341"' ) { // dashicons-arrow-left-alt2
     113                                                                        } else if ( value === '"\\f341"' ) { // dashicons-arrow-left-alt2.
    114114                                                                                value = '"\\f345"';
    115                                                                         } else if ( value === '"\\f139"' ) { // dashicons-arrow-right
     115                                                                        } else if ( value === '"\\f139"' ) { // dashicons-arrow-right.
    116116                                                                                value = '"\\f141"';
    117                                                                         } else if ( value === '"\\f344"' ) { // dashicons-arrow-right-alt
     117                                                                        } else if ( value === '"\\f344"' ) { // dashicons-arrow-right-alt.
    118118                                                                                value = '"\\f340"';
    119                                                                         } else if ( value === '"\\f345"' ) { // dashicons-arrow-right-alt2
     119                                                                        } else if ( value === '"\\f345"' ) { // dashicons-arrow-right-alt2.
    120120                                                                                value = '"\\f341"';
    121121                                                                        }
    122122                                                                        return { prop: prop, value: value };
    123123                                                                }
    124                                                         }
     124                                                        } // phpcs:ignore Generic.WhiteSpace.ScopeIndent.IncorrectExact
    125125                                                ]
    126                                         }
     126                                        } // phpcs:ignore Generic.WhiteSpace.ScopeIndent.IncorrectExact
    127127                                ]
    128128                        },
     
    151151        }
    152152
    153         grunt.loadNpmTasks('grunt-sass');
    154         grunt.loadNpmTasks('grunt-rtlcss');
    155         grunt.loadNpmTasks('grunt-postcss');
    156         grunt.loadNpmTasks('grunt-sass-globbing');
    157         grunt.loadNpmTasks('grunt-contrib-watch');
    158         grunt.loadNpmTasks('grunt-contrib-jshint');
     153        grunt.loadNpmTasks( 'grunt-sass' );
     154        grunt.loadNpmTasks( 'grunt-rtlcss' );
     155        grunt.loadNpmTasks( 'grunt-postcss' );
     156        grunt.loadNpmTasks( 'grunt-sass-globbing' );
     157        grunt.loadNpmTasks( 'grunt-contrib-watch' );
     158        grunt.loadNpmTasks( 'grunt-contrib-jshint' );
    159159
    160         grunt.registerTask('css', ['sass_globbing', 'sass', 'postcss', 'rtlcss:dynamic']);
    161         grunt.registerTask('default', ['jshint', 'css']);
    162         grunt.registerTask('build', ['css']);
     160        grunt.registerTask( 'css', ['sass_globbing', 'sass', 'postcss', 'rtlcss:dynamic'] );
     161        grunt.registerTask( 'default', ['jshint', 'css'] );
     162        grunt.registerTask( 'build', ['css'] );
    163163};
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg/archive.php

    r5945 r6277  
    1010namespace WordPressdotorg\Theme;
    1111
    12 get_header( 'page' ); ?>
     12get_header();
     13?>
    1314
    1415        <main id="main" class="site-main col-8" role="main">
    1516
    16         <?php
    17         if ( have_posts() ) : ?>
     17        <?php if ( have_posts() ) : ?>
    1818
    1919                <header class="page-header">
     
    3737                get_template_part( 'template-parts/content', 'none' );
    3838
    39         endif; ?>
     39        endif;
     40        ?>
    4041
    4142        </main><!-- #main -->
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg/comments.php

    r5892 r6277  
    2727        <?php
    2828        // You can start editing here -- including this comment!
    29         if ( have_comments() ) : ?>
     29        if ( have_comments() ) :
     30        ?>
    3031                <h2 class="comments-title">
    3132                        <?php
     
    3334                        if ( 1 === $comment_count ) {
    3435                                printf(
    35                                 /* translators: 1: title. */
     36                                        /* translators: 1: title. */
    3637                                        esc_html_e( 'One thought on &ldquo;%1$s&rdquo;', 'wporg' ),
    3738                                        '<span>' . get_the_title() . '</span>'
     
    3940                        } else {
    4041                                printf( // WPCS: XSS OK.
    41                                 /* translators: 1: comment count number, 2: title. */
     42                                        /* translators: 1: comment count number, 2: title. */
    4243                                        esc_html( _nx( '%1$s thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', $comment_count, 'comments title', 'wporg' ) ),
    4344                                        number_format_i18n( $comment_count ),
     
    5960                </ol><!-- .comment-list -->
    6061
    61                 <?php the_comments_navigation();
     62                <?php
     63                the_comments_navigation();
    6264
    6365                // If comments are closed and there are comments, let's leave a little note, shall we?
    64                 if ( ! comments_open() ) : ?>
     66                if ( ! comments_open() ) :
     67                ?>
    6568                        <p class="no-comments"><?php esc_html_e( 'Comments are closed.', 'wporg' ); ?></p>
    66                         <?php
     69                <?php
    6770                endif;
    6871
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg/footer.php

    r3879 r6277  
    1111
    1212namespace WordPressdotorg\Theme;
     13
    1314?>
    1415
    1516        </div><!-- #content -->
    1617
    17         <?php
    18 
     18<?php
    1919require WPORGPATH . 'footer.php';
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg/functions.php

    r6248 r6277  
    3232        add_theme_support( 'automatic-feed-links' );
    3333
    34         // Don't include Adjacent Posts functionality
     34        // Don't include Adjacent Posts functionality.
    3535        remove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head' );
    3636
     
    8181function scripts() {
    8282        $suffix = is_rtl() ? '-rtl' : '';
    83         wp_enqueue_style( 'wporg-style', get_stylesheet_directory_uri() . "/css/style{$suffix}.css", ['dashicons', 'open-sans'], '20171207' );
    84 
    85         //wp_enqueue_script( 'wporg-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20151215', true );
     83        wp_enqueue_style( 'wporg-style', get_stylesheet_directory_uri() . "/css/style{$suffix}.css", [ 'dashicons', 'open-sans' ], '20171207' );
     84
     85        // phpcs:ignore Squiz.PHP.CommentedOutCode.Found, Squiz.Commenting.InlineComment.InvalidEndChar
     86        // wp_enqueue_script( 'wporg-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20151215', true );
    8687        wp_enqueue_script( 'wporg-plugins-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20151215', true );
    8788
     
    123124
    124125        // Remove version argument.
    125         if ( in_array( $handle, ['open-sans'], true ) ) {
     126        if ( in_array( $handle, [ 'open-sans' ], true ) ) {
    126127                $src = remove_query_arg( 'ver', $src );
    127128        }
     
    137138 */
    138139function customize_register( $wp_customize ) {
    139         $wp_customize->get_setting( 'blogname' )->transport         = 'postMessage';
    140         $wp_customize->get_setting( 'blogdescription' )->transport  = 'postMessage';
     140        $wp_customize->get_setting( 'blogname' )->transport        = 'postMessage';
     141        $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';
    141142}
    142143add_action( 'customize_register', __NAMESPACE__ . '\customize_register' );
     
    148149        wp_enqueue_script( 'wporg_plugins_customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), '20151215', true );
    149150}
    150 add_action( 'customize_preview_init',  __NAMESPACE__ . '\customize_preview_js' );
     151add_action( 'customize_preview_init', __NAMESPACE__ . '\customize_preview_js' );
    151152
    152153
     
    160161        wp_cache_add_global_groups( array( 'locale-associations' ) );
    161162
    162         if ( false === ( $sites = wp_cache_get( 'local-sites', 'locale-associations' ) ) ) {
     163        $sites = wp_cache_get( 'local-sites', 'locale-associations' );
     164
     165        if ( false === $sites ) {
    163166                global $wpdb;
    164167
     168                // phpcs:ignore WordPress.VIP.DirectDatabaseQuery.DirectQuery
    165169                $sites = $wpdb->get_results( 'SELECT locale, subdomain FROM locales', OBJECT_K );
    166170                if ( ! $sites ) {
     
    188192                        'locale'    => 'en_US',
    189193                        'hreflang'  => 'en',
    190                         'subdomain' => ''
     194                        'subdomain' => '',
    191195                );
    192196
     
    202206                        'https://%swordpress.org%s',
    203207                        $site->subdomain ? "{$site->subdomain}." : '',
    204                         $_SERVER[ 'REQUEST_URI' ]
     208                        $_SERVER['REQUEST_URI'] // phpcs:ignore
    205209                );
    206210
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg/header-page.php

    r6060 r6277  
    11<?php
    22/**
    3  * The template for displaying all pages.
     3 * The Header template for pages in our theme.
    44 *
    5  * This is the template that displays all pages by default.
    6  * Please note that this is the WordPress construct of pages
    7  * and that other 'pages' on your WordPress site may use a
    8  * different template.
     5 * Displays all of the <head> section and everything up till <div id="content">
    96 *
    107 * @link https://codex.wordpress.org/Template_Hierarchy
    118 *
    12  * @package WordPressdotorg\Plugin_Directory\Theme
     9 * @package WordPressdotorg\Theme
    1310 */
    1411
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg/header-wporg.php

    r6060 r6277  
    11<?php
     2/**
     3 * The Header template for pages in our theme.
     4 *
     5 * Displays all of the <head> section and the wp.org header.
     6 *
     7 * @link https://codex.wordpress.org/Template_Hierarchy
     8 *
     9 * @package WordPressdotorg\Theme
     10 */
     11
    212namespace WordPressdotorg\Theme;
    313
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg/header.php

    r6060 r6277  
    11<?php
    22/**
    3  * The template for displaying all pages.
     3 * The Header template for our theme.
    44 *
    5  * This is the template that displays all pages by default.
    6  * Please note that this is the WordPress construct of pages
    7  * and that other 'pages' on your WordPress site may use a
    8  * different template.
     5 * Displays all of the <head> section and everything up till <div id="content">
    96 *
    107 * @link https://codex.wordpress.org/Template_Hierarchy
    118 *
    12  * @package WordPressdotorg\Plugin_Directory\Theme
     9 * @package WordPressdotorg\Theme
    1310 */
    1411
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg/inc/footer.php

    r6144 r6277  
    99 * @package WordPressdotorg\Theme
    1010 */
     11
    1112?>
    1213
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg/inc/header.php

    r6144 r6277  
    1111
    1212namespace WordPressdotorg\Theme;
     13
    1314?>
    1415<!doctype html>
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg/inc/template-tags.php

    r6149 r6277  
    99
    1010if ( ! function_exists( __NAMESPACE__ . '\entry_meta' ) ) :
    11 /**
    12  * Prints HTML with meta information for the categories, tags.
    13  *
    14  * Create your own  WordPressdotorg\Theme\entry_meta() function to override in a child theme.
    15  */
    16 function entry_meta() {
    17         if ( in_array( get_post_type(), array( 'post', 'attachment' ) ) ) {
    18                 $time_string = sprintf( '<a href="%1$s" rel="bookmark">%2$s</a>',
    19                         esc_url( get_permalink() ),
    20                         get_entry_date()
    21                 );
     11        /**
     12         * Prints HTML with meta information for the categories, tags.
     13         *
     14         * Create your own  WordPressdotorg\Theme\entry_meta() function to override in a child theme.
     15         */
     16        function entry_meta() {
     17                if ( in_array( get_post_type(), array( 'post', 'attachment' ), true ) ) {
     18                        $time_string = sprintf(
     19                                '<a href="%1$s" rel="bookmark">%2$s</a>',
     20                                esc_url( get_permalink() ),
     21                                get_entry_date()
     22                        );
    2223
    23                 $author_string = sprintf(
    24                         '<span class="entry-author vcard"><a class="url fn n" href="%1$s">%2$s</a></span>',
    25                         esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
    26                         get_the_author()
    27                 );
     24                        $author_string = sprintf(
     25                                '<span class="entry-author vcard"><a class="url fn n" href="%1$s">%2$s</a></span>',
     26                                esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
     27                                get_the_author()
     28                        );
    2829
    29                 printf(
    30                         /* translators: 1: post date 2: post author */
    31                         '<span class="posted-on">' . __( 'Posted on %1$s by %2$s.', 'wporg' ) . '</span>',
    32                         $time_string,
    33                         $author_string
    34                 );
     30                        // phpcs:disable WordPress.XSS.EscapeOutput.OutputNotEscaped
     31                        printf(
     32                                /* translators: 1: post date 2: post author */
     33                                '<span class="posted-on">' . __( 'Posted on %1$s by %2$s.', 'wporg' ) . '</span>',
     34                                $time_string,
     35                                $author_string
     36                        );
     37                        // phpcs:enable WordPress.XSS.EscapeOutput.OutputNotEscaped
     38                }
     39
     40                $format = get_post_format();
     41                if ( current_theme_supports( 'post-formats', $format ) ) {
     42                        printf(
     43                                '<span class="entry-format">%1$s<a href="%2$s">%3$s</a></span>',
     44                                sprintf( '<span class="screen-reader-text">%s </span>', esc_html_x( 'Format', 'Used before post format.', 'wporg' ) ),
     45                                esc_url( get_post_format_link( $format ) ),
     46                                esc_html( get_post_format_string( $format ) )
     47                        );
     48                }
     49
     50                if ( 'post' === get_post_type() ) {
     51                        entry_taxonomies();
     52                }
     53
     54                if ( ! is_singular() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) {
     55                        echo '<span class="comments-link">';
     56                        comments_popup_link( sprintf(
     57                                /* translators: Post title. */
     58                                __( 'Leave a comment<span class="screen-reader-text"> on %s</span>', 'wporg' ),
     59                                get_the_title()
     60                        ) );
     61                        echo '</span>';
     62                }
    3563        }
    36 
    37         $format = get_post_format();
    38         if ( current_theme_supports( 'post-formats', $format ) ) {
    39                 printf( '<span class="entry-format">%1$s<a href="%2$s">%3$s</a></span>',
    40                         sprintf( '<span class="screen-reader-text">%s </span>', _x( 'Format', 'Used before post format.', 'wporg' ) ),
    41                         esc_url( get_post_format_link( $format ) ),
    42                         get_post_format_string( $format )
    43                 );
    44         }
    45 
    46         if ( 'post' === get_post_type() ) {
    47                 entry_taxonomies();
    48         }
    49 
    50         if ( ! is_singular() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) {
    51                 echo '<span class="comments-link">';
    52                 comments_popup_link( sprintf( __( 'Leave a comment<span class="screen-reader-text"> on %s</span>', 'wporg' ), get_the_title() ) );
    53                 echo '</span>';
    54         }
    55 }
    5664endif;
    5765
     
    6977                }
    7078
    71                 return sprintf( $time_string,
     79                return sprintf(
     80                        $time_string,
    7281                        esc_attr( get_the_date( 'c' ) ),
    7382                        get_the_date(),
     
    8594         */
    8695        function entry_date() {
    87                 printf( '<span class="posted-on">%1$s <a href="%2$s" rel="bookmark">%3$s</a></span>',
    88                         _x( 'Posted on', 'Used before publish date.', 'wporg' ),
     96                printf(
     97                        '<span class="posted-on">%1$s <a href="%2$s" rel="bookmark">%3$s</a></span>',
     98                        esc_html_x( 'Posted on', 'Used before publish date.', 'wporg' ),
    8999                        esc_url( get_permalink() ),
    90                         get_entry_date()
     100                        get_entry_date() // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped
    91101                );
    92102        }
     
    94104
    95105if ( ! function_exists( __NAMESPACE__ . '\entry_taxonomies' ) ) :
    96 /**
    97  * Prints HTML with category and tags for current post.
    98  *
    99  * Create your own WordPressdotorg\Theme\entry_taxonomies() function to override in a child theme.
    100  */
    101 function entry_taxonomies() {
    102         $categories_list = get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'wporg' ) );
    103         if ( $categories_list && categorized_blog() ) {
    104                 printf( '<span class="cat-links"><span class="screen-reader-text">%1$s </span>%2$s</span>',
    105                         _x( 'Categories', 'Used before category names.', 'wporg' ),
    106                         $categories_list
    107                 );
     106        /**
     107         * Prints HTML with category and tags for current post.
     108         *
     109         * Create your own WordPressdotorg\Theme\entry_taxonomies() function to override in a child theme.
     110         */
     111        function entry_taxonomies() {
     112                $categories_list = get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'wporg' ) );
     113                if ( $categories_list && categorized_blog() ) {
     114                        printf(
     115                                '<span class="cat-links"><span class="screen-reader-text">%1$s </span>%2$s</span>',
     116                                esc_html_x( 'Categories', 'Used before category names.', 'wporg' ),
     117                                $categories_list // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped
     118                        );
     119                }
     120
     121                $tags_list = get_the_tag_list( '', _x( ', ', 'Used between list items, there is a space after the comma.', 'wporg' ) );
     122                if ( $tags_list ) {
     123                        printf(
     124                                '<span class="tags-links"><span class="screen-reader-text">%1$s </span>%2$s</span>',
     125                                esc_html_x( 'Tags', 'Used before tag names.', 'wporg' ),
     126                                $tags_list // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped
     127                        );
     128                }
    108129        }
    109 
    110         $tags_list = get_the_tag_list( '', _x( ', ', 'Used between list items, there is a space after the comma.', 'wporg' ) );
    111         if ( $tags_list ) {
    112                 printf( '<span class="tags-links"><span class="screen-reader-text">%1$s </span>%2$s</span>',
    113                         _x( 'Tags', 'Used before tag names.', 'wporg' ),
    114                         $tags_list
    115                 );
    116         }
    117 }
    118130endif;
    119131
    120132if ( ! function_exists( __NAMESPACE__ . '\categorized_blog' ) ) :
    121 /**
    122  * Determines whether blog/site has more than one category.
    123  *
    124  * Create your own  WordPressdotorg\Theme\categorized_blog() function to override in a child theme.
    125  *
    126  * @return bool True if there is more than one category, false otherwise.
    127  */
    128 function categorized_blog() {
    129         if ( false === ( $all_the_cool_cats = get_transient( 'wporg_categories' ) ) ) {
    130                 // Create an array of all the categories that are attached to posts.
    131                 $all_the_cool_cats = get_categories( array(
    132                         'fields'     => 'ids',
    133                         // We only need to know if there is more than one category.
    134                         'number'     => 2,
    135                 ) );
     133        /**
     134         * Determines whether blog/site has more than one category.
     135         *
     136         * Create your own  WordPressdotorg\Theme\categorized_blog() function to override in a child theme.
     137         *
     138         * @return bool True if there is more than one category, false otherwise.
     139         */
     140        function categorized_blog() {
     141                $all_the_cool_cats = get_transient( 'wporg_categories' );
    136142
    137                 // Count the number of categories that are attached to the posts.
    138                 $all_the_cool_cats = count( $all_the_cool_cats );
     143                if ( false === $all_the_cool_cats ) {
     144                        // Create an array of all the categories that are attached to posts.
     145                        $all_the_cool_cats = get_categories( array(
     146                                'fields' => 'ids',
     147                                // We only need to know if there is more than one category.
     148                                'number' => 2,
     149                        ) );
    139150
    140                 set_transient( 'wporg_categories', $all_the_cool_cats );
     151                        // Count the number of categories that are attached to the posts.
     152                        $all_the_cool_cats = count( $all_the_cool_cats );
     153
     154                        set_transient( 'wporg_categories', $all_the_cool_cats );
     155                }
     156
     157                if ( $all_the_cool_cats > 1 ) {
     158                        // This blog has more than 1 category so wporg_categorized_blog should return true.
     159                        return true;
     160                } else {
     161                        // This blog has only 1 category so wporg_categorized_blog should return false.
     162                        return false;
     163                }
    141164        }
    142 
    143         if ( $all_the_cool_cats > 1 ) {
    144                 // This blog has more than 1 category so wporg_categorized_blog should return true.
    145                 return true;
    146         } else {
    147                 // This blog has only 1 category so wporg_categorized_blog should return false.
    148                 return false;
    149         }
    150 }
    151165endif;
    152166
     
    163177}
    164178add_action( 'edit_category', __NAMESPACE__ . '\category_transient_flusher' );
    165 add_action( 'save_post',     __NAMESPACE__ . '\category_transient_flusher' );
     179add_action( 'save_post', __NAMESPACE__ . '\category_transient_flusher' );
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg/index.php

    r6201 r6277  
    1515namespace WordPressdotorg\Theme;
    1616
    17 get_header(); ?>
     17get_header();
     18?>
    1819
    1920        <main id="main" class="site-main col-9" role="main">
     
    3839        </main><!-- #main -->
    3940
    40         <?php
     41<?php
    4142get_sidebar();
    4243get_footer();
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg/js/customizer.js

    r3879 r6277  
    33 *
    44 * Theme Customizer enhancements for a better user experience.
     5 * Contains handlers to make Theme Customizer preview reload changes asynchronously.
    56 *
    6  * Contains handlers to make Theme Customizer preview reload changes asynchronously.
     7 * @package WordPressdotorg\Theme
    78 */
    89
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg/js/navigation.js

    r3879 r6277  
    44 * Handles toggling the navigation menu for small screens and enables TAB key
    55 * navigation support for dropdown menus.
     6 *
     7 * @package WordPressdotorg\Theme
    68 */
     9
    710( function() {
    811        var container, button, menu, links, subMenus, i, len;
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg/js/skip-link-focus-fix.js

    r3879 r6277  
    33 *
    44 * Helps with accessibility for keyboard only users.
     5 * Learn more: https://git.io/vWdr2
    56 *
    6  * Learn more: https://git.io/vWdr2
     7 * @package WordPressdotorg\Theme
    78 */
     9
    810( function() {
    911        var isWebkit = navigator.userAgent.toLowerCase().indexOf( 'webkit' ) > -1,
    10             isOpera  = navigator.userAgent.toLowerCase().indexOf( 'opera' ) > -1,
    11             isIe     = navigator.userAgent.toLowerCase().indexOf( 'msie' )  > -1;
     12                isOpera  = navigator.userAgent.toLowerCase().indexOf( 'opera' ) > -1,
     13                isIe     = navigator.userAgent.toLowerCase().indexOf( 'msie' ) > -1;
    1214
    1315        if ( ( isWebkit || isOpera || isIe ) && document.getElementById && window.addEventListener ) {
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg/page.php

    r6058 r6277  
    1515namespace WordPressdotorg\Theme;
    1616
    17 get_header( 'page' ); ?>
     17get_header();
     18?>
    1819
    1920        <main id="main" class="site-main col-12" role="main">
    2021
    2122                <?php
    22                 while ( have_posts() ) : the_post();
     23                while ( have_posts() ) :
     24                        the_post();
    2325
    2426                        get_template_part( 'template-parts/content', 'page' );
     
    2830        </main><!-- #main -->
    2931
    30         <?php
     32<?php
    3133get_footer();
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg/search.php

    r6257 r6277  
    1717
    1818                        <header class="page-header">
    19                                 <h1 class="page-title"><?php printf( __( 'Search Results for: %s', 'wporg' ), get_search_query() ); ?></h1>
     19                                <h1 class="page-title">
     20                                        <?php
     21                                        printf(
     22                                                /* translators: Search query. */
     23                                                esc_html__( 'Search Results for: %s', 'wporg' ),
     24                                                get_search_query()
     25                                        );
     26                                        ?>
     27                                </h1>
    2028                        </header><!-- .page-header -->
    2129
     
    3139                                </header><!-- .entry-header -->
    3240
    33                                 <?php if ( 'post' == get_post_type() ) : ?>
     41                                <?php if ( 'post' === get_post_type() ) : ?>
    3442                                        <div class="entry-meta"><?php entry_meta(); ?></div>
    3543                                <?php endif; ?>
     
    4351                                        edit_post_link(
    4452                                                sprintf(
    45                                                 /* translators: %s: Name of current post */
     53                                                        /* translators: %s: Name of current post */
    4654                                                        __( 'Edit<span class="screen-reader-text"> "%s"</span>', 'wporg' ),
    4755                                                        get_the_title()
     
    6068                        the_posts_pagination();
    6169
    62                 // If no content, include the "No posts found" template.
     70                        // If no content, include the "No posts found" template.
    6371                else :
    6472                        get_template_part( 'template-parts/content', 'none' );
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg/sidebar.php

    r6200 r6277  
    1414<aside id="secondary" class="widget-area col-3">
    1515        <div class="widget">
    16                 <h4><?php _e( 'Categories', 'wporg' ); ?></h4>
     16                <h4><?php esc_html_e( 'Categories', 'wporg' ); ?></h4>
    1717                <ul>
    1818                        <?php wp_list_categories( 'title_li=&show_count=1&orderby=count&order=DESC&number=10' ); ?>
     
    2121
    2222        <div class="widget">
    23                 <h4><?php _e( 'Blog Archives', 'wporg' ); ?></h4>
     23                <h4><?php esc_html_e( 'Blog Archives', 'wporg' ); ?></h4>
    2424                <ul>
    2525                        <?php wp_get_archives( 'type=monthly&limit=12' ); ?>
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg/single.php

    r5942 r6277  
    1010namespace WordPressdotorg\Theme;
    1111
    12 get_header( 'page' ); ?>
     12get_header();
     13?>
    1314
    1415        <main id="main" class="site-main col-8" role="main">
    1516
    1617                <?php
    17                         while ( have_posts() ) :
    18                                 the_post();
     18                while ( have_posts() ) :
     19                        the_post();
    1920
    20                                 get_template_part( 'template-parts/content', 'single' );
     21                        get_template_part( 'template-parts/content', 'single' );
    2122
    22                                 // If comments are open or we have at least one comment, load up the comment template.
    23                                 if ( comments_open() || get_comments_number() ) :
    24                                         comments_template();
    25                                 endif;
     23                        // If comments are open or we have at least one comment, load up the comment template.
     24                        if ( comments_open() || get_comments_number() ) :
     25                                comments_template();
     26                        endif;
    2627
    27                                 // Previous/next post navigation.
    28                                 the_post_navigation( array(
    29                                         'next_text' => '<span class="meta-nav" aria-hidden="true">' . __( 'Next', 'wporg' ) . '</span> ' .
    30                                                        '<span class="screen-reader-text">' . __( 'Next post:', 'wporg' ) . '</span> ' .
    31                                                        '<span class="post-title">%title</span>',
    32                                         'prev_text' => '<span class="meta-nav" aria-hidden="true">' . __( 'Previous', 'wporg' ) . '</span> ' .
    33                                                        '<span class="screen-reader-text">' . __( 'Previous post:', 'wporg' ) . '</span> ' .
    34                                                        '<span class="post-title">%title</span>',
    35                                 ) );
     28                        // Previous/next post navigation.
     29                        the_post_navigation( [
     30                                // phpcs:disable WordPress.WhiteSpace.PrecisionAlignment.Found
     31                                'next_text' => '<span class="meta-nav" aria-hidden="true">' . __( 'Next', 'wporg' ) . '</span> ' .
     32                                                           '<span class="screen-reader-text">' . __( 'Next post:', 'wporg' ) . '</span> ' .
     33                                                           '<span class="post-title">%title</span>',
     34                                'prev_text' => '<span class="meta-nav" aria-hidden="true">' . __( 'Previous', 'wporg' ) . '</span> ' .
     35                                                           '<span class="screen-reader-text">' . __( 'Previous post:', 'wporg' ) . '</span> ' .
     36                                                           '<span class="post-title">%title</span>',
     37                                // phpcs:enable WordPress.WhiteSpace.PrecisionAlignment.Found
     38                        ] );
    3639                        endwhile; // End of the loop.
    3740                ?>
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg/style.css

    r3879 r6277  
     1/* phpcs:ignoreFile */
    12/*!
    23Theme Name: WordPress.org
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg/template-parts/content-none.php

    r5892 r6277  
    55 * @package WordPressdotorg\Theme
    66 */
     7
    78?>
    89
    910<section class="no-results not-found">
    1011        <header class="page-header">
    11                 <h1 class="page-title"><?php _e( 'Nothing Found', 'wporg' ); ?></h1>
     12                <h1 class="page-title"><?php esc_html_e( 'Nothing Found', 'wporg' ); ?></h1>
    1213        </header><!-- .page-header -->
    1314
     
    1516                <?php if ( is_home() && current_user_can( 'publish_posts' ) ) : ?>
    1617
    17                         <p><?php printf( __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'wporg' ), esc_url( admin_url( 'post-new.php' ) ) ); ?></p>
     18                        <p>
     19                                <?php
     20                                printf(
     21                                        /* translators: Link to post editor. */
     22                                        __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'wporg' ), // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped
     23                                        esc_url( admin_url( 'post-new.php' ) )
     24                                );
     25                                ?>
     26                        </p>
    1827
    1928                <?php elseif ( is_search() ) : ?>
    2029
    21                         <p><?php _e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'wporg' ); ?></p>
     30                        <p><?php esc_html_e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'wporg' ); ?></p>
    2231                        <?php get_search_form(); ?>
    2332
    2433                <?php else : ?>
    2534
    26                         <p><?php _e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'wporg' ); ?></p>
     35                        <p><?php esc_html_e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'wporg' ); ?></p>
    2736                        <?php get_search_form(); ?>
    2837
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg/template-parts/content-page.php

    r5893 r6277  
    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' ),
    3434                                the_title( '<span class="screen-reader-text">"', '"</span>', false )
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg/template-parts/content.php

    r5942 r6277  
    77
    88namespace WordPressdotorg\Theme;
     9
    910?>
    1011
     
    1213        <header class="entry-header">
    1314                <?php if ( is_sticky() && is_home() && ! is_paged() ) : ?>
    14                         <span class="sticky-post"><?php _e( 'Featured', 'wporg' ); ?></span>
     15                        <span class="sticky-post"><?php esc_html_e( 'Featured', 'wporg' ); ?></span>
    1516                <?php
    1617                endif;
    1718
    18                 if ( is_single() ) :
     19                if ( is_single() ) : // phpcs:ignore Generic.WhiteSpace.ScopeIndent.IncorrectExact
    1920                        the_title( '<h2 class="entry-title">', '</h2>' );
    2021                else :
     
    2829        <div class="entry-content">
    2930                <?php
    30                         /* translators: %s: Name of current post */
    3131                        the_content( sprintf(
     32                                /* translators: %s: Name of current post */
    3233                                __( 'Continue reading<span class="screen-reader-text"> "%s"</span> &rarr;', 'wporg' ),
    3334                                get_the_title()
Note: See TracChangeset for help on using the changeset viewer.