wp_get_attachment_image_src

FUNCTION wp-includes\media.php (ligne 958) github
Retrieves an image to represent an attachment.

Paramètres

Entrée :
$attachment_id, $size = 'thumbnail', $icon = false
Sortie :
@param int          $attachment_id Image attachment ID.
@param string|int[] $size          Optional. Image size. Accepts any registered image size name, or an array of
@param bool         $icon          Optional. Whether the image should fall back to a mime type icon. Default false.
@return array|false {

Utilisation

// Utilisation de la fonction wp_get_attachment_image_src
$result = wp_get_attachment_image_src($attachment_id, $size = 'thumbnail', $icon = false);

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

Actualités

Chargement des actualités...