Ticket #39109: 39109.1.diff
| File 39109.1.diff, 3.2 KB (added by , 10 years ago) |
|---|
-
src/wp-content/themes/twentyseventeen/functions.php
103 103 */ 104 104 add_editor_style( array( 'assets/css/editor-style.css', twentyseventeen_fonts_url() ) ); 105 105 106 add_theme_support( 'starter-content', array( 106 /* 107 * Define and register starter content to showcase the theme on new sites. 108 */ 109 $starter_content = array( 107 110 'widgets' => array( 108 'sidebar-1' => array( 111 'sidebar-1' => array( // Place three core-defined widgets in the sidebar area. 109 112 'text_business_info', 110 113 'search', 111 114 'text_about', 112 115 ), 113 116 114 'sidebar-2' => array( 117 'sidebar-2' => array( // Add the core-defined business info widget to the footer 1 area. 115 118 'text_business_info', 116 119 ), 117 120 118 'sidebar-3' => array( 121 'sidebar-3' => array( // Put two core-defined widgets in the footer 2 area. 119 122 'text_about', 120 123 'search', 121 124 ), 122 125 ), 123 126 127 // Specify the core-defined pages to create and add custom thumbnails to some of them. 124 128 'posts' => array( 125 129 'home', 126 130 'about' => array( … … 137 141 ), 138 142 ), 139 143 144 // Create the custom image attachments used as post thumbnails for pages. 140 145 'attachments' => array( 141 146 'image-espresso' => array( 142 147 'post_title' => _x( 'Espresso', 'Theme starter content', 'twentyseventeen' ), 143 'file' => 'assets/images/espresso.jpg', 148 'file' => 'assets/images/espresso.jpg', // URL relative to the template directory. 144 149 ), 145 150 'image-sandwich' => array( 146 151 'post_title' => _x( 'Sandwich', 'Theme starter content', 'twentyseventeen' ), … … 152 157 ), 153 158 ), 154 159 160 // Default to a static front page and assign the front and posts pages. 155 161 'options' => array( 156 162 'show_on_front' => 'page', 157 163 'page_on_front' => '{{home}}', … … 158 164 'page_for_posts' => '{{blog}}', 159 165 ), 160 166 167 // Set the front page section theme mods to the IDs of the core-registered pages. 161 168 'theme_mods' => array( 162 169 'panel_1' => '{{homepage-section}}', 163 170 'panel_2' => '{{about}}', … … 165 172 'panel_4' => '{{contact}}', 166 173 ), 167 174 175 // Set up nav menus for each of the two areas registered in the theme. 168 176 'nav_menus' => array( 169 'top' => array( 177 'top' => array( // Assign this menu to the "top" location. 170 178 'name' => __( 'Top Menu', 'twentyseventeen' ), 171 179 'items' => array( 172 'link_home', 180 'link_home', // Note that the core "home" page is actually a link in case a static front page is not used. 173 181 'page_about', 174 182 'page_blog', 175 183 'page_contact', 176 184 ), 177 185 ), 178 'social' => array( 186 'social' => array( // Assign this menu to the "social" location. 179 187 'name' => __( 'Social Links Menu', 'twentyseventeen' ), 180 188 'items' => array( 181 189 'link_yelp', … … 186 194 ), 187 195 ), 188 196 ), 189 ) ); 197 ); 198 199 /** 200 * Filter Twenty Seventeen starter content array. 201 * 202 * @since Twenty Seventeen 1.0 203 * 204 * @param $starter_content array 205 */ 206 add_theme_support( 'starter-content', apply_filters( 'twentyseventeen_starter_content', $starter_content ) ); 190 207 } 191 208 add_action( 'after_setup_theme', 'twentyseventeen_setup' ); 192 209