2017 © Pedro Peláez
 

library wp_tabbed_navigation

Automate creating a tabbed navigation and maintaining tabbed states

image

objectivco/wp_tabbed_navigation

Automate creating a tabbed navigation and maintaining tabbed states

  • Tuesday, October 17, 2017
  • by clifgriffin
  • Repository
  • 3 Watchers
  • 5 Stars
  • 43 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

WP_Tabbed_Navigation

Automate creating a tabbed navigation and maintaining tabbed states, (*1)

Installing

Use composer:, (*2)

composer require objectivco/wp_tabbed_navigation

Or include the file. (But really, just use composer), (*3)

Initiating the Tab System

$wp_tabbed_navigation = new WP_Tabbed_Navigation( 'My Plugin Settings', $selected_tab_query_arg = 'subpage' );

Setup Some Submenus

These will be linked to our tab'

add_options_page( __( 'My Plugin Settings', 'my-plugin' ), __( 'My Plugin Settings', 'my-plugin' ), 'manage_options', 'my-plugin-settings', array($this, 'admin_page') );

Setup Tabs Using The Same Menu Slugs

$wp_tabbed_navigation->add_tab( 'Settings', add_query_arg( array('subpage' => 'settings'), menu_page_url('my-plugin-settings', false) ) );
$wp_tabbed_navigation->add_tab( 'Add-ons', add_query_arg( array('subpage' => 'addons'), menu_page_url('my-plugin-settings', false) ) );
$wp_tabbed_navigation->add_tab( 'License', add_query_arg( array('subpage' => 'license'), menu_page_url('my-plugin-settings', false) ) );
$wp_tabbed_navigation->add_tab( 'Support', add_query_arg( array('subpage' => 'support'), menu_page_url('my-plugin-settings', false) ) );

Displaying the Tabs

Add this to the top of each admin page in a tab.

$wp_tabbed_navigation->display_tabs();

That's it! Have fun kids.

The Versions

17/10 2017

dev-master

9999999-dev https://github.com/Objectivco/WP_Tabbed_Navigation

Automate creating a tabbed navigation and maintaining tabbed states

  Sources   Download

GPL-3.0+

The Requires

  • php >=5.2.0

 

by Clifton Griffin

13/10 2017

0.1.0

0.1.0.0 https://github.com/Objectivco/WP_Tabbed_Navigation

Automate creating a tabbed navigation and maintaining tabbed states

  Sources   Download

GPL-3.0+

The Requires

  • php >=5.2.0

 

by Clifton Griffin