WordPress.org

Make WordPress Core

Ticket #43764: 43764.patch

File 43764.patch, 2.4 KB (added by marcomartins, 3 years ago)
  • src/wp-admin/admin-header.php

    From 299c94dd527d2536ea9bb2c641611169428972cd Mon Sep 17 00:00:00 2001
    From: Marco Martins <marcomartins@fimdalinha.com>
    Date: Fri, 13 Apr 2018 17:10:47 +0300
    Subject: [PATCH] Fix CS violations for admin-header.php
    
    ---
     src/wp-admin/admin-header.php | 13 +++++++------
     1 file changed, 7 insertions(+), 6 deletions(-)
    
    diff --git a/src/wp-admin/admin-header.php b/src/wp-admin/admin-header.php
    index 5322e2bb65..9130c766f6 100644
    a b  
    66 * @subpackage Administration
    77 */
    88
    9 @header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) );
     9@header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) ); // phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged
    1010if ( ! defined( 'WP_ADMIN' ) ) {
    1111        require_once( dirname( __FILE__ ) . '/admin.php' );
    1212}
    if ( empty( $current_screen ) ) { 
    3232}
    3333
    3434get_admin_page_title();
    35 $title = esc_html( strip_tags( $title ) );
     35$title = esc_html( strip_tags( $title ) ); // phpcs:ignore WordPress.Variables.GlobalVariables.OverrideProhibited
    3636
    3737if ( is_network_admin() ) {
    3838        /* translators: Network admin screen title. %s: Network name */
    do_action( 'admin_enqueue_scripts', $hook_suffix ); 
    103103 *
    104104 * @since 2.6.0
    105105 */
    106 do_action( "admin_print_styles-{$hook_suffix}" );
     106do_action( "admin_print_styles-{$hook_suffix}" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
    107107
    108108/**
    109109 * Fires when styles are printed for all admin pages.
    do_action( 'admin_print_styles' ); 
    117117 *
    118118 * @since 2.1.0
    119119 */
    120 do_action( "admin_print_scripts-{$hook_suffix}" );
     120do_action( "admin_print_scripts-{$hook_suffix}" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
     121
    121122
    122123/**
    123124 * Fires when scripts are printed for all admin pages.
    do_action( 'admin_print_scripts' ); 
    134135 *
    135136 * @since 2.1.0
    136137 */
    137 do_action( "admin_head-{$hook_suffix}" );
     138do_action( "admin_head-{$hook_suffix}" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
    138139
    139140/**
    140141 * Fires in head section for all admin pages.
    if ( is_network_admin() ) { 
    274275 */
    275276do_action( 'all_admin_notices' );
    276277
    277 if ( $parent_file == 'options-general.php' ) {
     278if ( 'options-general.php' === $parent_file ) {
    278279        require( ABSPATH . 'wp-admin/options-head.php' );
    279280}