PHP Class The_SEO_Framework\Term_Data

Holds Term and Taxonomy data.
Since: 2.7.1
Inheritance: extends Post_Data
Afficher le fichier Open project: sybrew/the-seo-framework

Méthodes publiques

Méthode Description
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.

Méthodes protégées

Méthode Description
__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.

Method Details

__construct() protected méthode

Constructor, load parent constructor.
protected __construct ( )

delete_term_meta() public méthode

Delete only the default data keys.
Since: 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() public méthode

Try to fetch a term if none can be found.
Since: 2.6.0
public fetch_the_term ( integer $id = '' ) : null | object
$id integer The possible taxonomy Term ID.
Résultat null | object The Term object.

get_old_term_data() protected méthode

Fetches term metadata array for the inpost term metabox.
Since: 2.7.0
protected get_old_term_data ( object $term ) : array
$term object The TT object. Must be assigned.
Résultat array The SEO Framework TT data.

get_tax_labels() public méthode

Fetch Tax labels
Since: 2.3.1
public get_tax_labels ( string $tax_type ) : object | null
$tax_type string the Taxonomy type.
Résultat object | null with all the labels as member variables

get_term_data() public méthode

Fetch set Term data.
Since: 2.6.0
Since: 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.
Résultat array The SEO Framework TT data.

get_term_meta() public méthode

Returns Genesis 2.3.0+ data if no term meta data is set.
Since: 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.
Résultat array The term meta data.

get_term_meta_defaults() public méthode

Returns an array of default term options.
Since: 2.7.0
Since: 2.1.8: Applies filters array the_seo_framework_term_meta_defaults : Array of default term SEO options
public get_term_meta_defaults ( ) : array
Résultat array The Term Metadata default options.

get_the_term_name() protected méthode

Get the current screen term labels.
Since: 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.
Résultat string the Term name.

initialize_term_meta() public méthode

Initializes term meta data filters and functions.
Since: 2.7.0

update_term_meta() public méthode

Sanitizes and saves term meta data when a term is altered.
Since: 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
Résultat void Early on AJAX call.