source/php/Module/Posts/Posts.php
public function saveColumnFields($postId)
    {
        //Meta key
        $metaKey = "modularity-mod-posts-expandable-list";

        //Bail early if autosave
        if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {
            return false;
        }

        //Bail early if cron
        if (defined('DOING_CRON') && DOING_CRON) {
            return false;
        }

        //Bail early if not a post request
        if (!isset($_POST) || (is_array($_POST) && empty($_POST)) || !is_array($_POST)) {
            return false;
        }

        //Update if nonce verification succeed
        if (isset($_POST['modularity_post_columns']) && wp_verify_nonce($_POST['modularity_post_columns'],
                'save_columns')) {
            //Delete if not posted data
            if (!isset($_POST[$metaKey])) {
                delete_post_meta($postId, $metaKey);
                return;
            }

            //Save meta data
            update_post_meta($postId, $metaKey, $_POST[$metaKey]);
        }
    }
public function saveColumnFields($postId)
    {
        //Meta key
        $metaKey = "modularity-mod-posts-expandable-list";

        //Bail early if autosave
        if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {
            return false;
        }

        //Bail early if cron
        if (defined('DOING_CRON') && DOING_CRON) {
            return false;
        }

        //Bail early if not a post request
        if (!isset($_POST) || (is_array($_POST) && empty($_POST)) || !is_array($_POST)) {
            return false;
        }

        //Update if nonce verification succeed
        if (isset($_POST['modularity_post_columns']) && wp_verify_nonce($_POST['modularity_post_columns'],
                'save_columns')) {
            //Delete if not posted data
            if (!isset($_POST[$metaKey])) {
                delete_post_meta($postId, $metaKey);
                return;
            }

            //Save meta data
            update_post_meta($postId, $metaKey, $_POST[$metaKey]);
        }
    }
public function saveColumnFields ( $ postId ) { //Meta key $ metaKey = "modularity-mod-posts-expandable-list" ; //Bail early if autosave if ( defined ( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) { return false ; } //Bail early if cron if ( defined ( 'DOING_CRON' ) && DOING_CRON ) { return false ; } //Bail early if not a post request if ( ! isset ( $ _POST ) || ( is_array ( $ _POST ) && empty ( $ _POST ) ) || ! is_array ( $ _POST ) ) { return false ; } //Update if nonce verification succeed if ( isset ( $ _POST [ 'modularity_post_columns' ] ) && wp_verify_nonce ( $ _POST [ 'modularity_post_columns' ] , 'save_columns' ) ) { //Delete if not posted data if ( ! isset ( $ _POST [ $ metaKey ] ) ) { delete_post_meta ( $ postId , $ metaKey ) ; return ; } //Save meta data update_post_meta ( $ postId , $ metaKey , $ _POST [ $ metaKey ] ) ; } }
Saves column names if exandable list template is used
@param  int $postId The id of the post
@return void
Saves column names if exandable list template is used