Changeset 51200 for trunk/src/wp-admin/edit-form-blocks.php
- Timestamp:
- 06/22/2021 01:32:42 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/edit-form-blocks.php
r51158 r51200 19 19 * @global WP_Post $post Global post object. 20 20 * @global string $title 21 * @global array $editor_styles22 21 * @global array $wp_meta_boxes 23 22 */ 24 global $post_type, $post_type_object, $post, $title, $ editor_styles, $wp_meta_boxes;23 global $post_type, $post_type_object, $post, $title, $wp_meta_boxes; 25 24 26 25 $block_editor_context = new WP_Block_Editor_Context( array( 'post' => $post ) ); … … 129 128 ) : $available_templates; 130 129 131 // Editor Styles.132 $styles = array(133 array(134 'css' => 'body { font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif }',135 '__unstableType' => 'core',136 ),137 );138 if ( $editor_styles && current_theme_supports( 'editor-styles' ) ) {139 foreach ( $editor_styles as $style ) {140 if ( preg_match( '~^(https?:)?//~', $style ) ) {141 $response = wp_remote_get( $style );142 if ( ! is_wp_error( $response ) ) {143 $styles[] = array(144 'css' => wp_remote_retrieve_body( $response ),145 '__unstableType' => 'theme',146 );147 }148 } else {149 $file = get_theme_file_path( $style );150 if ( is_file( $file ) ) {151 $styles[] = array(152 'css' => file_get_contents( $file ),153 'baseURL' => get_theme_file_uri( $style ),154 '__unstableType' => 'theme',155 );156 }157 }158 }159 }160 161 130 // Lock settings. 162 131 $user_id = wp_check_post_lock( $post->ID ); … … 213 182 'bodyPlaceholder' => $body_placeholder, 214 183 'autosaveInterval' => AUTOSAVE_INTERVAL, 215 'styles' => $styles,184 'styles' => get_block_editor_theme_styles(), 216 185 'richEditingEnabled' => user_can_richedit(), 217 186 'postLock' => $lock_details,
Note: See TracChangeset
for help on using the changeset viewer.