Largo Project
v0.6.4
  • For Developers
  • Feedback on these docs
  • Support
  • Function reference by file
    • archive.php
    • feed-mailchimp.php
    • functions.php
    • homepages/homepage.php
    • homepages/layouts/HomepageSingleWithSeriesStories.php
    • homepages/zones/zones.php
    • inc/ajax-functions.php
    • inc/avatars.php
    • inc/avatars/functions.php
    • inc/byline_class.php
    • inc/conditionals.php
    • inc/custom-feeds.php
    • inc/custom-less-variables.php
    • inc/customizer/customizer.php
    • inc/dashboard.php
    • inc/deprecated.php
    • inc/editor.php
    • inc/enqueue.php
    • inc/featured-content.php
    • inc/featured-media.php
    • inc/gutenberg-block-edits.php
    • inc/header-footer.php
    • inc/helpers.php
    • inc/images.php
    • inc/metabox-api.php
    • inc/nav-menus.php
    • inc/open-graph.php
    • inc/post-metaboxes.php
    • inc/post-social.php
    • inc/post-tags.php
    • inc/post-templates.php
    • inc/related-content.php
    • inc/sidebars.php
    • inc/taxonomies.php
    • inc/term-icons.php
    • inc/term-meta.php
    • inc/term-sidebars.php
    • inc/update.php
    • inc/users.php
    • inc/verify.php
    • inc/widgets.php
    • inc/widgets/largo-about.php
    • inc/widgets/largo-author-bio.php
    • inc/widgets/largo-facebook.php
    • inc/widgets/largo-image-widget.php
    • inc/widgets/largo-post-series-links.php
    • inc/widgets/largo-recent-comments.php
    • inc/widgets/largo-recent-posts.php
    • inc/widgets/largo-taxonomy-list.php
    • inc/widgets/largo-twitter.php
    • inc/wp-taxonomy-landing/functions/cftl-admin.php
    • inc/wp-taxonomy-landing/functions/cftl-series-order.php
    • options.php
Largo Project
  • Docs »
  • For Developers »
  • Function reference by file »
  • inc/featured-media.php
  • Edit on GitHub

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
Next Previous

© Copyright 2019, Institute for Nonprofit News Revision c41d8519.

Built with Sphinx using a theme provided by Read the Docs.