Ticket #39109: 39109.2.patch
File 39109.2.patch, 3.2 KB (added by , 8 years ago) |
---|
-
src/wp-content/themes/twentyseventeen/functions.php
106 106 */ 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', 113 115 'search', … … 114 116 'text_about', 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', 123 127 'search', … … 124 128 ), 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', 129 134 'about' => array( … … 140 145 ), 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( 149 155 'post_title' => _x( 'Sandwich', 'Theme starter content', 'twentyseventeen' ), … … 155 161 ), 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', 160 167 'page_on_front' => '{{home}}', … … 161 168 'page_for_posts' => '{{blog}}', 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}}', 166 174 'panel_2' => '{{about}}', … … 168 176 'panel_4' => '{{contact}}', 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', 178 188 'page_contact', 179 189 ), 180 190 ), 191 192 // Assign a menu to the "social" location. 181 193 'social' => array( 182 194 'name' => __( 'Social Links Menu', 'twentyseventeen' ), 183 195 'items' => array( … … 189 201 ), 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' ); 195 218