wp-content/themes/twentyseventeen/functions.php:33Sets up theme defaults and registers support for various WordPress features.
One hook fires while twentyseventeen_setup() runs, in this order:
Filters Twenty Seventeen array of starter content.
function twentyseventeen_setup() { // Add default posts and comments RSS feed links to head. add_theme_support( 'automatic-feed-links' ); /* * Let WordPress manage the document title. * By adding theme support, we declare that this theme does not use a * hard-coded <title> tag in the document head, and expect WordPress to * provide it for us. */ add_theme_support( 'title-tag' ); /* * Enables custom line height for blocks */ add_theme_support( 'custom-line-height' ); /* * Enable support for Post Thumbnails on posts and pages. * * @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/ */ add_theme_support( 'post-thumbnails' ); add_image_size( 'twentyseventeen-featured-image', 2000, 1200, true ); add_image_size( 'twentyseventeen-thumbnail-avatar', 100, 100, true ); // Set the default content width. $GLOBALS['content_width'] = 525; // This theme uses wp_nav_menu() in two locations. register_nav_menus( array( 'top' => __( 'Top Menu', 'twentyseventeen' ), 'social' => __( 'Social Links Menu', 'twentyseventeen' ), ) ); /* * Switch default core markup for search form, comment form, and comments * to output valid HTML5. */ add_theme_support( 'html5', array( 'comment-form', 'comment-list', 'gallery', 'caption', 'script', 'style', 'navigation-widgets', ) ); /* * Enable support for Post Formats. * * See: https://developer.wordpress.org/advanced-administration/wordpress/post-formats/ */ add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link', 'gallery', 'audio', ) ); // Add theme support for Custom Logo. add_theme_support( 'custom-logo', array( 'width' => 250,Introduced in Twenty Seventeen 1.0. 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.