wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes
wp_create_initial_comment_meta › WordPress Function
Depuis6.9.0
Dépréciéen/a
› wp_create_initial_comment_meta ( Pas de paramètres )
| Défini(e) dans: |
|
| Codex: |
Register initial note status meta.
Source
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 );
},
)
);
}