wp_get_original_image_url

FUNCTION wp-includes\post.php (ligne 8476) github
Filters the path to the original image.

Paramètres

Entrée :
$attachment_id
Sortie :
@param string $original_image Path to original image file.
@param int    $attachment_id  Attachment ID.
@param int $attachment_id Attachment post ID.
@return string|false Attachment image URL, false on error or if the attachment is not an image.

Utilisation

// Utilisation de la fonction wp_get_original_image_url
$result = wp_get_original_image_url($attachment_id);

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

Actualités

Chargement des actualités...