Changeset 39721
- Timestamp:
- 01/05/2017 07:31:49 PM (8 years ago)
- Location:
- branches/4.7
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.7
-
branches/4.7/src/wp-content/themes/twentyseventeen/functions.php
r39650 r39721 107 107 add_editor_style( array( 'assets/css/editor-style.css', twentyseventeen_fonts_url() ) ); 108 108 109 add_theme_support( 'starter-content', array( 109 // Define and register starter content to showcase the theme on new sites. 110 $starter_content = array( 110 111 'widgets' => array( 112 // Place three core-defined widgets in the sidebar area. 111 113 'sidebar-1' => array( 112 114 'text_business_info', … … 115 117 ), 116 118 119 // Add the core-defined business info widget to the footer 1 area. 117 120 'sidebar-2' => array( 118 121 'text_business_info', 119 122 ), 120 123 124 // Put two core-defined widgets in the footer 2 area. 121 125 'sidebar-3' => array( 122 126 'text_about', … … 125 129 ), 126 130 131 // Specify the core-defined pages to create and add custom thumbnails to some of them. 127 132 'posts' => array( 128 133 'home', … … 141 146 ), 142 147 148 // Create the custom image attachments used as post thumbnails for pages. 143 149 'attachments' => array( 144 150 'image-espresso' => array( 145 151 'post_title' => _x( 'Espresso', 'Theme starter content', 'twentyseventeen' ), 146 'file' => 'assets/images/espresso.jpg', 152 'file' => 'assets/images/espresso.jpg', // URL relative to the template directory. 147 153 ), 148 154 'image-sandwich' => array( … … 156 162 ), 157 163 164 // Default to a static front page and assign the front and posts pages. 158 165 'options' => array( 159 166 'show_on_front' => 'page', … … 162 169 ), 163 170 171 // Set the front page section theme mods to the IDs of the core-registered pages. 164 172 'theme_mods' => array( 165 173 'panel_1' => '{{homepage-section}}', … … 169 177 ), 170 178 179 // Set up nav menus for each of the two areas registered in the theme. 171 180 'nav_menus' => array( 181 // Assign a menu to the "top" location. 172 182 'top' => array( 173 183 'name' => __( 'Top Menu', 'twentyseventeen' ), 174 184 'items' => array( 175 'link_home', 185 'link_home', // Note that the core "home" page is actually a link in case a static front page is not used. 176 186 'page_about', 177 187 'page_blog', … … 179 189 ), 180 190 ), 191 192 // Assign a menu to the "social" location. 181 193 'social' => array( 182 194 'name' => __( 'Social Links Menu', 'twentyseventeen' ), … … 190 202 ), 191 203 ), 192 ) ); 204 ); 205 206 /** 207 * Filters Twenty Seventeen array of starter content. 208 * 209 * @since Twenty Seventeen 1.1 210 * 211 * @param array $starter_content Array of starter content. 212 */ 213 $starter_content = apply_filters( 'twentyseventeen_starter_content', $starter_content ); 214 215 add_theme_support( 'starter-content', $starter_content ); 193 216 } 194 217 add_action( 'after_setup_theme', 'twentyseventeen_setup' );
Note: See TracChangeset
for help on using the changeset viewer.