From 0311bf4f50e53c5d5a43d0ab68652977abea9a23 Mon Sep 17 00:00:00 2001
From: Marco Martins <marcomartins@fimdalinha.com>
Date: Fri, 13 Apr 2018 18:04:50 +0300
Subject: [PATCH] Fix CS violations for admin-header.php
---
src/wp-admin/admin-header.php | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/wp-admin/admin-header.php b/src/wp-admin/admin-header.php
index 5322e2bb65..5386eb9fdf 100644
a
|
b
|
|
6 | 6 | * @subpackage Administration |
7 | 7 | */ |
8 | 8 | |
| 9 | // phpcs:ignore Generic.PHP.NoSilencedErrors.Discouraged |
9 | 10 | @header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) ); |
10 | 11 | if ( ! defined( 'WP_ADMIN' ) ) { |
11 | 12 | require_once( dirname( __FILE__ ) . '/admin.php' ); |
… |
… |
if ( empty( $current_screen ) ) { |
32 | 33 | } |
33 | 34 | |
34 | 35 | get_admin_page_title(); |
| 36 | // phpcs:ignore WordPress.Variables.GlobalVariables.OverrideProhibited -- allow existing globals |
35 | 37 | $title = esc_html( strip_tags( $title ) ); |
36 | 38 | |
37 | 39 | if ( is_network_admin() ) { |
… |
… |
var ajaxurl = '<?php echo admin_url( 'admin-ajax.php', 'relative' ); ?>', |
98 | 100 | */ |
99 | 101 | do_action( 'admin_enqueue_scripts', $hook_suffix ); |
100 | 102 | |
| 103 | // phpcs:disable WordPress.NamingConventions.ValidHookName.UseUnderscores -- allow for dash for dynamic hooks |
101 | 104 | /** |
102 | 105 | * Fires when styles are printed for a specific admin page based on $hook_suffix. |
103 | 106 | * |
104 | 107 | * @since 2.6.0 |
105 | 108 | */ |
106 | 109 | do_action( "admin_print_styles-{$hook_suffix}" ); |
| 110 | // phpcs:enable |
107 | 111 | |
108 | 112 | /** |
109 | 113 | * Fires when styles are printed for all admin pages. |
… |
… |
do_action( "admin_print_styles-{$hook_suffix}" ); |
112 | 116 | */ |
113 | 117 | do_action( 'admin_print_styles' ); |
114 | 118 | |
| 119 | // phpcs:disable WordPress.NamingConventions.ValidHookName.UseUnderscores -- allow for dash for dynamic hooks |
115 | 120 | /** |
116 | 121 | * Fires when scripts are printed for a specific admin page based on $hook_suffix. |
117 | 122 | * |
118 | 123 | * @since 2.1.0 |
119 | 124 | */ |
120 | 125 | do_action( "admin_print_scripts-{$hook_suffix}" ); |
| 126 | //phpcs:enable |
121 | 127 | |
122 | 128 | /** |
123 | 129 | * Fires when scripts are printed for all admin pages. |
… |
… |
do_action( "admin_print_scripts-{$hook_suffix}" ); |
126 | 132 | */ |
127 | 133 | do_action( 'admin_print_scripts' ); |
128 | 134 | |
| 135 | // phpcs:disable WordPress.NamingConventions.ValidHookName.UseUnderscores -- allow for dash for dynamic hooks |
129 | 136 | /** |
130 | 137 | * Fires in head section for a specific admin page. |
131 | 138 | * |
… |
… |
do_action( 'admin_print_scripts' ); |
135 | 142 | * @since 2.1.0 |
136 | 143 | */ |
137 | 144 | do_action( "admin_head-{$hook_suffix}" ); |
| 145 | // phpcs:enable |
138 | 146 | |
139 | 147 | /** |
140 | 148 | * Fires in head section for all admin pages. |
… |
… |
if ( is_network_admin() ) { |
274 | 282 | */ |
275 | 283 | do_action( 'all_admin_notices' ); |
276 | 284 | |
277 | | if ( $parent_file == 'options-general.php' ) { |
| 285 | if ( 'options-general.php' === $parent_file ) { |
278 | 286 | require( ABSPATH . 'wp-admin/options-head.php' ); |
279 | 287 | } |