my-admin-tabs

Organize your admin panel / page settings with tabs.

How to Create

Can be created from an Admin Panel Object:

$titan = TitanFramework::getInstance( 'my-theme' );
$adminPanel = $titan->createAdminPanel( array(
'name' => 'My Admin Panel',
) );
$generalTab = $adminPanel->createTab( array(
'name' => 'My General Tab',
) );
// Create options in My General Tab
$generalTab->createOption( ... );

[zilla_alert]This will create a tab inside ‘My Admin Panel’ named ‘My General Tab’.[/zilla_alert]

Settings / Parameters

Parameter Type Description
name string The name of the admin tab. This is the name shown the tab itself.
desc string (Optional) A description displayed just below the tab when it’s active.
id string (Optional) A unique slug for this admin tab. Defaults to a generated slug from the name parameter. This is appended to the url as admin.php?page=current_page&tab=id

Example

$titan = TitanFramework::getInstance( 'titan' );
$adminPanel = $titan->createAdminPanel( array(
'name' => 'My Admin Panel',
) );
$generalTab = $adminPanel->createTab( array(
'name' => 'My General Tab',
) );
$generalTab = $adminPanel->createTab( array(
'name' => '2nd Tab',
) );
$generalTab = $adminPanel->createTab( array(
'name' => '3rd Tab',
) );