class simple_fields_field_example extends simple_fields_field
Properties
$key | ||
$name | ||
$description | ||
$field_url |
Methods
__construct()
|
||
string |
options_output($existing_vals)
Output on options screen |
|
options_save()
|
from simple_fields_field | |
string |
edit_output($saved_values, $options)
Output fields and stuff on post edit page This is the output a regular user will see |
|
mixed, |
edit_save(array $values = NULL)
Called when saving fields, i.e. |
from simple_fields_field |
set_options_base_id(string $string)
Sets the base for the generation of input ids in options screen Called by options screen. |
from simple_fields_field | |
set_options_base_name($string)
Sets the base for the generation of input names in options screen Called by options screen. |
from simple_fields_field | |
string |
get_options_id($name $name)
Get the id to use in input or label or similiar to be used in options screen |
from simple_fields_field |
string |
get_options_name($name $name)
Get the name to use in input or label or similiar to be used in options screen |
from simple_fields_field |
get_class_name(string $class)
Return a classname prefixed with simple fields and our field type, to be used in edit post screen Use this to generate class names to make sure they don't collide with other class names in WordPress (from other plugins for example) |
from simple_fields_field | |
return_values($values)
Possibly modify values before returning them Used from functions simplefieldsvalue and simplefieldsvalues $values is an array beginning at 0, for each field, so loop to change all your values (there are several if using repeatable) |
Details
at line 44
public
__construct()
at line 52
public string
options_output($existing_vals)
Output on options screen
in simple_fields_field at line 34
public
options_save()
at line 124
public string
edit_output($saved_values, $options)
Output fields and stuff on post edit page This is the output a regular user will see
in simple_fields_field at line 62
public mixed,
edit_save(array $values = NULL)
Called when saving fields, i.e.
when clicking the Publish-button on a edit post screen Was is returned from this method will be what is saved in the database, so this is the place to change from array (the default) to for example a single string value that is good for sorting.
Override this in the fields class to modify the value being saved.
in simple_fields_field at line 71
public
set_options_base_id(string $string)
Sets the base for the generation of input ids in options screen Called by options screen.
in simple_fields_field at line 80
public
set_options_base_name($string)
Sets the base for the generation of input names in options screen Called by options screen.
in simple_fields_field at line 89
public string
get_options_id($name $name)
Get the id to use in input or label or similiar to be used in options screen
in simple_fields_field at line 98
public string
get_options_name($name $name)
Get the name to use in input or label or similiar to be used in options screen
in simple_fields_field at line 107
public
get_class_name(string $class)
Return a classname prefixed with simple fields and our field type, to be used in edit post screen Use this to generate class names to make sure they don't collide with other class names in WordPress (from other plugins for example)
at line 150
public
return_values($values)
Possibly modify values before returning them Used from functions simplefieldsvalue and simplefieldsvalues $values is an array beginning at 0, for each field, so loop to change all your values (there are several if using repeatable)