Changeset 43794
- Timestamp:
- 10/22/2018 11:02:44 PM (6 years ago)
- Location:
- branches/5.0/src/wp-content/themes/twentyeleven
- Files:
-
- 2 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.0/src/wp-content/themes/twentyeleven/functions.php
r41756 r43794 82 82 // This theme styles the visual editor with editor-style.css to match the theme style. 83 83 add_editor_style(); 84 85 // Load regular editor styles into the new block-based editor. 86 add_theme_support( 'editor-styles' ); 87 88 // Load default block styles. 89 add_theme_support( 'wp-block-styles' ); 90 91 // Add support for custom color scheme. 92 add_theme_support( 'editor-color-palette', array( 93 array( 94 'name' => __( 'Blue', 'twentyeleven' ), 95 'slug' => 'blue', 96 'color' => '#1982d1', 97 ), 98 array( 99 'name' => __( 'Black', 'twentyeleven' ), 100 'slug' => 'black', 101 'color' => '#000', 102 ), 103 array( 104 'name' => __( 'Dark Gray', 'twentyeleven' ), 105 'slug' => 'dark-gray', 106 'color' => '#373737', 107 ), 108 array( 109 'name' => __( 'Medium Gray', 'twentyeleven' ), 110 'slug' => 'medium-gray', 111 'color' => '#666', 112 ), 113 array( 114 'name' => __( 'Light Gray', 'twentyeleven' ), 115 'slug' => 'light-gray', 116 'color' => '#e2e2e2', 117 ), 118 array( 119 'name' => __( 'White', 'twentyeleven' ), 120 'slug' => 'white', 121 'color' => '#fff', 122 ) 123 ) ); 84 124 85 125 // Load up our theme options page and related code. … … 233 273 endif; // twentyeleven_setup 234 274 275 /** 276 * Enqueue scripts and styles for front end. 277 * 278 * @since Twenty Eleven 2.9 279 */ 280 function twentyeleven_scripts_styles() { 281 // Theme block stylesheet. 282 wp_enqueue_style( 'twentyeleven-block-style', get_template_directory_uri() . '/blocks.css', array(), '20181018' ); 283 } 284 add_action( 'wp_enqueue_scripts', 'twentyeleven_scripts_styles' ); 285 286 /** 287 * Enqueue editor styles for Gutenberg 288 * 289 * @since Twenty Eleven 2.9 290 */ 291 function twentyeleven_block_editor_styles() { 292 // Block styles. 293 wp_enqueue_style( 'twentyeleven-block-editor-style', get_template_directory_uri() . '/editor-blocks.css' ); 294 } 295 add_action( 'enqueue_block_editor_assets', 'twentyeleven_block_editor_styles' ); 296 235 297 if ( ! function_exists( 'twentyeleven_header_style' ) ) : 236 298 /**
Note: See TracChangeset
for help on using the changeset viewer.