Tribe__Tickets_Plus__Meta__Field__Abstract_Field::render_field( array $field, string|int|array $value = null, $attendee_id = null )
Renders the field as it would be displayed on the front end
Contents
Parameters
- $field
-
(array) (Required) Field settings
- $value
-
(string|int|array) (Optional) Value of the field
Default value: null
Return
(string)
Source
File: src/Tribe/Meta/Field/Abstract_Field.php
public function render_field( $field, $value = null, $attendee_id = null ) {
ob_start();
$template = sanitize_file_name( "{$field->type}.php" );
$required = isset( $field->required ) && 'on' === $field->required ? true : false;
$field = (array) $field;
include Tribe__Tickets_Plus__Main::instance()->get_template_hierarchy( "meta/{$template}" );
return ob_get_clean();
}
Changelog
| Version | Description |
|---|---|
| 4.1 | Introduced. |