PHP code example of objectivco / wp_tabbed_navigation

1. Go to this page and download the library: Download objectivco/wp_tabbed_navigation library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

objectivco / wp_tabbed_navigation example snippets


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

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

$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) ) );

$wp_tabbed_navigation->display_tabs();