Changeset 53197
- Timestamp:
- 04/17/2022 03:05:10 PM (3 years ago)
- Location:
- trunk/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/edit-form-blocks.php
r53155 r53197 58 58 add_query_arg( 59 59 array( 60 'context' => 'edit',60 'context' => 'edit', 61 61 'per_page' => -1, 62 62 ), … … 189 189 190 190 $editor_settings = array( 191 'availableTemplates' 192 'disablePostFormats' 191 'availableTemplates' => $available_templates, 192 'disablePostFormats' => ! current_theme_supports( 'post-formats' ), 193 193 /** This filter is documented in wp-admin/edit-form-advanced.php */ 194 'titlePlaceholder' 195 'bodyPlaceholder' 196 'autosaveInterval' 197 'richEditingEnabled' 198 'postLock' 199 'postLockUtils' 194 'titlePlaceholder' => apply_filters( 'enter_title_here', __( 'Add title' ), $post ), 195 'bodyPlaceholder' => $body_placeholder, 196 'autosaveInterval' => AUTOSAVE_INTERVAL, 197 'richEditingEnabled' => user_can_richedit(), 198 'postLock' => $lock_details, 199 'postLockUtils' => array( 200 200 'nonce' => wp_create_nonce( 'lock-post_' . $post->ID ), 201 201 'unlockNonce' => wp_create_nonce( 'update-post_' . $post->ID ), 202 202 'ajaxUrl' => admin_url( 'admin-ajax.php' ), 203 203 ), 204 'supportsLayout' 205 'supportsTemplateMode' 204 'supportsLayout' => WP_Theme_JSON_Resolver::theme_has_support(), 205 'supportsTemplateMode' => current_theme_supports( 'block-templates' ), 206 206 207 207 // Whether or not to load the 'postcustom' meta box is stored as a user meta 208 208 // field so that we're not always loading its assets. 209 'enableCustomFields' 209 'enableCustomFields' => (bool) get_user_meta( get_current_user_id(), 'enable_custom_fields', true ), 210 210 ); 211 211 -
trunk/src/wp-admin/site-editor.php
r53155 r53197 62 62 $block_editor_context = new WP_Block_Editor_Context( array( 'name' => 'core/edit-site' ) ); 63 63 $custom_settings = array( 64 'siteUrl' 65 'postsPerPage' 66 'styles' 67 'defaultTemplateTypes' 68 'defaultTemplatePartAreas' 69 '__unstableHomeTemplate' 64 'siteUrl' => site_url(), 65 'postsPerPage' => get_option( 'posts_per_page' ), 66 'styles' => get_block_editor_theme_styles(), 67 'defaultTemplateTypes' => $indexed_template_types, 68 'defaultTemplatePartAreas' => get_allowed_block_template_part_areas(), 69 '__unstableHomeTemplate' => $home_template, 70 70 ); 71 71 $editor_settings = get_block_editor_settings( $custom_settings, $block_editor_context ); -
trunk/src/wp-includes/block-template-utils.php
r53129 r53197 1002 1002 global $wp_version; 1003 1003 $theme_json_version = 'wp/' . substr( $wp_version, 0, 3 ); 1004 $schema = array( '$schema' => 'https://schemas.wp.org/' . $theme_json_version . '/theme.json' );1005 $theme_json_raw = array_merge( $schema, $theme_json_raw );1004 $schema = array( '$schema' => 'https://schemas.wp.org/' . $theme_json_version . '/theme.json' ); 1005 $theme_json_raw = array_merge( $schema, $theme_json_raw ); 1006 1006 } 1007 1007 -
trunk/src/wp-includes/blocks.php
r53152 r53197 1363 1363 } 1364 1364 1365 $args 1365 $args = array( 1366 1366 'handle' => sanitize_key( "{$metadata['name']}-{$style_path}" ), 1367 1367 'src' => $style_uri, -
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-block-types-controller.php
r53084 r53197 647 647 'readonly' => true, 648 648 ), 649 'ancestor' 649 'ancestor' => array( 650 650 'description' => __( 'Ancestor blocks.' ), 651 651 'type' => array( 'array', 'null' ), -
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-global-styles-controller.php
r53075 r53197 582 582 583 583 if ( rest_is_field_included( 'styles', $fields ) ) { 584 $raw_data = $theme->get_raw_data();584 $raw_data = $theme->get_raw_data(); 585 585 $data['styles'] = isset( $raw_data['styles'] ) ? $raw_data['styles'] : array(); 586 586 }
Note: See TracChangeset
for help on using the changeset viewer.