editor_max_image_size

FILTER wp-includes\media.php (ligne 138) github
Filters the maximum image size dimensions for the editor.

Paramètres

Entrée :
array( $max_width, $max_height
Sortie :
@param int[]        $max_image_size {
@param string|int[] $size     Requested image size. Can be any registered image size name, or
@param string       $context  The context the image is being resized for.

Utilisation

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

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

Actualités

Chargement des actualités...