initVars(); $this->initClasses(); $this->load(); $this->initHooks(); } /** * Init Vars **/ protected function initVars() { $this->postMetaManager = ace()->getPostMetaManager(); } /** * Init Classes **/ protected function initClasses() { $this->deactivateWA = AceMetaboxDeactivateWA::getInstance(); $this->forCTA = AceMetaboxForCTA::getInstance(); $this->withCTA = AceMetaboxWithCTA::getInstance(); $this->contentFilters = AceMetaboxContentFilters::getInstance(); //$this->layout = AceMetaboxLayout::getInstance(); $this->customBlogPageMode = AceMetaboxBlogPage::getInstance(); } /** * Constructor **/ protected function load() { } /** * Init hooks **/ protected function initHooks() { //add_action( 'admin_enqueue_scripts', array( $this, 'adminEnqueueScripts' ) ); } /** * CSS JS Enqueues * * @param string $hook **/ function adminEnqueueScripts( $hook ) { if ( in_array( $hook, array( 'post.php', 'post-new.php' ) ) ) { wp_enqueue_media(); # CSS wp_enqueue_style( 'ace-meta-boxes' ); # JS wp_enqueue_script( 'ace-meta-boxes' ); } } /** * Action **/ /** * Add Meta Boxes * * @param string $post_type : Default Empty String "" * @param object $post : Default Empty String "" **/ public function add_meta_boxes( $post_type, $post ) { if ( ! in_array( current_filter(), array( 'add_meta_boxes' ) ) ) { return; } if ( empty( $post_type ) ) return; } /** * Save Posts * * @param int $post_id **/ function save_meta_box_settings( $post_id ) { } }