PHP Class Pressbooks\Taxonomy

显示文件 Open project: pressbooks/pressbooks Class Usage Examples

Public Properties

Property Type Description
$currentVersion integer The value for option: pressbooks_taxonomy_version

Public Methods

Method Description
__construct ( )
getBackMatterType ( $id ) : string Return the first (and only) back-matter-type for a specific post
getChapterType ( $id ) : string Return the first (and only) chapter-type for a specific post
getFrontMatterType ( $id ) : string Return the first (and only) front-matter-type for a specific post
insertTerms ( ) Insert Front Matter, Back Matter terms and Chapter Terms
registerTaxonomies ( ) Create a custom taxonomy for Chapter, Front Matter and Back Matter post types
upgrade ( integer $version ) Upgrade metadata.
upgradeChapterTypes ( ) Upgrade Chapter Types.

Method Details

__construct() public method

public __construct ( )

getBackMatterType() static public method

Return the first (and only) back-matter-type for a specific post
static public getBackMatterType ( $id ) : string
$id
return string

getChapterType() static public method

Return the first (and only) chapter-type for a specific post
static public getChapterType ( $id ) : string
$id
return string

getFrontMatterType() static public method

Return the first (and only) front-matter-type for a specific post
static public getFrontMatterType ( $id ) : string
$id
return string

insertTerms() static public method

Insert Front Matter, Back Matter terms and Chapter Terms
static public insertTerms ( )

registerTaxonomies() static public method

Create a custom taxonomy for Chapter, Front Matter and Back Matter post types
static public registerTaxonomies ( )

upgrade() public method

Upgrade metadata.
public upgrade ( integer $version )
$version integer

upgradeChapterTypes() public method

Upgrade Chapter Types.
public upgradeChapterTypes ( )

Property Details

$currentVersion static_oe public_oe property

The value for option: pressbooks_taxonomy_version
See also: upgrade()
static public int $currentVersion
return integer