source/php/Editor.php
public function metaBoxSidebar($post, $args)
    {
        global $post;

        $options = null;

        if (\Modularity\Helper\Post::isArchive()) {
            global $archive;
            $options = get_option('modularity_' . $archive . '_sidebar-options');
        } else {
            if ($post) {
                $options = get_post_meta($post->ID, 'modularity-sidebar-options', true);
            } else {
                if (!isset($_GET['id']) || empty($_GET['id'])) {
                    throw new \Error('Get paramter ID is empty.');
                }

                $options = get_post_meta($_GET['id'], 'modularity-sidebar-options', true);
            }
        }

        if (isset($options[$args['args']['sidebar']['id']])) {
            $options = $options[$args['args']['sidebar']['id']];
        } else {
            $options = null;
        }

        include MODULARITY_TEMPLATE_PATH . 'editor/modularity-sidebar-drop-area.php';
    }
public function metaBoxSidebar($post, $args)
    {
        global $post;

        $options = null;

        if (\Modularity\Helper\Post::isArchive()) {
            global $archive;
            $options = get_option('modularity_' . $archive . '_sidebar-options');
        } else {
            if ($post) {
                $options = get_post_meta($post->ID, 'modularity-sidebar-options', true);
            } else {
                if (!isset($_GET['id']) || empty($_GET['id'])) {
                    throw new \Error('Get paramter ID is empty.');
                }

                $options = get_post_meta($_GET['id'], 'modularity-sidebar-options', true);
            }
        }

        if (isset($options[$args['args']['sidebar']['id']])) {
            $options = $options[$args['args']['sidebar']['id']];
        } else {
            $options = null;
        }

        include MODULARITY_TEMPLATE_PATH . 'editor/modularity-sidebar-drop-area.php';
    }
public function metaBoxSidebar ( $ post , $ args ) { global $ post ; $ options = null ; if ( \ Modularity \ Helper \ Post :: isArchive ( ) ) { global $ archive ; $ options = get_option ( 'modularity_' . $ archive . '_sidebar-options' ) ; } else { if ( $ post ) { $ options = get_post_meta ( $ post -> ID , 'modularity-sidebar-options' , true ) ; } else { if ( ! isset ( $ _GET [ 'id' ] ) || empty ( $ _GET [ 'id' ] ) ) { throw new \ Error ( 'Get paramter ID is empty.' ) ; } $ options = get_post_meta ( $ _GET [ 'id' ] , 'modularity-sidebar-options' , true ) ; } } if ( isset ( $ options [ $ args [ 'args' ] [ 'sidebar' ] [ 'id' ] ] ) ) { $ options = $ options [ $ args [ 'args' ] [ 'sidebar' ] [ 'id' ] ] ; } else { $ options = null ; } include MODULARITY_TEMPLATE_PATH . 'editor/modularity-sidebar-drop-area.php' ; }
The content for sidebar metabox
@param  array $post
@param  array $args The metabox args
@return void
The content for sidebar metabox