Skip to content

For Developers: Taxonomy Functions

Dave Mackey edited this page Jan 28, 2020 · 1 revision

These functions are found in \includes\taxonomies

  • class-taxonomies-base.php
    • __construct = Registers taxonomy.
    • filter_values = Filters values before taxonomy is officially registered.
    • add_image_column = Register image columns for $this->taxonomy.
    • add_column_header = Add the tax-image column to taxonomy terms list tables.
    • add_column_value = Output the value for the custom column.
    • (abstract function) hooks = Initiate hooks.
    • new_cmb2 = Wrapper for new_cmb2_box.
    • most_recent = Retrieves terms for the mot recent message post with this taxonomy set.
    • most_recent_sermon = Retrieves the most recent message which has terms in this taxonomy.
    • get_many = Wrapper for get_terms.
    • search = Wrapper for get_terms that allows searching using a wildcard name.
    • get = Gets a single term object.
    • extra_term-data = Sets extra term data on the term object, including image if applicable.
    • add_image = Adds an image to the term.
    • get_terms_in_sermon_date_order = Gets terms in the message date order.
    • trigger_cache_flush = Hooks into wp_async_set_sermon_terms action which is triggered when a message post is saved.
    • get_terms = Wrapper for 'get_terms' to account for changes in WP 4.5 where taxonomy is expected as part of the args.
    • __get = Magic getter for terms object.
  • class-topic.php
    • __construct = Register Taxonomy.
    • hooks = Initiate our hooks (currently there are none).
  • class-taxonomies.php
    • __construct = Constructor.
    • __get = Magic getter for our taxonomy object.
  • class-tag.php
    • __construct = Registers tag taxonomy.
    • hooks = Initiate our hooks (currently there are none).
  • class-speaker.php
    • __construct = Register speaker taxonomy.
    • hooks = Initiate hooks, currently cmb2_admin_init.
    • fields = Add custom fields to the CPT.
    • extra_term_data = Sets extra term data on the sermons term object.
    • augment_speaker_info = Takes a user ID and augments a speaker message object with user data if a related user exists.
    • maybe_use_avatar
    • augment_speaker_info_with_staff_info = Takes a staff member post ID and augments a speaker term object with staff data.
  • class-series.php
    • __construct = Register Sermon Series Taxonomy.
    • hooks = Initiate our hooks, currently cmb2_admin_init.
    • fields = Add custom fields to the Custom Taxonomy.
  • class-scripture.php
    • __construct = Register Scriptures taxonomy.
    • hooks = Initiate our hooks (currently there are none).

Clone this wiki locally