apply_filters( 'twenty_twenty_one_content_width', int $content_width )
- Since
- Twenty Twenty-One 1.0
Filters Twenty Twenty-One content width of the theme.
Compatibility
- WordPress
- since Twenty Twenty-One 1.0
- 6.7.10
- 6.8.11
- 6.9.10
- 7.0.7
- 7.1.3
Present in every tracked release (6.7.10 to 7.1.3).
Parameters
$content_widthint- Content width in pixels.
Where this hook fires · 1
wp-content/themes/twentytwentyone/functions.php:385twenty_twenty_one_content_width()
Source code
* 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 ); /** * Enqueues scripts and styles. *Changelog
Introduced in Twenty Twenty-One 1.0. One change between 6.7.10 and 7.1.3.
Signature, return type and hooks compared across 5 parsed releases.
6.9.10
Parameter
$content_width added.verified against sourceTwenty Twenty-One 1.0
Twenty Twenty-One 1.0from the docblock
About this page
- Parsed data
- Generated from the wordpress-develop 6.9.10 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.