Make WordPress Core

Changeset 61070


Ignore:
Timestamp:
10/27/2025 11:15:03 AM (2 weeks ago)
Author:
SergeyBiryukov
Message:

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 indicates that the test now makes an exception for $content_width.

Follow-up to [49216].

Props viralsampat, pmbaldha, sabernhardt.
Fixes #63664.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentytwentyone/functions.php

    r60913 r61070  
    376376 */
    377377function 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}
Note: See TracChangeset for help on using the changeset viewer.