Skip to content

Feature request: Allow non-CMB2 pages to be added to tab-groups #1407

@abuyoyo

Description

@abuyoyo

Allow non-CMB2 pages to be added to options-page tab-groups.

  1. A filter hook inside get_tab_group_tabs() could facilitate this
    $tabs = apply_filters( 'cmb2/tab_group', $tabs, $tab_group );

  2. Additionally it would be nice if CMB2 would also provide a method to print out these tabs on the non-CMB2 pages. Even with the filter hook, the non-CMB2 page has to render its own tabs, replicating and slightly modifying code from get_tab_group_tabs() and options_page_output().

The second part would require a more involved solution. Separating the tab-printing logic from options_page_output() and making it available statically/globally to other plugins.
And there are probably other considerations to be thought through. So perhaps item 2 can be considered separately from the filter hook.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions