Changeset 43795
- Timestamp:
- 10/22/2018 11:17:55 PM (6 years ago)
- Location:
- branches/5.0/src/wp-content/themes/twentytwelve
- Files:
-
- 2 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.0/src/wp-content/themes/twentytwelve/functions.php
r41756 r43795 55 55 add_editor_style(); 56 56 57 // Load regular editor styles into the new block-based editor. 58 add_theme_support( 'editor-styles' ); 59 60 // Load default block styles. 61 add_theme_support( 'wp-block-styles' ); 62 63 // Add support for custom color scheme. 64 add_theme_support( 'editor-color-palette', array( 65 array( 66 'name' => __( 'Blue', 'twentytwelve' ), 67 'slug' => 'blue', 68 'color' => '#21759b', 69 ), 70 array( 71 'name' => __( 'Dark Gray', 'twentytwelve' ), 72 'slug' => 'dark-gray', 73 'color' => '#444', 74 ), 75 array( 76 'name' => __( 'Medium Gray', 'twentytwelve' ), 77 'slug' => 'medium-gray', 78 'color' => '#9f9f9f', 79 ), 80 array( 81 'name' => __( 'Light Gray', 'twentytwelve' ), 82 'slug' => 'light-gray', 83 'color' => '#e6e6e6', 84 ), 85 array( 86 'name' => __( 'White', 'twentytwelve' ), 87 'slug' => 'white', 88 'color' => '#fff', 89 ), 90 ) ); 91 57 92 // Adds RSS feed links to <head> for posts and comments. 58 93 add_theme_support( 'automatic-feed-links' ); … … 152 187 wp_enqueue_style( 'twentytwelve-style', get_stylesheet_uri() ); 153 188 189 // Theme block stylesheet. 190 wp_enqueue_style( 'twentytwelve-block-style', get_template_directory_uri() . '/css/blocks.css', array( 'twentytwelve-style' ), '20181018' ); 191 154 192 // Loads the Internet Explorer specific stylesheet. 155 193 wp_enqueue_style( 'twentytwelve-ie', get_template_directory_uri() . '/css/ie.css', array( 'twentytwelve-style' ), '20121010' ); … … 157 195 } 158 196 add_action( 'wp_enqueue_scripts', 'twentytwelve_scripts_styles' ); 197 198 /** 199 * Enqueue editor styles for Gutenberg 200 * 201 * @since Twenty Twelve 2.6 202 */ 203 function twentytwelve_block_editor_styles() { 204 // Block styles. 205 wp_enqueue_style( 'twentytwelve-block-editor-style', get_template_directory_uri() . '/css/editor-blocks.css' ); 206 // Add custom fonts. 207 wp_enqueue_style( 'twentytwelve-fonts', twentytwelve_get_font_url(), array(), null ); 208 } 209 add_action( 'enqueue_block_editor_assets', 'twentytwelve_block_editor_styles' ); 159 210 160 211 /**
Note: See TracChangeset
for help on using the changeset viewer.