[Plugin: WP-Tabbity] A little tweak for stability …
-
I like this Plugin, it is lightweigt and simple but there is a little problem with generating the ID’s (bulid out of title for the tab).
I changed the following in the wp-tabbity.php to generate valid ID’s:
…
class WPTabbity {
var $tabset = array();
var $tab_count = 0;
……
function tab($atts, $content) {
$this->tab_count++;
extract(shortcode_atts(array(
‘title’ => ‘Tab-‘ . $this->tab_count,
‘id’ => ‘tabs-‘ . $this->tab_count,
‘class’ => $this->class,
‘order’ => $this->order
), $atts));
$this->addTab($title, $id, $class, $order, $content);
// return ‘No, you are not crazy.’;
}
…Also the CSS file is a little heavy and could be shortened like:
/* Tabs
———————————-*/
.ui-tabs { padding: 0; zoom: 1; }
.ui-tabs .ui-tabs-nav { list-style: none; position: relative; padding: 1px 0; }
.ui-tabs .ui-tabs-nav li { position: relative; float: left; border-width: 0 !important; margin: 0 4px -1px 0 !important; padding: 0 !important; background-color:#e9e8e0; list-style:none !important;line-height:24px !important}
.ui-tabs .ui-tabs-nav li a { float: left; text-decoration: none; padding: 4px 10px !important; color:#24697A !important;line-height:24px !important}
.ui-tabs .ui-tabs-nav li.ui-tabs-selected { border-width: 0 !important; ;height:36px;}
.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; color:#FFF !important; background-color:#24697A;}
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; }
.ui-tabs .ui-tabs-panel { padding: 10px 0; display: block; border-width: 0; background: none; }
.ui-tabs .ui-tabs-hide { display: none !important; }ul.ui-tabs,ul.ui-tabs-nav{margin:0 !important;height:32px;background:#e9e8e0;font-size:13px;font-family:Arial, Helvetica, sans-serif;font-weight:normal;line-height:24px !important
}
- The topic ‘[Plugin: WP-Tabbity] A little tweak for stability …’ is closed to new replies.