source/php/Module/Posts/Posts.php
public function addColumnFields()
    {
        global $post;
        $screen = get_current_screen();

        if (empty($post->post_type) || $screen->base != 'post') {
            return;
        }

        $modules = array();

        // If manually picked
        if ($newModules = $this->checkIfManuallyPicked($post->ID)) {
            $modules = array_merge($modules, $newModules);
        }

        // If post type
        if ($newModules = $this->checkIfPostType($post->ID)) {
            $modules = array_merge($modules, $newModules);
        }

        // If child
        if ($newModules = $this->checkIfChild($post->ID)) {
            $modules = array_merge($modules, $newModules);
        }

        if (empty($modules)) {
            return false;
        }

        $modules = array_filter($modules, function ($item) {
            return !wp_is_post_revision($item);
        });

        $fields = $this->getColumns($modules);

        if (!empty($fields)) {
            add_meta_box(
                'modularity-mod-posts-expandable-list',
                __('Modularity expandable list column values', 'modularity'),
                array($this, 'columnFieldsMetaBoxContent'),
                null,
                'normal',
                'default',
                array($fields)
            );
        }
    }
public function addColumnFields()
    {
        global $post;
        $screen = get_current_screen();

        if (empty($post->post_type) || $screen->base != 'post') {
            return;
        }

        $modules = array();

        // If manually picked
        if ($newModules = $this->checkIfManuallyPicked($post->ID)) {
            $modules = array_merge($modules, $newModules);
        }

        // If post type
        if ($newModules = $this->checkIfPostType($post->ID)) {
            $modules = array_merge($modules, $newModules);
        }

        // If child
        if ($newModules = $this->checkIfChild($post->ID)) {
            $modules = array_merge($modules, $newModules);
        }

        if (empty($modules)) {
            return false;
        }

        $modules = array_filter($modules, function ($item) {
            return !wp_is_post_revision($item);
        });

        $fields = $this->getColumns($modules);

        if (!empty($fields)) {
            add_meta_box(
                'modularity-mod-posts-expandable-list',
                __('Modularity expandable list column values', 'modularity'),
                array($this, 'columnFieldsMetaBoxContent'),
                null,
                'normal',
                'default',
                array($fields)
            );
        }
    }
public function addColumnFields ( ) { global $ post ; $ screen = get_current_screen ( ) ; if ( empty ( $ post -> post_type ) || $ screen -> base != 'post' ) { return ; } $ modules = array ( ) ; // If manually picked if ( $ newModules = $ this -> checkIfManuallyPicked ( $ post -> ID ) ) { $ modules = array_merge ( $ modules , $ newModules ) ; } // If post type if ( $ newModules = $ this -> checkIfPostType ( $ post -> ID ) ) { $ modules = array_merge ( $ modules , $ newModules ) ; } // If child if ( $ newModules = $ this -> checkIfChild ( $ post -> ID ) ) { $ modules = array_merge ( $ modules , $ newModules ) ; } if ( empty ( $ modules ) ) { return false ; } $ modules = array_filter ( $ modules , function ( $ item ) { return ! wp_is_post_revision ( $ item ) ; } ) ; $ fields = $ this -> getColumns ( $ modules ) ; if ( ! empty ( $ fields ) ) { add_meta_box ( 'modularity-mod-posts-expandable-list' , __ ( 'Modularity expandable list column values' , 'modularity' ) , array ( $ this , 'columnFieldsMetaBoxContent' ) , null , 'normal' , 'default' , array ( $ fields ) ) ; } }
Check wheather to add expandable list column fields to edit post screeen
Check wheather to add expandable list column fields to edit post screeen