name = 'enhanced_message';
$this->label = __("Enhanced Message",'acf');
$this->category = 'layout';
$this->defaults = array(
'enhanced_message' => '',
'hide_label' => 'no',
);
// do not delete!
parent::__construct();
}
/*
* render_field()
*/
function render_field( $field ) {
$stringVal = $field['enhanced_message'];
ob_start();
eval('?>'.$stringVal);
$stringVal = ob_get_contents();
ob_end_clean();
echo $stringVal;
}
/*
* field_group_admin_head()
*
*/
function field_group_admin_head() {
?>
post_type != 'acf-field-group') {
$field['label'] = '';
echo '';
}
return $field;
}
/*
* render_field_settings()
*/
function render_field_settings( $field ) {
// Message
acf_render_field_setting( $field, array(
'label' => __('Message','acf'),
'instructions' => __('Works like the default Message field but supports PHP and without ','acf') . 'wpautop()',
'type' => 'textarea',
'name' => 'enhanced_message',
));
// Hide Label?
acf_render_field_setting( $field, array(
'label' => __('Hide Label','acf'),
'type' => 'radio',
'name' => 'hide_label',
'layout' => 'horizontal',
'choices' => array(
'yes' => __('Yes'),
'no' => __('No'),
)
));
}
}
new acf_field_enhanced_message();
endif;
?>