wp_get_attachment_thumb_url

FUNCTION wp-includes\post.php (ligne 7059) github
Filters the attachment caption.

Paramètres

Entrée :
$post_id = 0
Sortie :
@param string $caption Caption for the given attachment.
@param int    $post_id Attachment ID.
@param int $post_id Optional. Attachment ID. Default is the ID of the global `$post`.
@return string|false Thumbnail URL on success, false on failure.

Utilisation

// Utilisation de la fonction wp_get_attachment_thumb_url
$result = wp_get_attachment_thumb_url($post_id = 0);

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

Actualités

Chargement des actualités...