1. Go to this page and download the library: Download wpbones/pure-css-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/ */
wpbones / pure-css-tabs example snippets
copy
public function index()
{
// enqueue the minified version
PureCSSTabsProvider::enqueueStyles();
// ...
}
copy
// enqueue the minified version
PureCSSTabsProvider::enqueueStyles();
// enqueue the flat version
PureCSSTabsProvider::enqueueStyles( false );
// return the absolute path of the minified css
PureCSSTabsProvider::css();
// return the absolute path of the flat css
PureCSSTabsProvider::css();
copy
/**
* Display the open tab.
*
* @param string|array $label The label of tab or un array with [label, group]
* @param null $id Optional. ID of tab. If null, will sanitize_title() the label.
* @param bool $selected Optional. Default false. TRUE for checked.
* @param string $group Optional. Group of tabs when you want to handle multiple tab in the same view. Default 'tabs'
*/
public static function openTab( $label, $id = null, $selected = false ) {}