source/php/Editor.php
public function registerTabs()
    {
        global $post;

        if (!$post && !isset($_GET['page_for'])) {
            return;
        }

        if (!$post && isset($_GET['page_for']) && !empty($_GET['page_for'])) {
            $post = get_post($_GET['page_for']);
        }

        $modulesEditorId = false;

        if ($post) {
            $modulesEditorId = $post->ID;
            $thePostId = $post->ID;
        }

        if ($postType = self::isPageForPostType($post->ID)) {
            $modulesEditorId = 'archive-' . $postType . '&page_for=' . $post->ID;
        }

        $tabs = new \Modularity\Editor\Tabs();
        $tabs->add(__('Content', 'modularity'), admin_url('post.php?post=' . $thePostId . '&action=edit'));
        $tabs->add(__('Modules', 'modularity'), admin_url('options.php?page=modularity-editor&id=' . $modulesEditorId));
    }
public function registerTabs()
    {
        global $post;

        if (!$post && !isset($_GET['page_for'])) {
            return;
        }

        if (!$post && isset($_GET['page_for']) && !empty($_GET['page_for'])) {
            $post = get_post($_GET['page_for']);
        }

        $modulesEditorId = false;

        if ($post) {
            $modulesEditorId = $post->ID;
            $thePostId = $post->ID;
        }

        if ($postType = self::isPageForPostType($post->ID)) {
            $modulesEditorId = 'archive-' . $postType . '&page_for=' . $post->ID;
        }

        $tabs = new \Modularity\Editor\Tabs();
        $tabs->add(__('Content', 'modularity'), admin_url('post.php?post=' . $thePostId . '&action=edit'));
        $tabs->add(__('Modules', 'modularity'), admin_url('options.php?page=modularity-editor&id=' . $modulesEditorId));
    }
public function registerTabs ( ) { global $ post ; if ( ! $ post && ! isset ( $ _GET [ 'page_for' ] ) ) { return ; } if ( ! $ post && isset ( $ _GET [ 'page_for' ] ) && ! empty ( $ _GET [ 'page_for' ] ) ) { $ post = get_post ( $ _GET [ 'page_for' ] ) ; } $ modulesEditorId = false ; if ( $ post ) { $ modulesEditorId = $ post -> ID ; $ thePostId = $ post -> ID ; } if ( $ postType = self :: isPageForPostType ( $ post -> ID ) ) { $ modulesEditorId = 'archive-' . $ postType . '&page_for=' . $ post -> ID ; } $ tabs = new \ Modularity \ Editor \ Tabs ( ) ; $ tabs -> add ( __ ( 'Content' , 'modularity' ) , admin_url ( 'post.php?post=' . $ thePostId . '&action=edit' ) ) ; $ tabs -> add ( __ ( 'Modules' , 'modularity' ) , admin_url ( 'options.php?page=modularity-editor&id=' . $ modulesEditorId ) ) ; }
Registers navigation tabs
@return void
Registers navigation tabs