acf_form_front::__construct
__construct
This function will setup the class functionality
Method of the class: acf_form_front{}
No Hooks.
Returns
null. Nothing (null).
Usage
$acf_form_front = new acf_form_front(); $acf_form_front->__construct();
Changelog
| Since 5.0.0 | Introduced. |
acf_form_front::__construct() acf form front:: construct code ACF 6.0.4
function __construct() {
// vars
$this->fields = array(
'_post_title' => array(
'prefix' => 'acf',
'name' => '_post_title',
'key' => '_post_title',
'label' => __( 'Title', 'acf' ),
'type' => 'text',
'required' => true,
),
'_post_content' => array(
'prefix' => 'acf',
'name' => '_post_content',
'key' => '_post_content',
'label' => __( 'Content', 'acf' ),
'type' => 'wysiwyg',
),
'_validate_email' => array(
'prefix' => 'acf',
'name' => '_validate_email',
'key' => '_validate_email',
'label' => __( 'Validate Email', 'acf' ),
'type' => 'text',
'value' => '',
'wrapper' => array( 'style' => 'display:none !important;' ),
),
);
// actions
add_action( 'acf/validate_save_post', array( $this, 'validate_save_post' ), 1 );
// filters
add_filter( 'acf/pre_save_post', array( $this, 'pre_save_post' ), 5, 2 );
}