Fieldmanager_Context_Page deprecated
class Fieldmanager_Context_Page extends Fieldmanager_Context (View source)
deprecated
Use Fieldmanager on the public-facing theme.
Properties
Fieldmanager_Field | $fm | The base field associated with this context. |
from Fieldmanager_Context |
string | $uniqid | Unique ID of the form. Used for forms that are not built into WordPress. |
from Fieldmanager_Context |
array | $save_keys | Store the meta keys this field saves to, to catch naming conflicts. |
from Fieldmanager_Context |
static array | $forms | Array of contexts for rendering forms. |
|
bool | $did_save | Was the form saved? |
Methods
Include a fresh nonce for this field in a response with refreshed nonces.
Check if the nonce is valid. Returns false if the nonce is missing and throws an exception if it's invalid. If all goes well, returns true.
Prepare the data for saving.
Action to save the form.
Output HTML for the form.
Get a form by ID, used for rendering.
Details
__construct(string $uniqid, Fieldmanager_Field $fm)
Create page context handler.
protected string
nonce_key()
Get the nonce key for this field.
array
refresh_nonce(array $response)
Include a fresh nonce for this field in a response with refreshed nonces.
protected bool
is_valid_nonce()
Check if the nonce is valid. Returns false if the nonce is missing and throws an exception if it's invalid. If all goes well, returns true.
protected mixed
prepare_data(mixed $old_value = null, mixed $new_value = null, object $fm = null)
Prepare the data for saving.
protected string
render_field(array $args = array())
Render the field.
save_page_form()
Action to save the form.
render_page_form()
Output HTML for the form.
static Fieldmanager_Context_Page
get_form(string $uniqid)
Get a form by ID, used for rendering.