wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi



wp_create_initial_comment_meta › WordPress Function

Da6.9.0
Deprecaton/a
› wp_create_initial_comment_meta ( Nessun parametro )
Definito a:
Codex:

Register initial note status meta.



Sorgenti

function wp_create_initial_comment_meta() {
	register_meta(
		'comment',
		'_wp_note_status',
		array(
			'type'          => 'string',
			'description'   => __( 'Note resolution status' ),
			'single'        => true,
			'show_in_rest'  => array(
				'schema' => array(
					'type' => 'string',
					'enum' => array( 'resolved', 'reopen' ),
				),
			),
			'auth_callback' => function ( $allowed, $meta_key, $object_id ) {
				return current_user_can( 'edit_comment', $object_id );
			},
		)
	);
}