inc/featured-media.php¶
-
largo_default_featured_media_types
()¶ Returns the default available featured media types
-
largo_hero
()¶ Prints DOM for hero image.
Determines the type of featured media attached to a post, and generates the DOM for that type of media.
Parameters: - $post (int|WP_Post) – Optional. Post ID or WP_Post object. Default is global $post.
- $classes (String) – Optional. Class string to apply to outer div.hero
-
largo_get_hero
()¶ Return DOM for hero image.
Determines the type of featured media attached to a post, and generates the DOM for that type of media.
Parameters: - $post (int|WP_Post) – Optional. Post ID or WP_Post object. Default is global $post.
- $classes (String) – Optional. Class string to apply to outer div.hero
-
largo_featured_image_hero
()¶ Prints DOM for a featured image hero.
Since: 0.5.1
See: largo_get_featured_hero()
Parameters: - $post (int|WP_Post) – Optional. Post ID or WP_Post object. Default is global $post.
- $classes (String) – Optional. Class string to apply to outer div.hero
-
largo_get_featured_hero
()¶ Prints DOM for a featured image hero.
Since: 0.5.5
Parameters: - $post (int|WP_Post) – Optional. Post ID or WP_Post object. Default is global $post.
- $classes (String) – Optional. Class string to apply to outer div.hero
-
largo_featured_embed_hero
()¶ Prints DOM for an embed code hero.
Since: 0.5.1
See: largo_get_featured_hero()
Parameters: - $post (int|WP_Post) – Optional. Post ID or WP_Post object. Default is global $post.
- $classes (String) – Optional. Class string to apply to outer div.hero
-
largo_featured_gallery_hero
()¶ Prints DOM for a featured gallery hero.
Since: 0.5.1
See: largo_get_featured_hero()
Parameters: - $post (int|WP_Post) – Optional. Post ID or WP_Post object. Default is global $post.
- $classes (String) – Optional. Class string to apply to outer div.hero
-
largo_get_featured_media
()¶ Returns information about the featured media.
‘id’ => int, // post id. ‘type’ => string, // the type of featured_media
// … other variables, dependent on what the type is.
}
Since: 0.4
Parameters: - $post (int|WP_Post) – Optional. Post ID or WP_Post object. Default is global $post.
Returns: array $post_type {
-
largo_has_featured_media
()¶ Does the post have featured media?
Parameters: - $post (int|WP_Post) – Optional. Post ID or WP_Post object. Default is global $post.
Returns: bool $f a post ID has featured media or not.
-
largo_featured_media_templates
()¶ Prints the templates used by featured media modal.
-
largo_remove_featured_image_meta_box
()¶ Remove the default featured image meta box from post pages
-
largo_add_featured_image_meta_box
()¶ Add new featured image meta box to post pages
-
largo_featured_image_metabox_callback
()¶ Get post meta in a callback
Parameters: - $post (WP_Post) – The current post.
- $metabox (array) – With metabox id, title, callback, and args elements.
-
largo_save_featured_media_data
()¶ Save data from meta box
-
largo_featured_media_save
()¶ Save featured_media post meta. Expects array $_POST[‘data’] with at least an id key corresponding to the post ID that needs meta saved.
-
largo_save_featured_image_display
()¶ Saves the option that determines whether a featured image should be displayed at the top of the post page or not.
-
largo_fetch_video_oembed
()¶ When a URL is typed/pasted into the url field of the featured video view, this function tries to fetch the oembed information for that video.
-
largo_featured_media_post_classes
()¶ Add post classes to indicate whether a post has featured media and what type it is
Since: 0.5.2
-
largo_content_partial_arguments_filter
()¶ Filter on partials/content.php to affect the presentation of partials/content.php
Are you trying to modify this for a child theme? You may want to create a new partial for that use instead.
Global: $opt
Uses: largo_post_in_series
Filter: largo_content_partial_arguments
Parameters: - $args (array) – The arguments for how partials/content.php displays
- $queried_object (array|StdClass) – the WordPress query that started the page load