Changeset 43798
- Timestamp:
- 10/23/2018 12:35:37 AM (6 years ago)
- Location:
- branches/5.0/src/wp-content/themes/twentyfifteen
- Files:
-
- 2 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.0/src/wp-content/themes/twentyfifteen/functions.php
r41756 r43798 143 143 add_editor_style( array( 'css/editor-style.css', 'genericons/genericons.css', twentyfifteen_fonts_url() ) ); 144 144 145 // Load regular editor styles into the new block-based editor. 146 add_theme_support( 'editor-styles' ); 147 148 // Load default block styles. 149 add_theme_support( 'wp-block-styles' ); 150 151 // Add support for custom color scheme. 152 add_theme_support( 'editor-color-palette', array( 153 array( 154 'name' => __( 'Dark Gray', 'twentyfifteen' ), 155 'slug' => 'dark-gray', 156 'color' => '#111', 157 ), 158 array( 159 'name' => __( 'Light Gray', 'twentyfifteen' ), 160 'slug' => 'light-gray', 161 'color' => '#f1f1f1', 162 ), 163 array( 164 'name' => __( 'White', 'twentyfifteen' ), 165 'slug' => 'white', 166 'color' => '#fff', 167 ), 168 array( 169 'name' => __( 'Yellow', 'twentyfifteen' ), 170 'slug' => 'yellow', 171 'color' => '#f4ca16', 172 ), 173 array( 174 'name' => __( 'Dark Brown', 'twentyfifteen' ), 175 'slug' => 'dark-brown', 176 'color' => '#352712', 177 ), 178 array( 179 'name' => __( 'Medium Pink', 'twentyfifteen' ), 180 'slug' => 'medium-pink', 181 'color' => '#e53b51', 182 ), 183 array( 184 'name' => __( 'Light Pink', 'twentyfifteen' ), 185 'slug' => 'light-pink', 186 'color' => '#ffe5d1', 187 ), 188 array( 189 'name' => __( 'Dark Purple', 'twentyfifteen' ), 190 'slug' => 'dark-purple', 191 'color' => '#2e2256', 192 ), 193 array( 194 'name' => __( 'Purple', 'twentyfifteen' ), 195 'slug' => 'purple', 196 'color' => '#674970', 197 ), 198 array( 199 'name' => __( 'Blue Gray', 'twentyfifteen' ), 200 'slug' => 'blue-gray', 201 'color' => '#22313f', 202 ), 203 array( 204 'name' => __( 'Bright Blue', 'twentyfifteen' ), 205 'slug' => 'bright-blue', 206 'color' => '#55c3dc', 207 ), 208 array( 209 'name' => __( 'Light Blue', 'twentyfifteen' ), 210 'slug' => 'light-blue', 211 'color' => '#e9f2f9', 212 ), 213 ) ); 214 145 215 // Indicate widget sidebars can use selective refresh in the Customizer. 146 216 add_theme_support( 'customize-selective-refresh-widgets' ); … … 260 330 wp_enqueue_style( 'twentyfifteen-style', get_stylesheet_uri() ); 261 331 332 // Theme block stylesheet. 333 wp_enqueue_style( 'twentyfifteen-block-style', get_template_directory_uri() . '/css/blocks.css', array( 'twentyfifteen-style' ), '20181018' ); 334 262 335 // Load the Internet Explorer specific stylesheet. 263 336 wp_enqueue_style( 'twentyfifteen-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentyfifteen-style' ), '20141010' ); … … 285 358 } 286 359 add_action( 'wp_enqueue_scripts', 'twentyfifteen_scripts' ); 360 361 /** 362 * Enqueue editor styles for Gutenberg 363 * 364 * @since Twenty Fifteen 2.1 365 */ 366 function twentyfifteen_block_editor_styles() { 367 // Block styles. 368 wp_enqueue_style( 'twentyfifteen-block-editor-style', get_template_directory_uri() . '/css/editor-blocks.css' ); 369 // Add custom fonts. 370 wp_enqueue_style( 'twentyfifteen-fonts', twentyfifteen_fonts_url(), array(), null ); 371 } 372 add_action( 'enqueue_block_editor_assets', 'twentyfifteen_block_editor_styles' ); 373 287 374 288 375 /**
Note: See TracChangeset
for help on using the changeset viewer.