Changeset 43797
- Timestamp:
- 10/23/2018 12:10:28 AM (3 years ago)
- Location:
- branches/5.0/src/wp-content/themes/twentyfourteen
- Files:
-
- 2 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.0/src/wp-content/themes/twentyfourteen/functions.php
r41756 r43797 70 70 // This theme styles the visual editor to resemble the theme style. 71 71 add_editor_style( array( 'css/editor-style.css', twentyfourteen_font_url(), 'genericons/genericons.css' ) ); 72 73 // Load regular editor styles into the new block-based editor. 74 add_theme_support( 'editor-styles' ); 75 76 // Load default block styles. 77 add_theme_support( 'wp-block-styles' ); 78 79 // Add support for custom color scheme. 80 add_theme_support( 'editor-color-palette', array( 81 array( 82 'name' => __( 'Green', 'twentyfourteen' ), 83 'slug' => 'green', 84 'color' => '#24890d', 85 ), 86 array( 87 'name' => __( 'Black', 'twentyfourteen' ), 88 'slug' => 'black', 89 'color' => '#000', 90 ), 91 array( 92 'name' => __( 'Dark Gray', 'twentyfourteen' ), 93 'slug' => 'dark-gray', 94 'color' => '#2b2b2b', 95 ), 96 array( 97 'name' => __( 'Medium Gray', 'twentyfourteen' ), 98 'slug' => 'medium-gray', 99 'color' => '#767676', 100 ), 101 array( 102 'name' => __( 'Light Gray', 'twentyfourteen' ), 103 'slug' => 'light-gray', 104 'color' => '#f5f5f5', 105 ), 106 array( 107 'name' => __( 'White', 'twentyfourteen' ), 108 'slug' => 'white', 109 'color' => '#fff', 110 ), 111 ) ); 72 112 73 113 // Add RSS feed links to <head> for posts and comments. … … 240 280 wp_enqueue_style( 'twentyfourteen-style', get_stylesheet_uri() ); 241 281 282 // Theme block stylesheet. 283 wp_enqueue_style( 'twentyfourteen-block-style', get_template_directory_uri() . '/css/blocks.css', array( 'twentyfourteen-style' ), '20181018' ); 284 242 285 // Load the Internet Explorer specific stylesheet. 243 286 wp_enqueue_style( 'twentyfourteen-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentyfourteen-style' ), '20131205' ); … … 302 345 } 303 346 add_filter( 'wp_resource_hints', 'twentyfourteen_resource_hints', 10, 2 ); 347 348 /** 349 * Enqueue editor styles for Gutenberg 350 * 351 * @since Twenty Fourteen 2.3 352 */ 353 function twentyfourteen_block_editor_styles() { 354 // Block styles. 355 wp_enqueue_style( 'twentyfourteen-block-editor-style', get_template_directory_uri() . '/css/editor-blocks.css' ); 356 // Add custom fonts. 357 wp_enqueue_style( 'twentyfourteen-fonts', twentyfourteen_font_url(), array(), null ); 358 } 359 add_action( 'enqueue_block_editor_assets', 'twentyfourteen_block_editor_styles' ); 304 360 305 361 if ( ! function_exists( 'twentyfourteen_the_attached_image' ) ) :
Note: See TracChangeset
for help on using the changeset viewer.