wp_create_initial_post_meta()
Registers any additional post meta fields.
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
wp_create_initial_post_meta();
Список изменений
С версии 6.3.0 | Введена. |
С версии 6.3.0 | Adds wp_pattern_sync_status meta field to the wp_block post type so an unsynced option can be added. |
Код wp_create_initial_post_meta() wp create initial post meta WP 6.6.2
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' ), ), ), ) ); }