PHP Класс The_SEO_Framework\Term_Data

Holds Term and Taxonomy data.
С версии: 2.7.1
Наследование: extends Post_Data
Показать файл Открыть проект

Открытые методы

Метод Описание
delete_term_meta ( integer $term_id, integer $tt_id ) Delete term meta data when a term is deleted.
fetch_the_term ( integer $id = '' ) : null | object Try to fetch a term if none can be found.
get_tax_labels ( string $tax_type ) : object | null Fetch Tax labels
get_term_data ( object | null $term = null, object | null $term_id ) : array Fetch set Term data.
get_term_meta ( integer $term_id, boolean $use_cache = true ) : array Returns term meta data from ID.
get_term_meta_defaults ( ) : array Returns an array of default term options.
initialize_term_meta ( ) Initializes term meta data filters and functions.
update_term_meta ( integer $term_id, integer $tt_id, string $taxonomy = '' ) : void Sanitizes and saves term meta data when a term is altered.

Защищенные методы

Метод Описание
__construct ( ) Constructor, load parent constructor.
get_old_term_data ( object $term ) : array Fetches term metadata array for the inpost term metabox.
get_the_term_name ( object $term, boolean $singular = true, boolean $fallback = true, boolean $use_cache = true ) : string Get the current screen term labels.

Описание методов

__construct() защищенный Метод

Constructor, load parent constructor.
protected __construct ( )

delete_term_meta() публичный Метод

Delete only the default data keys.
С версии: 2.7.0
public delete_term_meta ( integer $term_id, integer $tt_id )
$term_id integer Term ID.
$tt_id integer Term Taxonomy ID.

fetch_the_term() публичный Метод

Try to fetch a term if none can be found.
С версии: 2.6.0
public fetch_the_term ( integer $id = '' ) : null | object
$id integer The possible taxonomy Term ID.
Результат null | object The Term object.

get_old_term_data() защищенный Метод

Fetches term metadata array for the inpost term metabox.
С версии: 2.7.0
protected get_old_term_data ( object $term ) : array
$term object The TT object. Must be assigned.
Результат array The SEO Framework TT data.

get_tax_labels() публичный Метод

Fetch Tax labels
С версии: 2.3.1
public get_tax_labels ( string $tax_type ) : object | null
$tax_type string the Taxonomy type.
Результат object | null with all the labels as member variables

get_term_data() публичный Метод

Fetch set Term data.
С версии: 2.6.0
С версии: 2.7.0 Handles term object differently for upgraded database.
public get_term_data ( object | null $term = null, object | null $term_id ) : array
$term object | null The TT object, if it isn't set, one is fetched.
$term_id object | null The term object.
Результат array The SEO Framework TT data.

get_term_meta() публичный Метод

Returns Genesis 2.3.0+ data if no term meta data is set.
С версии: 2.7.0
public get_term_meta ( integer $term_id, boolean $use_cache = true ) : array
$term_id integer The Term ID.
$use_cache boolean Whether to use caching.
Результат array The term meta data.

get_term_meta_defaults() публичный Метод

Returns an array of default term options.
С версии: 2.7.0
С версии: 2.1.8: Applies filters array the_seo_framework_term_meta_defaults : Array of default term SEO options
public get_term_meta_defaults ( ) : array
Результат array The Term Metadata default options.

get_the_term_name() защищенный Метод

Get the current screen term labels.
С версии: 2.6.0
protected get_the_term_name ( object $term, boolean $singular = true, boolean $fallback = true, boolean $use_cache = true ) : string
$term object The Taxonomy Term object.
$singular boolean Whether to fetch a singular or plural name.
$fallback boolean Whether to fallback on a generic name.
$use_cache boolean Whether to read from cache.
Результат string the Term name.

initialize_term_meta() публичный Метод

Initializes term meta data filters and functions.
С версии: 2.7.0

update_term_meta() публичный Метод

Sanitizes and saves term meta data when a term is altered.
С версии: 2.7.0
public update_term_meta ( integer $term_id, integer $tt_id, string $taxonomy = '' ) : void
$term_id integer Term ID.
$tt_id integer Term Taxonomy ID.
$taxonomy string Taxonomy Slug
Результат void Early on AJAX call.