PHP Класс Habari\Tags

Наследование: extends Vocabulary
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$object_type
$vocabulary

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

Метод Описание
get_by_frequency ( integer $limit = null, mixed $post_type = null, integer $min = 1, integer $max = null, mixed $search = null, $orderby = 'count', $inverse = false ) : Tags Returns a list of terms from this vocabulary ordered by frequency of use on the post type specified
get_by_id ( integer $tag ) : Tag Returns a Tag object based on a supplied ID
get_by_slug ( string $tag ) : Tag Return a tag based on a tag's text
get_by_text ( string $tag ) : Tag Return a tag based on a tag's text
get_one ( string | integer $tag ) : Tag Return a tag based on an id, tag text or slug
object_type ( ) : String Returns the default type Tags uses
parse_url_tags ( String $tags, $objectify = false ) : Array. Parse tag parameters from a URL string
save_associations ( $terms, $object_id, $object_type = 'post' ) : boolean. Save the tags associated to this object into the terms and object_terms tables
search ( string $q ) : Terms Return a terms that match a substring criteria
vocabulary ( ) : Vocabulary Returns the tags vocabulary

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

get_by_frequency() публичный статический Метод

Returns a list of terms from this vocabulary ordered by frequency of use on the post type specified
public static get_by_frequency ( integer $limit = null, mixed $post_type = null, integer $min = 1, integer $max = null, mixed $search = null, $orderby = 'count', $inverse = false ) : Tags
$limit integer If supplied, limits the results to the specified number
$post_type mixed If a name or id of a post type is supplied, limits the results to the terms applying to that type
$min integer If supplied, limits the results to tags associated with at least this number of posts
$max integer If supplied, limits the results to tags associated with at most this number of posts
$search mixed If supplied, limits the results to tags containing that value in their display string
Результат Tags A Tags instance containing the terms, each having an additional property of "count" that tells how many times the term was used

get_by_id() публичный статический Метод

Returns a Tag object based on a supplied ID
public static get_by_id ( integer $tag ) : Tag
$tag integer The ID of the tag to retrieve
Результат Tag A Tag object

get_by_slug() публичный статический Метод

Return a tag based on a tag's text
public static get_by_slug ( string $tag ) : Tag
$tag string The tag slug
Результат Tag A Tag object

get_by_text() публичный статический Метод

Return a tag based on a tag's text
public static get_by_text ( string $tag ) : Tag
$tag string The tag's text (not slug)
Результат Tag A Tag object

get_one() публичный статический Метод

Return a tag based on an id, tag text or slug
public static get_one ( string | integer $tag ) : Tag
$tag string | integer A tag's text, slug, or id
Результат Tag The tag object

object_type() публичный статический Метод

Returns the default type Tags uses
public static object_type ( ) : String
Результат String The default type name

parse_url_tags() публичный статический Метод

Parse tag parameters from a URL string
public static parse_url_tags ( String $tags, $objectify = false ) : Array.
$tags String The URL parameter string
Результат Array.

save_associations() публичный статический Метод

Save the tags associated to this object into the terms and object_terms tables
public static save_associations ( $terms, $object_id, $object_type = 'post' ) : boolean.
Результат boolean.

vocabulary() публичный статический Метод

Returns the tags vocabulary
public static vocabulary ( ) : Vocabulary
Результат Vocabulary The tags vocabulary

Описание свойств

$object_type защищенное статическое свойство

protected static $object_type

$vocabulary защищенное статическое свойство

protected static $vocabulary