src/Entities/PostType.php
public function registerEntity()
    {
        parent::registerEntity();

        // Args
        $args = apply_filters('cuztom_post_type_args', array_merge(
            [
                'label'       => sprintf(__('%s', 'cuztom'), $this->plural),
                'public'      => true,
                'supports'    => ['title', 'editor'],
                'has_archive' => sanitize_title($this->plural),
                'labels'      => [
                    'name'               => sprintf(_x('%s', 'post type general name', 'cuztom'), $this->plural),
                    'singular_name'      => sprintf(_x('%s', 'post type singular title', 'cuztom'), $this->title),
                    'menu_name'          => sprintf(__('%s', 'cuztom'), $this->plural),
                    'all_items'          => sprintf(__('All %s', 'cuztom'), $this->plural),
                    'add_new'            => sprintf(_x('Add New', '%s', 'cuztom'), $this->title),
                    'add_new_item'       => sprintf(__('Add New %s', 'cuztom'), $this->title),
                    'edit_item'          => sprintf(__('Edit %s', 'cuztom'), $this->title),
                    'new_item'           => sprintf(__('New %s', 'cuztom'), $this->title),
                    'view_item'          => sprintf(__('View %s', 'cuztom'), $this->title),
                    'items_archive'      => sprintf(__('%s Archive', 'cuztom'), $this->title),
                    'search_items'       => sprintf(__('Search %s', 'cuztom'), $this->plural),
                    'not_found'          => sprintf(__('No %s found', 'cuztom'), $this->plural),
                    'not_found_in_trash' => sprintf(__('No %s found in trash', 'cuztom'), $this->plural),
                    'parent_item_colon'  => sprintf(__('%s Parent', 'cuztom'), $this->title),
                ],
            ],
            $this->original
        ), $this);

        // Register the post type
        register_post_type($this->name, $args);
    }
public function registerEntity()
    {
        parent::registerEntity();

        // Args
        $args = apply_filters('cuztom_post_type_args', array_merge(
            [
                'label'       => sprintf(__('%s', 'cuztom'), $this->plural),
                'public'      => true,
                'supports'    => ['title', 'editor'],
                'has_archive' => sanitize_title($this->plural),
                'labels'      => [
                    'name'               => sprintf(_x('%s', 'post type general name', 'cuztom'), $this->plural),
                    'singular_name'      => sprintf(_x('%s', 'post type singular title', 'cuztom'), $this->title),
                    'menu_name'          => sprintf(__('%s', 'cuztom'), $this->plural),
                    'all_items'          => sprintf(__('All %s', 'cuztom'), $this->plural),
                    'add_new'            => sprintf(_x('Add New', '%s', 'cuztom'), $this->title),
                    'add_new_item'       => sprintf(__('Add New %s', 'cuztom'), $this->title),
                    'edit_item'          => sprintf(__('Edit %s', 'cuztom'), $this->title),
                    'new_item'           => sprintf(__('New %s', 'cuztom'), $this->title),
                    'view_item'          => sprintf(__('View %s', 'cuztom'), $this->title),
                    'items_archive'      => sprintf(__('%s Archive', 'cuztom'), $this->title),
                    'search_items'       => sprintf(__('Search %s', 'cuztom'), $this->plural),
                    'not_found'          => sprintf(__('No %s found', 'cuztom'), $this->plural),
                    'not_found_in_trash' => sprintf(__('No %s found in trash', 'cuztom'), $this->plural),
                    'parent_item_colon'  => sprintf(__('%s Parent', 'cuztom'), $this->title),
                ],
            ],
            $this->original
        ), $this);

        // Register the post type
        register_post_type($this->name, $args);
    }
public function registerEntity ( ) { parent :: registerEntity ( ) ; // Args $ args = apply_filters ( 'cuztom_post_type_args' , array_merge ( [ 'label' => sprintf ( __ ( '%s' , 'cuztom' ) , $ this -> plural ) , 'public' => true , 'supports' => [ 'title' , 'editor' ] , 'has_archive' => sanitize_title ( $ this -> plural ) , 'labels' => [ 'name' => sprintf ( _x ( '%s' , 'post type general name' , 'cuztom' ) , $ this -> plural ) , 'singular_name' => sprintf ( _x ( '%s' , 'post type singular title' , 'cuztom' ) , $ this -> title ) , 'menu_name' => sprintf ( __ ( '%s' , 'cuztom' ) , $ this -> plural ) , 'all_items' => sprintf ( __ ( 'All %s' , 'cuztom' ) , $ this -> plural ) , 'add_new' => sprintf ( _x ( 'Add New' , '%s' , 'cuztom' ) , $ this -> title ) , 'add_new_item' => sprintf ( __ ( 'Add New %s' , 'cuztom' ) , $ this -> title ) , 'edit_item' => sprintf ( __ ( 'Edit %s' , 'cuztom' ) , $ this -> title ) , 'new_item' => sprintf ( __ ( 'New %s' , 'cuztom' ) , $ this -> title ) , 'view_item' => sprintf ( __ ( 'View %s' , 'cuztom' ) , $ this -> title ) , 'items_archive' => sprintf ( __ ( '%s Archive' , 'cuztom' ) , $ this -> title ) , 'search_items' => sprintf ( __ ( 'Search %s' , 'cuztom' ) , $ this -> plural ) , 'not_found' => sprintf ( __ ( 'No %s found' , 'cuztom' ) , $ this -> plural ) , 'not_found_in_trash' => sprintf ( __ ( 'No %s found in trash' , 'cuztom' ) , $ this -> plural ) , 'parent_item_colon' => sprintf ( __ ( '%s Parent' , 'cuztom' ) , $ this -> title ) , ] , ] , $ this -> original ) , $ this ) ; // Register the post type register_post_type ( $ this -> name , $ args ) ; }
Register post Type.

@return void
Register post Type .