'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
);
$autosave =
wp_get_post_autosave( $post->ID
);
if ( $autosave ) { if ( mysql2date( 'U',
$autosave->post_modified_gmt, false
) >
mysql2date( 'U',
$post->post_modified_gmt, false
) ) { $editor_settings['autosave'
] = array
( 'editLink' =>
get_edit_post_link( $autosave->ID
),
);
} else { wp_delete_post_revision( $autosave->ID
);
}}if ( !
empty( $post_type_object->template
) ) {