PHP Class CPTP_Util, custom-post-type-permalinks

Since: 0.9.4
Show file Open project: torounit/custom-post-type-permalinks Class Usage Examples

Public Methods

Method Description
get_date_front ( string $post_type ) : string Get permalink structure front for date archive.
get_no_taxonomy_structure ( ) : boolean Get Option no_taxonomy_structure.
get_permalink_structure ( string | object $post_type ) : string Get permalink structure.
get_post_types ( ) : array
get_taxonomies ( boolean $objects = false ) : array
get_taxonomy_parents ( integer | WP_Term | object $term, string $taxonomy = 'category', boolean $link = false, string $separator = '/', boolean $nicename = false, array $visited = [] ) : string Get Custom Taxonomies parents.
get_taxonomy_parents_slug ( integer | WP_Term | object $term, string $taxonomy = 'category', string $separator = '/', boolean $nicename = false, array $visited = [] ) : string Get Custom Taxonomies parents slug.

Private Methods

Method Description
__construct ( )
is_post_type_support_rewrite ( string $post_type ) : boolean

Method Details

get_date_front() public static method

Get permalink structure front for date archive.
Since: 1.0.0
public static get_date_front ( string $post_type ) : string
$post_type string post type name.
return string

get_no_taxonomy_structure() public static method

Get Option no_taxonomy_structure.
Since: 2.2.0
public static get_no_taxonomy_structure ( ) : boolean
return boolean

get_post_types() public static method

public static get_post_types ( ) : array
return array

get_taxonomies() public static method

public static get_taxonomies ( boolean $objects = false ) : array
$objects boolean
return array

get_taxonomy_parents() public static method

Get Custom Taxonomies parents.
Deprecation:
public static get_taxonomy_parents ( integer | WP_Term | object $term, string $taxonomy = 'category', boolean $link = false, string $separator = '/', boolean $nicename = false, array $visited = [] ) : string
$term integer | WP_Term | object
$taxonomy string
$link boolean
$separator string
$nicename boolean
$visited array
return string

get_taxonomy_parents_slug() public static method

Get Custom Taxonomies parents slug.
public static get_taxonomy_parents_slug ( integer | WP_Term | object $term, string $taxonomy = 'category', string $separator = '/', boolean $nicename = false, array $visited = [] ) : string
$term integer | WP_Term | object
$taxonomy string
$separator string
$nicename boolean
$visited array
return string