wpseek.com
A WordPress-centric search engine for devs and theme authors



wp_create_initial_post_meta › WordPress Function

Since6.3.0
Deprecatedn/a
wp_create_initial_post_meta ( No parameters )
Links:
Defined at:
Codex:
Change Log:
  • Adds

Registers any additional post meta fields.



Source

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' ),
				),
			),
		)
	);
}