false,
'is_meta' => true, // in object as public (bool) $meta;
'forms' => array(
'registration' => false,
'submission' => true,
'vendor-contact' => false,
'profile' => false,
'login' => false,
),
'position' => 'custom',
'permissions' => array(
'can_remove_from_formbuilder' => true,
'can_change_meta_key' => true,
'can_add_to_formbuilder' => true,
),
'template' => 'olam_fes_download_features_field',
'title' => 'Olam download features',
'phoenix' => false,
);
/** @var array Characteristics are things that can change from field to field of the same field type. Like the placeholder between two email fields. Stored in db. */
public $characteristics = array(
'name' => '',
'template' => 'olam_fes_download_features_field',
'public' => false,
'required' => false,
'label' => '',
'css' => '',
'default' => '',
'size' => '',
'help' => '',
'placeholder' => '',
'multiple' => array(),
'columns' => false,
'size' => '40',
);
public function set_title() {
$title = _x( 'Olam download features', 'FES Field title translation', 'bmci' );
$title = apply_filters( 'fes_' . $this->name() . '_field_title', $title );
$this->supports['title'] = $title;
}
/** Returns the HTML to render a field in admin */
public function render_field_admin( $user_id = -2, $readonly = -2 ) {
if ( $user_id === -2 ) {
$user_id = get_current_user_id();
}
if ( $readonly === -2 ) {
$readonly = $this->readonly;
}
$user_id = apply_filters( 'fes_render_repeat_field_user_id_admin', $user_id, $this->id );
$readonly = apply_filters( 'fes_render_repeat_field_readonly_admin', $readonly, $user_id, $this->id );
$value = $this->get_field_value_admin( $this->save_id, $user_id, $readonly );
$add = fes_assets_url .'img/add.png';
$remove = fes_assets_url. 'img/remove.png';
$required = $this->required( $readonly );
$output = '';
$output .= sprintf( '