/** This filter is documented in wp-admin/edit-form-advanced.php */
'titlePlaceholder' =>
apply_filters( 'enter_title_here',
__( 'Add title'
),
$post ),
'bodyPlaceholder' =>
$body_placeholder,
'autosaveInterval' => AUTOSAVE_INTERVAL,
'richEditingEnabled' =>
user_can_richedit(),
'postLock' =>
$lock_details,
'postLockUtils' => array
( 'nonce' =>
wp_create_nonce( 'lock-post_' .
$post->ID
),
'unlockNonce' =>
wp_create_nonce( 'update-post_' .
$post->ID
),
'ajaxUrl' =>
admin_url( 'admin-ajax.php'
),
),
'supportsLayout' =>
wp_theme_has_theme_json(),
'supportsTemplateMode' =>
current_theme_supports( 'block-templates'
),
// Whether or not to load the 'postcustom' meta box is stored as a user meta
// field so that we're not always loading its assets.
'enableCustomFields' =>
(bool) get_user_meta( get_current_user_id(), 'enable_custom_fields', true
),
);
// Add additional back-compat patterns registered by `current_screen` et al.
$editor_settings['__experimentalAdditionalBlockPatterns'
] = WP_Block_Patterns_Registry::
get_instance()->
get_all_registered( true
);
$editor_settings['__experimentalAdditionalBlockPatternCategories'
] = WP_Block_Pattern_Categories_Registry::
get_instance()->
get_all_registered( true
);