wp_get_attachment_caption

FUNCTION wp-includes\post.php (ligne 7020) github
Filters the attachment URL.

Paramètres

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

Utilisation

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

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

Actualités

Chargement des actualités...