Twenty Twenty-One: Document the twenty_twenty_one_content_width filter.
Includes removing an unnecessary PHPCS ignore annotation. The linked WPCS issue is not open anymore, and [https://github.com/WordPress/WordPress-Coding-Standards/pull/1773 WordPress/WordPress-Coding-Standards#1773] indicates that the test now makes an exception for `$content_width`. Follow-up to [49216]. Props viralsampat, pmbaldha, sabernhardt. Fixes #63664. Built from https://develop.svn.wordpress.org/trunk@61070 git-svn-id: http://core.svn.wordpress.org/trunk@60406 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -375,9 +375,13 @@ add_action( 'widgets_init', 'twenty_twenty_one_widgets_init' );
|
||||
* @return void
|
||||
*/
|
||||
function twenty_twenty_one_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
|
||||
/**
|
||||
* Filters Twenty Twenty-One content width of the theme.
|
||||
*
|
||||
* @since Twenty Twenty-One 1.0
|
||||
*
|
||||
* @param int $content_width Content width in pixels.
|
||||
*/
|
||||
$GLOBALS['content_width'] = apply_filters( 'twenty_twenty_one_content_width', 750 );
|
||||
}
|
||||
add_action( 'after_setup_theme', 'twenty_twenty_one_content_width', 0 );
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.9-beta1-61069';
|
||||
$wp_version = '6.9-beta1-61070';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
||||
Reference in New Issue
Block a user