src/Meta/Box.php
public function addHooks()
    {
        if (isset($this->callback[0]) && $this->callback[0] == $this) {
            foreach ($this->postTypes as $postType) {
                add_filter('manage_'.$postType.'_posts_columns', [$this, 'addColumn']);
                add_action('manage_'.$postType.'_posts_custom_column', [$this, 'addColumnContent'], 10, 2);
                add_action('manage_edit-'.$postType.'_sortable_columns', [$this, 'addSortableColumn'], 10, 2);
            }

            add_action('save_post', [$this, 'savePost']);
            add_action('post_edit_form_tag', [$this, 'editFormTag']);
        }

        // Add the meta box
        add_action('add_meta_boxes', [$this, 'addMetaBox']);

        // Do
        do_action('cuztom_box_hooks', $this);
    }
public function addHooks()
    {
        if (isset($this->callback[0]) && $this->callback[0] == $this) {
            foreach ($this->postTypes as $postType) {
                add_filter('manage_'.$postType.'_posts_columns', [$this, 'addColumn']);
                add_action('manage_'.$postType.'_posts_custom_column', [$this, 'addColumnContent'], 10, 2);
                add_action('manage_edit-'.$postType.'_sortable_columns', [$this, 'addSortableColumn'], 10, 2);
            }

            add_action('save_post', [$this, 'savePost']);
            add_action('post_edit_form_tag', [$this, 'editFormTag']);
        }

        // Add the meta box
        add_action('add_meta_boxes', [$this, 'addMetaBox']);

        // Do
        do_action('cuztom_box_hooks', $this);
    }
public function addHooks ( ) { if ( isset ( $ this -> callback [ 0 ] ) && $ this -> callback [ 0 ] == $ this ) { foreach ( $ this -> postTypes as $ postType ) { add_filter ( 'manage_' . $ postType . '_posts_columns' , [ $ this , 'addColumn' ] ) ; add_action ( 'manage_' . $ postType . '_posts_custom_column' , [ $ this , 'addColumnContent' ] , 10 , 2 ) ; add_action ( 'manage_edit-' . $ postType . '_sortable_columns' , [ $ this , 'addSortableColumn' ] , 10 , 2 ) ; } add_action ( 'save_post' , [ $ this , 'savePost' ] ) ; add_action ( 'post_edit_form_tag' , [ $ this , 'editFormTag' ] ) ; } // Add the meta box add_action ( 'add_meta_boxes' , [ $ this , 'addMetaBox' ] ) ; // Do do_action ( 'cuztom_box_hooks' , $ this ) ; }
Add all hooks.
Add all hooks .