Property | Type | Description | |
---|---|---|---|
$action | Themosis\Hook\IHook | ||
$container | Application container. | ||
$datas | PostTypeData instance. | ||
$filter | Themosis\Hook\IHook | ||
$metabox | Themosis\Metabox\IMetabox | The custom publish metabox. | |
$postType | object | WP_Error | The registered custom post type. | |
$prefix | string | Instance abstract name prefix for registration into the container. | |
$status | array | The custom statuses. | |
$view | Illuminate\View\View | The custom view used for publish metabox. |
Method | Description | |
---|---|---|
__construct ( |
Build a custom post type. | |
applyStatus ( string $value ) : mixed | Apply the selected status to the post on save. | |
get ( null $property = null ) : array | Return a defined post type property. | |
has_status ( ) : boolean | Check if the custom post type has statuses registered. | |
instance ( ) : stdClass | WP_Post_type | Return the WordPress post type instance. | |
make ( string $name, string $plural, string $singular ) : |
Define a new custom post type. | |
register ( ) | Triggered by the 'init' action event. | |
removeDefaultPublishBox ( ) | Remove default publish metabox from the custom post type edit screen. | |
reorderStatusViews ( array $views ) : array | Re-order the status views/links on top of the List Table. | |
set ( array $params = [] ) : |
Set the custom post type. A user can also override the arguments by passing an array of custom post type arguments. | |
setTitle ( string $title ) : |
Allow a user to change the title placeholder text. | |
status ( array | string $status, array $args = [] ) : |
Add custom post type status. |
Method | Description | |
---|---|---|
exposeStatuses ( ) | Handle output of custom statuses to admin JS object. | |
setDefaultArguments ( string $plural, string $singular ) : array | Set the custom post type default arguments. |
public __construct ( |
||
$container | The application container. | |
$datas | The post type properties. | |
$metabox | Themosis\Metabox\IMetabox | The custom metabox for custom publish metabox |
$view | Illuminate\View\View | The view that handles custom publish metabox |
$action | Themosis\Hook\IHook | The action class |
$filter | Themosis\Hook\IHook | The filter class |
public applyStatus ( string $value ) : mixed | ||
$value | string | The translated value by WordPress (is always "publish" for some reasons.) |
return | mixed |
protected exposeStatuses ( ) |
public has_status ( ) : boolean | ||
return | boolean |
public instance ( ) : stdClass | WP_Post_type | ||
return | stdClass | WP_Post_type | if WordPress 4.6+ |
public removeDefaultPublishBox ( ) |
public reorderStatusViews ( array $views ) : array | ||
$views | array | The statuses views. |
return | array |
protected Application,Themosis\Foundation $container | ||
return |
protected DataContainer,Themosis\Foundation $datas | ||
return |
protected IMetabox,Themosis\Metabox $metabox | ||
return | Themosis\Metabox\IMetabox |
protected object|WP_Error $postType | ||
return | object | WP_Error |
protected string $prefix | ||
return | string |