Created
December 10, 2014 16:13
-
-
Save mototeam/1288fe335852623e75b6 to your computer and use it in GitHub Desktop.
MotoPress Vertical Tabs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: MotoPress Vertical Tabs | |
* Plugin URI: http://www.getmotopress.com/ | |
* Description: Add vertical style to Tabs widget | |
* Version: 0.1 | |
* Author: MotoPress Team | |
* Author URI: http://www.getmotopress.com/ | |
* License: GPL2 or later | |
*/ | |
function mp_vertical_tabs_example($motopressCELibrary) { | |
$tabsObj = &$motopressCELibrary->getObject('mp_tabs'); | |
if ($tabsObj) { | |
$styleClasses = &$tabsObj->getStyle('mp_style_classes'); | |
$styleClasses['predefined'] = array( | |
'type' => array( | |
'label' => 'Style', | |
'values' => array( | |
'vertical' => array( | |
'class' => 'mpd-tabs-vertical', | |
'label' => 'Vertical', | |
), | |
) | |
) | |
); | |
// remove default selector | |
unset($styleClasses['selector']); | |
} | |
} | |
add_action('mp_library', 'mp_vertical_tabs_example', 10, 1); | |
/** add this styles to your theme | |
.motopress-tabs-obj.mpd-tabs-vertical ul { | |
float: left; | |
} | |
.motopress-tabs-obj.ui-tabs.motopress-tabs-basic.mpd-tabs-vertical .ui-tabs-nav li{ | |
float: none !important; | |
} | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment