wp_create_thumbnail

FUNCTION wp-admin\includes\deprecated.php (ligne 1123) github
This was once used to create a thumbnail from an Image given a maximum side size.

Paramètres

Entrée :
$file, $max_side, $deprecated = ''
Sortie :
@param mixed $file Filename of the original image, Or attachment ID.
@param int $max_side Maximum length of a single side for the thumbnail.
@param mixed $deprecated Never used.
@return string Thumbnail path on success, Error string on failure.

Utilisation

// Utilisation de la fonction wp_create_thumbnail
$result = wp_create_thumbnail($file, $max_side, $deprecated = '');

if ($result) {
    // Votre logique ici
}

Actualités

Chargement des actualités...