ReferencePosts
in package
Creates reference posts.
Sets up reference posts for use in help links throughout the plugin.
Tags
Table of Contents
Methods
- __construct() : mixed
- Constructor method.
- add_post() : mixed
- Adds a new reference post.
- get_all_reference_post_ids() : mixed
- Retrieves an array of published reference post IDs.
- get_reference_post_id() : mixed
- Retrieves the ID of a reference post by key.
Methods
__construct()
Constructor method.
public
__construct() : mixed
Tags
add_post()
Adds a new reference post.
public
static add_post(string $key, array<string|int, mixed> $args) : mixed
Parameters
- $key : string
-
The unique key for the reference post.
- $args : array<string|int, mixed>
-
{ An array of arguments for creating the new reference post.
@string $content The content of the post. @string $title The title of the post.}
Tags
get_all_reference_post_ids()
Retrieves an array of published reference post IDs.
public
static get_all_reference_post_ids() : mixed
Tags
get_reference_post_id()
Retrieves the ID of a reference post by key.
public
static get_reference_post_id(string $key) : mixed
Parameters
- $key : string
-
The key of the post ID to retrieve.