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 $label The label of tab.
* @param null $id Optional. ID of tab. If null, will sanitize_title() the label.
* @param bool $selected Optional. Default false. TRUE for checked.
*/
public static function openTab( $label, $id = null, $selected = false ) {}
html copy
<!-- main tabs container -->
<div class="wpbones-tabs">
<!-- first tab -->
echo WPkirk()->view( 'folder.tab1' )
html copy
<div class="wpbones-tabs">
WPKirk\PureCSSTabs\PureCSSTabsProvider::openTab( 'Tab 1', null, true )
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.