PHP code example of wenprise / content-types

1. Go to this page and download the library: Download wenprise/content-types library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

wenprise / content-types example snippets


 \WenpriseContentTypes\ContentType::register( "work", "Works", [ 'title', 'editor', 'thumbnail'], true, false, 'dashicons-art' );

\WenpriseContentTypes\Taxonomy::register( "work_type", 'work', "Work Type", true );

@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