CustomField
in package
This class handles all hooks for the custom field in a attachments dialog.
Table of Contents
Properties
- $me : mixed
Methods
- attachment_fields_to_edit() : array<string|int, mixed>
- When editing a attachment show up a select option to change the parent folder.
- attachment_fields_to_save() : WP_Post
- When saving a attachment change the parent folder.
- getInstance() : CustomField
- Get instance.
- getShortcutInfoContainer() : string
- Get the HTML shortcut info container.
- __construct() : mixed
- C'tor.
Properties
$me
private
static mixed
$me
= null
Methods
attachment_fields_to_edit()
When editing a attachment show up a select option to change the parent folder.
public
attachment_fields_to_edit(array<string|int, mixed> $form_fields, WP_Post $post) : array<string|int, mixed>
Parameters
- $form_fields : array<string|int, mixed>
- $post : WP_Post
Return values
array<string|int, mixed>attachment_fields_to_save()
When saving a attachment change the parent folder.
public
attachment_fields_to_save(WP_Post $post, array<string|int, mixed> $attachment) : WP_Post
Parameters
- $post : WP_Post
- $attachment : array<string|int, mixed>
Return values
WP_PostgetInstance()
Get instance.
public
static getInstance() : CustomField
Return values
CustomFieldgetShortcutInfoContainer()
Get the HTML shortcut info container.
public
getShortcutInfoContainer(int $postId) : string
Parameters
- $postId : int
-
The post id
Return values
string__construct()
C'tor.
private
__construct() : mixed