Wenprise Content Types
Create WordPress content types and taxonomies more easier.
by WordPress 智库 · github.com/iwillhappy1314/wenprise-content-types · website
★ 0stars
0forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/iwillhappy1314/wenprise-content-types/archive/refs/heads/master.zipCreate WordPress content types and taxonomies easier.
Register Post type
\WenpriseContentTypes\ContentType::register( "work", "Works", [ 'title', 'editor', 'thumbnail'], true, false, 'dashicons-art' );
Params
@param string $name Post type name in the menu and page title
@param array|boolean $support The functions post type support
@param boolean $is_publish Is publish in frontend
@param boolean $hierarchical is hierarchical
@param string $icon the dashicon of the dashboard menu
Filters
- wprs_typelabels$slug: modify the post type labels
- wprs_typeargs$slug: modify the args to register the post type
Register Taxonomy
\WenpriseContentTypes\Taxonomy::register( "work_type", 'work', "Work Type", true );
Params
@param string $tax_slug Taxonomy slug
@param string|array $post_type the post type of the taxonomy registered to
@param string $tax_name Taxonomy name
@param boolean $hierarchical is hierarchical
Filters
- wprs_typelabels$slug: modify the post type labels
- wprs_typeargs$slug: modify the args to register the post type
- wprs_taxtypes$slug: Modify the post types taxonomy registered to