get_post_gallery

FUNCTION wp-includes\media.php (ligne 5396) github
Filters the list of all found galleries in the given post.

Paramètres

Entrée :
$post = 0, $html = true
Sortie :
@param array   $galleries Associative array of all found post galleries.
@param WP_Post $post      Post object.
@param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global $post.
@param bool        $html Optional. Whether to return HTML or data. Default is true.
@return string|array Gallery data and srcs parsed from the expanded shortcode.

Utilisation

// Utilisation de la fonction get_post_gallery
$result = get_post_gallery($post = 0, $html = true);

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

Actualités

Chargement des actualités...