WordPress.org

Make WordPress Core

Changeset 49286


Ignore:
Timestamp:
10/23/2020 05:17:52 PM (3 months ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Split long printf() calls for search results for better readability.

Follow-up to [49284].

See #37353.

Location:
trunk/src/wp-admin
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/edit-tags.php

    r49284 r49286  
    339339<?php
    340340if ( isset( $_REQUEST['s'] ) && strlen( $_REQUEST['s'] ) ) {
    341     /* translators: %s: Search query. */
    342     printf( '<span class="subtitle">' . __( 'Search results for: %s' ) . '</span>', '<strong>' . esc_html( wp_unslash( $_REQUEST['s'] ) ) . '</strong>' );
     341    echo '<span class="subtitle">';
     342    printf(
     343        /* translators: %s: Search query. */
     344        __( 'Search results for: %s' ),
     345        '<strong>' . esc_html( wp_unslash( $_REQUEST['s'] ) ) . '</strong>'
     346    );
     347    echo '</span>';
    343348}
    344349?>
  • trunk/src/wp-admin/edit.php

    r49284 r49286  
    407407
    408408if ( isset( $_REQUEST['s'] ) && strlen( $_REQUEST['s'] ) ) {
    409     /* translators: %s: Search query. */
    410     printf( ' <span class="subtitle">' . __( 'Search results for: %s' ) . '</span>', '<strong>' . get_search_query() . '</strong>' );
     409    echo '<span class="subtitle">';
     410    printf(
     411        /* translators: %s: Search query. */
     412        __( 'Search results for: %s' ),
     413        '<strong>' . get_search_query() . '</strong>'
     414    );
     415    echo '</span>';
    411416}
    412417?>
  • trunk/src/wp-admin/link-manager.php

    r49284 r49286  
    105105<?php
    106106if ( isset( $_REQUEST['s'] ) && strlen( $_REQUEST['s'] ) ) {
    107     /* translators: %s: Search query. */
    108     printf( '<span class="subtitle">' . __( 'Search results for: %s' ) . '</span>', '<strong>' . esc_html( wp_unslash( $_REQUEST['s'] ) ) . '</strong>' );
     107    echo '<span class="subtitle">';
     108    printf(
     109        /* translators: %s: Search query. */
     110        __( 'Search results for: %s' ),
     111        '<strong>' . esc_html( wp_unslash( $_REQUEST['s'] ) ) . '</strong>'
     112    );
     113    echo '</span>';
    109114}
    110115?>
  • trunk/src/wp-admin/network/sites.php

    r49284 r49286  
    372372<?php
    373373if ( isset( $_REQUEST['s'] ) && strlen( $_REQUEST['s'] ) ) {
    374     /* translators: %s: Search query. */
    375     printf( '<span class="subtitle">' . __( 'Search results for: %s' ) . '</span>', '<strong>' . esc_html( $s ) . '</strong>' );
     374    echo '<span class="subtitle">';
     375    printf(
     376        /* translators: %s: Search query. */
     377        __( 'Search results for: %s' ),
     378        '<strong>' . esc_html( $s ) . '</strong>'
     379    );
     380    echo '</span>';
    376381}
    377382?>
  • trunk/src/wp-admin/network/themes.php

    r49284 r49286  
    353353<?php
    354354if ( isset( $_REQUEST['s'] ) && strlen( $_REQUEST['s'] ) ) {
    355     /* translators: %s: Search query. */
    356     printf( '<span class="subtitle">' . __( 'Search results for: %s' ) . '</span>', '<strong>' . esc_html( $s ) . '</strong>' );
     355    echo '<span class="subtitle">';
     356    printf(
     357        /* translators: %s: Search query. */
     358        __( 'Search results for: %s' ),
     359        '<strong>' . esc_html( $s ) . '</strong>'
     360    );
     361    echo '</span>';
    357362}
    358363?>
  • trunk/src/wp-admin/network/users.php

    r49284 r49286  
    279279
    280280    if ( strlen( $usersearch ) ) {
    281         /* translators: %s: Search query. */
    282         printf( '<span class="subtitle">' . __( 'Search results for: %s' ) . '</span>', '<strong>' . esc_html( $usersearch ) . '</strong>' );
     281        echo '<span class="subtitle">';
     282        printf(
     283            /* translators: %s: Search query. */
     284            __( 'Search results for: %s' ),
     285            '<strong>' . esc_html( $usersearch ) . '</strong>'
     286        );
     287        echo '</span>';
    283288    }
    284289    ?>
  • trunk/src/wp-admin/plugins.php

    r49284 r49286  
    728728
    729729if ( strlen( $s ) ) {
    730     /* translators: %s: Search query. */
    731     printf( '<span class="subtitle">' . __( 'Search results for: %s' ) . '</span>', '<strong>' . esc_html( urldecode( $s ) ) . '</strong>' );
     730    echo '<span class="subtitle">';
     731    printf(
     732        /* translators: %s: Search query. */
     733        __( 'Search results for: %s' ),
     734        '<strong>' . esc_html( urldecode( $s ) ) . '</strong>'
     735    );
     736    echo '</span>';
    732737}
    733738?>
  • trunk/src/wp-admin/upload.php

    r49284 r49286  
    276276
    277277if ( isset( $_REQUEST['s'] ) && strlen( $_REQUEST['s'] ) ) {
    278     /* translators: %s: Search query. */
    279     printf( '<span class="subtitle">' . __( 'Search results for: %s' ) . '</span>', '<strong>' . get_search_query() . '</strong>' );
     278    echo '<span class="subtitle">';
     279    printf(
     280        /* translators: %s: Search query. */
     281        __( 'Search results for: %s' ),
     282        '<strong>' . get_search_query() . '</strong>'
     283    );
     284    echo '</span>';
    280285}
    281286?>
  • trunk/src/wp-admin/users.php

    r49284 r49286  
    571571
    572572if ( strlen( $usersearch ) ) {
    573     /* translators: %s: Search query. */
    574     printf( '<span class="subtitle">' . __( 'Search results for: %s' ) . '</span>', '<strong>' . esc_html( $usersearch ) . '</strong>' );
     573    echo '<span class="subtitle">';
     574    printf(
     575        /* translators: %s: Search query. */
     576        __( 'Search results for: %s' ),
     577        '<strong>' . esc_html( $usersearch ) . '</strong>'
     578    );
     579    echo '</span>';
    575580}
    576581?>
Note: See TracChangeset for help on using the changeset viewer.