PluginPage
extends PageManager
in package
Plugin page.
Table of Contents
Properties
- $edit_post_url : string
- Edit URL.
- $page_key : string
- Page key.
- $permalink : string
- Page permalink.
- $post_content : string
- Post content.
- $post_id : int|null
- Post ID.
- $post_status : string
- Post status.
- $post_title : string
- Post title.
- $post_type : string
- Post content.
- $settings_key : string
- The settings key.
Methods
- __construct() : mixed
- Constructor method.
- create_page() : mixed
- Creates plugin page.
- create_required_pages() : mixed
- Creates required pages.
- get_page() : int|bool
- Get plugin page.
- pages() : mixed
- Core page data.
- required_pages() : mixed
- Returns required pages.
Properties
$edit_post_url
Edit URL.
public
string
$edit_post_url
$page_key
Page key.
public
string
$page_key
Tags
$permalink
Page permalink.
public
string
$permalink
$post_content
Post content.
public
string
$post_content
$post_id
Post ID.
public
int|null
$post_id
$post_status
Post status.
public
string
$post_status
Defaults to 'publish'.
$post_title
Post title.
public
string
$post_title
$post_type
Post content.
public
string
$post_type
Defaults to 'page'.
$settings_key
The settings key.
public
string
$settings_key
Methods
__construct()
Constructor method.
public
__construct(string $page_key) : mixed
Parameters
- $page_key : string
-
The page key from the PageManager.
Tags
create_page()
Creates plugin page.
public
create_page(array<string|int, mixed> $args) : mixed
Parameters
- $args : array<string|int, mixed>
-
{ An array of args to create the page.
@type ?int $post_id Optional. The ID of the existing post. @type string $settings_key Optional. The settings key. Defaults to 'pages'. @type string $post_title The title of the new page. @type string $post_content The content for the new page. @type string $post_status Optional. The status of the new page. Defaults to 'publish'. @type string $post_type Optional. The post type for the new page. Defaults to 'page'.}
Tags
create_required_pages()
Creates required pages.
public
static create_required_pages() : mixed
Tags
get_page()
Get plugin page.
public
static get_page(string $key) : int|bool
Parameters
- $key : string
-
The page key.
Tags
Return values
int|bool —The page ID on success, false on failure.
pages()
Core page data.
public
static pages() : mixed
Tags
required_pages()
Returns required pages.
public
static required_pages() : mixed