Skip to content

Commit bc3a185

Browse files
Twenty Nineteen: Document the twentynineteen_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 [43808]. Props viralsampat, pmbaldha, sabernhardt. See #63664. git-svn-id: https://develop.svn.wordpress.org/trunk@61064 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 9824c6f commit bc3a185

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -242,9 +242,13 @@ function twentynineteen_excerpt_more( $link ) {
242242
* @global int $content_width Content width.
243243
*/
244244
function twentynineteen_content_width() {
245-
// This variable is intended to be overruled from themes.
246-
// Open WPCS issue: {@link https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/1043}.
247-
// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound
245+
/**
246+
* Filters Twenty Nineteen content width of the theme.
247+
*
248+
* @since Twenty Nineteen 1.0
249+
*
250+
* @param int $content_width Content width in pixels.
251+
*/
248252
$GLOBALS['content_width'] = apply_filters( 'twentynineteen_content_width', 640 );
249253
}
250254
add_action( 'after_setup_theme', 'twentynineteen_content_width', 0 );

0 commit comments

Comments
 (0)