Make WordPress Core

Changeset 61064


Ignore:
Timestamp:
10/26/2025 04:57:21 PM (3 weeks ago)
Author:
SergeyBiryukov
Message:

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

Follow-up to [43808].

Props viralsampat, pmbaldha, sabernhardt.
See #63664.

File:
1 edited

Legend:

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

    r60535 r61064  
    243243 */
    244244function 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}
Note: See TracChangeset for help on using the changeset viewer.