diff --git a/functions.php b/functions.php index aea2ddad..b7134e76 100644 --- a/functions.php +++ b/functions.php @@ -91,6 +91,9 @@ add_action( 'after_setup_theme', '_s_setup' ); * @global int $content_width */ function _s_content_width() { + // This variable is intended to be overruled from themes. + // Open WPCS issue: {@link https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/1043}. + // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound $GLOBALS['content_width'] = apply_filters( '_s_content_width', 640 ); } add_action( 'after_setup_theme', '_s_content_width', 0 ); diff --git a/inc/wpcom.php b/inc/wpcom.php index 9439440b..9064c5e5 100644 --- a/inc/wpcom.php +++ b/inc/wpcom.php @@ -17,6 +17,8 @@ function _s_wpcom_setup() { // Set theme colors for third party services. if ( ! isset( $themecolors ) ) { + // Whitelist wpcom specific variable intended to be overruled. + // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound $themecolors = array( 'bg' => '', 'border' => '',