ACF_Form_Post::__construct
__construct
Sets up the class functionality.
Method of the class: ACF_Form_Post{}
No Hooks.
Returns
null. Nothing (null).
Usage
$ACF_Form_Post = new ACF_Form_Post(); $ACF_Form_Post->__construct();
Changelog
| Since 5.0.0 | Introduced. |
ACF_Form_Post::__construct() ACF Form Post:: construct code ACF 6.0.4
function __construct() {
// initialize on post edit screens
add_action( 'load-post.php', array( $this, 'initialize' ) );
add_action( 'load-post-new.php', array( $this, 'initialize' ) );
// save
add_filter( 'wp_insert_post_empty_content', array( $this, 'wp_insert_post_empty_content' ), 10, 2 );
add_action( 'save_post', array( $this, 'save_post' ), 10, 2 );
}