block_editor_meta_box_hidden_fields

ACTION wp-admin\includes\post.php (ligne 2609) github
Adds hidden input fields to the meta box save form. Hook into this action to print `<input type="hidden" ... />` fields, which will be POSTed back to the server when meta boxes are saved.

Paramètres

Entrée :
$post
Sortie :
@param WP_Post $post The post that is being edited.

Utilisation

// Ajouter une fonction au hook action 'block_editor_meta_box_hidden_fields'
add_action('block_editor_meta_box_hidden_fields', 'ma_fonction_personnalisee', 10, 1);

function ma_fonction_personnalisee($post) {
    // Votre code ici
    error_log('Hook block_editor_meta_box_hidden_fields déclenché');
}

Actualités

Chargement des actualités...