Skip to content

Commit 04c61fa

Browse files
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 [WordPress/WordPress-Coding-Standards#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. git-svn-id: https://develop.svn.wordpress.org/trunk@61070 602fd350-edb4-49c9-b593-d223f7449a82
1 parent cfb22b0 commit 04c61fa

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/wp-content/themes/twentytwentyone/functions.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -375,9 +375,13 @@ function twenty_twenty_one_widgets_init() {
375375
* @return void
376376
*/
377377
function twenty_twenty_one_content_width() {
378-
// This variable is intended to be overruled from themes.
379-
// Open WPCS issue: {@link https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/1043}.
380-
// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound
378+
/**
379+
* Filters Twenty Twenty-One content width of the theme.
380+
*
381+
* @since Twenty Twenty-One 1.0
382+
*
383+
* @param int $content_width Content width in pixels.
384+
*/
381385
$GLOBALS['content_width'] = apply_filters( 'twenty_twenty_one_content_width', 750 );
382386
}
383387
add_action( 'after_setup_theme', 'twenty_twenty_one_content_width', 0 );

0 commit comments

Comments
 (0)