inc/taxonomies.php

largo_is_series_enabled()

Check if the Series taxonomy is enabled

Is the series equivalent of the WordPress function is_category(); We didn’t call the function is_series() because it needs the largo_ prefix.

Uses:global $post
Uses:largo_is_series_enabled
Since:0.4
Returns:bool $hether or not the Series taxonomy option is enabled in the Theme Options > Advanced
largo_is_series_landing_enabled()

Check if Series landing pages are enabled

Since:0.5.2
Returns:bool $hether or not the Series Landing Page option is enabled in the Theme Options > Advanced
largo_custom_taxonomies()

Register the prominence and series custom taxonomies Insert the default terms

Uses:largo_is_series_enabled
Since:0.3
largo_post_in_series()

Determines whether a post is in a series. Expects to be called from within The Loop. Is the series equivalent of the WordPress function is_category(); We didn’t call the function is_series() because it needs the largo_ prefix.

Uses:global $post
Uses:largo_is_series_enabled
Returns:bool
Since:0.3
largo_custom_taxonomy_terms()

Outputs custom taxonomy terms attached to a post

Returns:array $f terms
Since:0.3
largo_get_series_posts()

Helper function for getting posts in proper landing-page order for a series

Uses:

largo_is_series_enabled

Parameters:
  • $eries (integer) – term id
  • $umber (integer) – of posts to fetch, defaults to all
Since:

0.4

Filter: post_type_link

Filter post permalinks for the Landing Page custom post type. Replace direct post link with the link for the associated Series taxonomy term, using the most recently created term if multiple are set.

This filter overrides the wp-taxonomy-landing filter, which attempts to use the link for ANY term from ANY taxonomy. Largo really only cares about the Series taxonomy.

Since:0.5
Returns:filtered $post_link, replacing a Landing Page link with its Series link as needed
largo_get_series_landing_page_by_series()

Helper to get the Series Landing Page for a given series.

Parameters:
  • $series (Object|id|string) –
Returns:

array $n array of all WP_Post objects answering the description of this series. May be 0, 1 or conceivably many.