• Resolved dreihochzwo

    (@tmconnect)


    In the generated html of the Tab shortcode by the plugin_shortcode.php in the tabs-folder the ID “oscitas-tabs-*” is set in the >ul<.

    $scontent = '<ul class="nav nav-tabs'.EBS_CONTAINER_CLASS.'" id="oscitas-tabs-' . $id . '">' . implode('', $_oscitas_tabs[$id]['tabs']) . '</ul><div
        class="tab-content'.EBS_CONTAINER_CLASS.'">' . implode('', $_oscitas_tabs[$id]['panes']) . '</div>';

    This is different to the Accordion/Toggle shortcode, where the ID is set to the surounding div.

    $output .= '<div class="panel-group ' . $class .EBS_CONTAINER_CLASS. '" id="oscitas-accordion-' . $id . '">' . $scontent;

    This makes much more sense, e.g. if the class (yourcustomclass ) which can set in the shortcode has a background attribute it’s not possible to make the Tab container without this background.

    Therefore it would be better to change the code for the tab shortcode to

    $scontent = '<ul class="nav nav-tabs'.EBS_CONTAINER_CLASS.'">' . implode('', $_oscitas_tabs[$id]['tabs']) . '</ul><div
        class="tab-content'.EBS_CONTAINER_CLASS.'">' . implode('', $_oscitas_tabs[$id]['panes']) . '</div>';
        if (trim($scontent) != "") {
            $output = '<div id="oscitas-tabs-' . $id . '" class="' . $class . '">' . $scontent;
            $output .= '</div>';

    I didn’t check if this should be done for other shortcodes.

    Thanks
    Thomas

    https://wordpress.org/plugins/easy-bootstrap-shortcodes/

Viewing 1 replies (of 1 total)
  • Plugin Author osCitas Themes

    (@oscitas)

    Hi Thomas,

    Thanks for your suggestion, we will look into it and will test it, if all goes well, we will implement it.

    Thanks

Viewing 1 replies (of 1 total)
  • The topic ‘ID and Class order in Tab shortcode’ is closed to new replies.