wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.
get_post_gallery › WordPress Function
Od3.6.0
Przestarzałyn/a
› get_post_gallery ( $post = 0, $html = true )
| Parametry: (2) |
|
| Powrót: |
|
| Zdefiniowane na: |
|
| Codex: |
Checks a specified post's content for gallery and, if present, return the first
Powiązane Funkcje: get_post_galleries, get_post_gallery_images, get_post_galleries_images, get_post_ancestors, get_post_parent
Źródło
function get_post_gallery( $post = 0, $html = true ) {
$galleries = get_post_galleries( $post, $html );
$gallery = reset( $galleries );
/**
* Filters the first-found post gallery.
*
* @since 3.6.0
*
* @param string|array<mixed>|false $gallery The first-found post gallery, or false if the post has no gallery.
* An HTML string when `$html` is true, otherwise an array.
* @param int|WP_Post $post Post ID or object.
* @param array $galleries Associative array of all found post galleries.
*/
return apply_filters( 'get_post_gallery', $gallery, $post, $galleries );
}