This was once used to create a thumbnail from an Image given a maximum side size.
$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 de la fonction wp_create_thumbnail
$result = wp_create_thumbnail($file, $max_side, $deprecated = '');
if ($result) {
// Votre logique ici
}
Chargement des actualités...