wp_edited_image_metadata

FILTER wp-includes\rest-api\endpoints\class-wp-rest-attachments-controller.php (ligne 842) github
Filters the meta data for the new image created by editing an existing image.

Paramètres

Entrée :
$new_image_meta, $new_attachment_id, $attachment_id
Sortie :
@param array $new_image_meta    Meta data for the new image.
@param int   $new_attachment_id Attachment post ID for the new image.
@param int   $attachment_id     Attachment post ID for the edited (parent) image.

Utilisation

// Modifier la valeur avec le filtre 'wp_edited_image_metadata'
add_filter('wp_edited_image_metadata', 'ma_fonction_filtre', 10, 1);

function ma_fonction_filtre($new_image_meta) {
    // Modifier la valeur
    return $new_image_meta;
}

Actualités

Chargement des actualités...