get_post_galleries

FUNCTION wp-includes\media.php (ligne 5219) github
Filters the embedded media types that are allowed to be returned from the content blob.

Paramètres

Entrée :
$post, $html = true
Sortie :
@param string[] $allowed_media_types An array of allowed media types. Default media types are
@param int|WP_Post $post Post ID or object.
@param bool        $html Optional. Whether to return HTML or data in the array. Default true.
@return array A list of arrays, each containing gallery data and srcs parsed

Utilisation

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

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

Actualités

Chargement des actualités...