EPL_Render_Fields class.
Handles rendering of html fields for EPL settings, meta boxes etc.
| Since | |
|---|---|
2.3 |
|
3.4.29 |
Moved from meta-boxes into its own class for more extensibility. |
3.4.48 |
New: Field type textarea_html which works like the editor field type but without loading the MCE buttons. |
| Methods | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
public
|
__construct()
Constructs a new instance.
Constructs a new instance. |
# | ||||||||||||
public
|
process_field_params(array $field, string $val): array
Process field paramaters.
Process field paramaters. Parameters
ReturnsThe array of fields. |
# | ||||||||||||
public
|
get_min(array $field): string
Gets the minimum.
Gets the minimum. Parameters
ReturnsThe minimum. |
# | ||||||||||||
public
|
is_multiple(array $field): boolean
Determines whether the specified field is multiple.
Determines whether the specified field is multiple. Parameters
ReturnsTrue if the specified field is multiple, False otherwise. |
# | ||||||||||||
public
|
get_max(array $field): string
Gets the maximum.
Gets the maximum. Parameters
ReturnsThe maximum. |
# | ||||||||||||
public
|
get_maxlength(array $field): string
Gets the maxlength.
Gets the maxlength. Parameters
ReturnsThe maxlength. |
# | ||||||||||||
public
|
get_placeholder(array $field): string
Gets the placeholder.
Gets the placeholder. Parameters
ReturnsThe placeholder. |
# | ||||||||||||
public
|
get_autocomplete(array $field): string
Gets the autocomplete.
Gets the autocomplete. Parameters
ReturnsThe autocomplete. |
# | ||||||||||||
public
|
is_required(array $field): boolean
Determines whether the specified field is required.
Determines whether the specified field is required. Parameters
ReturnsTrue if the specified field is required, False otherwise. |
# | ||||||||||||
public
|
get_id(array $field): boolean
Gets the identifier.
Gets the identifier. Parameters
ReturnsThe identifier. |
# | ||||||||||||
public
|
get_name(array $field): string
Gets the name.
Gets the name. Parameters
ReturnsThe name. |
# | ||||||||||||
public
|
get_decimal_validation_class(array $field = []): string
Gets the decimal validation class.
Gets the decimal validation class. Parameters
ReturnsThe decimal validation class. |
# | ||||||||||||
public
|
get_number_validation_class(array $field = []): string
Gets the number validation class.
Gets the number validation class. Parameters
ReturnsThe number validation class. |
# | ||||||||||||
public
|
get_email_validation_class(array $field = []): string
Gets the email validation class.
Gets the email validation class. Parameters
ReturnsThe email validation class. |
# | ||||||||||||
public
|
get_url_validation_class(array $field = []): string
Gets the url validation class.
Gets the url validation class. Parameters
ReturnsThe The url validation class. |
# | ||||||||||||
public
|
get_class(array $field): boolean
Gets the class.
Gets the class. Parameters
ReturnsThe class. |
# | ||||||||||||
public
|
get_data_attributes(array $field): string
Gets the data attributes.
Gets the data attributes. Parameters
|
# | ||||||||||||
public
|
is_name_array(array $field): boolean
Determines whether the specified field is name array.
Determines whether the specified field is name array. Parameters
ReturnsTrue if the specified field is name array, False otherwise. |
# | ||||||||||||
public
|
get_opening_field_tag(string $tag = 'input', array $field = [], boolean $self_close = false): string
Gets the opening field tag.
Gets the opening field tag. Parameters
ReturnsThe opening field tag. Since
|
# | ||||||||||||
public
|
render(array $field = [], string $val = '')
Renders the field based on field type
Renders the field based on field type Parameters
|
# | ||||||||||||
public
|
select(array $field, string $val)
Renders select
Renders select Parameters
|
# | ||||||||||||
public
|
checkbox(array $field, string $val)
Renders checkbox
Renders checkbox Parameters
|
# | ||||||||||||
public
|
checkbox_single(array $field, string $val)
Renders checkbox single
Renders checkbox single Parameters
Since
|
# | ||||||||||||
public
|
checkbox_option(array $field, string $val)
Renders checkbox option
Renders checkbox option Parameters
Since
|
# | ||||||||||||
public
|
radio(array $field, string $val)
Renders radio
Renders radio Parameters
|
# | ||||||||||||
public
|
file(array $field, string $val)
Renders file / image
Renders file / image Parameters
|
# | ||||||||||||
public
|
editor(array $field, string $val)
Renders editor
Renders editor Parameters
|
# | ||||||||||||
public
|
textarea(array $field, string $val)
Renders textarea
Renders textarea Parameters
|
# | ||||||||||||
public
|
textarea_html(array $field, string $val)
Renders textarea_html
Renders textarea_html Parameters
Since
|
# | ||||||||||||
public
|
locked(array $field, string $val)
Renders locked
Renders locked Parameters
|
# | ||||||||||||
public
|
help(array $field, string $val)
Renders help
Renders help Parameters
Since
|
# | ||||||||||||
public
|
html(array $field, string $val)
Renders html
Renders html Parameters
Since
|
# | ||||||||||||
public
|
render_default(array $field, string $val)
Renders default input types
Renders default input types Parameters
Since
|
# | ||||||||||||
| Properties | |||
|---|---|---|---|
public
|
string
|
$class_prefix = 'epl-form-field-'
|
# |
public
|
array
|
$post
|
# |