PHP 클래스 Themosis\Taxonomy\TaxField

Allow the user to add custom fields to a taxonomy.
파일 보기 프로젝트 열기: themosis/framework

공개 메소드들

메소드 설명
addFields ( ) Display the custom fields on the add terms page.
check ( ) Check if the taxonomy exists. Call by the action hook 'wp_loaded'.
delete ( integer $term_id ) Delete the fields from the database.
editFields ( stdClass $term ) Display the custom fields on the edit term page.
make ( string $taxonomySlug ) : TaxField Init the custom taxonomy field.
save ( integer $term_id ) Save the fields values in the options table.
set ( array $fields ) : TaxField Set the custom fields for the taxonomy.

비공개 메소드들

메소드 설명
__construct ( string $taxonomySlug ) The TaxField constructor.
parse ( array $fields, string $taxonomySlug ) : array Parse the fields and mix them with a default one.

메소드 상세

addFields() 공개 메소드

Display the custom fields on the add terms page.
public addFields ( )

check() 공개 메소드

If not, throw an exception.
public check ( )

delete() 공개 메소드

Delete the fields from the database.
public delete ( integer $term_id )
$term_id integer The term ID.

editFields() 공개 메소드

Display the custom fields on the edit term page.
public editFields ( stdClass $term )
$term stdClass The term object passed by WordPress.

make() 공개 정적인 메소드

Init the custom taxonomy field.
public static make ( string $taxonomySlug ) : TaxField
$taxonomySlug string The taxonomy slug.
리턴 TaxField

save() 공개 메소드

Save the fields values in the options table.
public save ( integer $term_id )
$term_id integer The term ID.

set() 공개 메소드

Set the custom fields for the taxonomy.
public set ( array $fields ) : TaxField
$fields array A list of fields.
리턴 TaxField