1. Go to this page and download the library: Download typisttech/wp-admin-tabs 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/ */
typisttech / wp-admin-tabs example snippets
$adminTabCollection = new AdminTabCollection();
$adminTabCollection->add(
new AdminTab('Blog', 'https://typist.tech'),
new AdminTab('Plugins', admin_url('plugins.php')),
new AdminTab('Users', admin_url('users.php')),
new AdminTab('Tab A', admin_url('users.php')),
new AdminTab('Tab B', admin_url('users.php')),
);
// This echos the tabs:
$adminTabCollection->render();
// This returns the HTML string of the tabs:
$html = $adminTabCollection->toHtml();
new AdminTab('Blog', 'https://typist.tech');
new AdminTab('Blog', admin_url('plugins.php'));
$adminTabCollection = new AdminTabCollection();
// Add single admin tab.
$adminTabCollection->add(
new AdminTab('Users', admin_url('users.php'))
);
// Add multiple admin tabs.
$adminTabCollection->add(
new AdminTab('Blog', 'https://typist.tech'),
new AdminTab('Plugins', admin_url('plugins.php'))
);
$adminTabCollection = new AdminTabCollection();
$adminTabCollection->add(
new AdminTab('Blog', 'https://typist.tech'),
new AdminTab('Plugins', admin_url('plugins.php')),
new AdminTab('Users', admin_url('users.php'))
);
$adminTabCollection->render();
$adminTabCollection = new AdminTabCollection();
$adminTabCollection->add(
new AdminTab('Blog', 'https://typist.tech'),
new AdminTab('Plugins', admin_url('plugins.php')),
new AdminTab('Users', admin_url('users.php'))
);
$adminTabCollection->toHtml();
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.