Post_Type implements Registerable, Standard_Service
Register the Document Library post type
Tags
Interfaces, Classes and Traits
- Registerable
- Standard_Service
Table of Contents
- POST_TYPE_SLUG = 'dlp_document'
- $default_fields : mixed
- $document_slug : mixed
- $license : mixed
- $plugin : mixed
- __construct() : mixed
- Constructor.
- disable_block_editor() : bool
- Disable the block editor for the post type.
- flush_rewrite_rules() : mixed
- Flushes rewrite rules once after successful license activation.
- register() : mixed
- {@inheritdoc}
- register_post_type() : mixed
- Register the Document post type.
Constants
POST_TYPE_SLUG
public
mixed
POST_TYPE_SLUG
= 'dlp_document'
Properties
$default_fields
private
mixed
$default_fields
$document_slug
private
mixed
$document_slug
$license
private
mixed
$license
$plugin
private
mixed
$plugin
Methods
__construct()
Constructor.
public
__construct(Licensed_Plugin $plugin) : mixed
Parameters
- $plugin : Licensed_Plugin
Return values
mixed —disable_block_editor()
Disable the block editor for the post type.
public
disable_block_editor(bool $enabled, string $post_type) : bool
Parameters
- $enabled : bool
-
Whether the block editor is enabled.
- $post_type : string
-
The post type.
Return values
bool —Whether the block editor is enabled.
flush_rewrite_rules()
Flushes rewrite rules once after successful license activation.
public
flush_rewrite_rules() : mixed
This is done now as publicly_queryable is set to true after license activation.
Return values
mixed —register()
{@inheritdoc}
public
register() : mixed
Return values
mixed —register_post_type()
Register the Document post type.
public
register_post_type() : mixed