wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren
wp_create_initial_post_meta › WordPress Function
Seit6.3.0
Veraltetn/v
› wp_create_initial_post_meta ( Keine Parameter )
| Links: | |
| Definiert in: |
|
| Codex: | |
| Changelog: |
|
Registers any additional post meta fields.
Quellcode
function wp_create_initial_post_meta() {
register_post_meta(
'wp_block',
'wp_pattern_sync_status',
array(
'sanitize_callback' => 'sanitize_text_field',
'single' => true,
'type' => 'string',
'show_in_rest' => array(
'schema' => array(
'type' => 'string',
'enum' => array( 'partial', 'unsynced' ),
),
),
)
);
// Allow setting the is_wp_suggestion meta field, which partly determines if
// a template is a custom template.
register_post_meta(
'wp_template',
'is_wp_suggestion',
array(
'type' => 'boolean',
'show_in_rest' => true,
'single' => true,
)
);
}