wp-content/themes/twentyseventeen/functions.php:259Sets the content width in pixels, based on the theme's design and stylesheet.
One hook fires while twentyseventeen_content_width() runs, in this order:
Filters Twenty Seventeen content width of the theme.
function twentyseventeen_content_width() { $content_width = $GLOBALS['content_width']; // Get layout. $page_layout = get_theme_mod( 'page_layout' ); // Check if layout is one column. if ( 'one-column' === $page_layout ) { if ( twentyseventeen_is_frontpage() ) { $content_width = 644; } elseif ( is_page() ) { $content_width = 740; } } // Check if is single post and there is no sidebar. if ( is_single() && ! is_active_sidebar( 'sidebar-1' ) ) { $content_width = 740; } /** * Filters Twenty Seventeen content width of the theme. * * @since Twenty Seventeen 1.0 * * @param int $content_width Content width in pixels. */ $GLOBALS['content_width'] = apply_filters( 'twentyseventeen_content_width', $content_width );}Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
src/wp-content/themes/twentyseventeen/functions.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.