Plugin Directory

Changeset 2742958


Ignore:
Timestamp:
06/15/2022 02:24:59 PM (4 years ago)
Author:
shapedplugin
Message:

Release 2.1.11 version

Location:
wp-expand-tabs-free
Files:
221 added
10 edited

Legend:

Unmodified
Added
Removed
  • wp-expand-tabs-free/trunk/admin/partials/class-wp-tabs-premium.php

    r2672880 r2742958  
    4949            );
    5050
    51             $raw = wp_remote_retrieve_body( wp_remote_get( 'http://wptally.com/api/' . $username, $params ) );
     51            $raw = wp_remote_retrieve_body( wp_remote_get( 'https://wptally.com/api/' . $username, $params ) );
    5252            $raw = json_decode( $raw, true );
    5353
    54             if ( array_key_exists( 'error', $raw ) ) {
     54            if ( is_array( $raw ) && array_key_exists( 'error', $raw ) ) {
    5555                $data = array(
    5656                    'error' => $raw['error'],
     
    111111                        <h3 class="sp-tabs__font-24">
    112112                        <?php
    113                         $plugin_data  = $this->happy_users();
    114                         $plugin_names = array_values( $plugin_data['plugins'] );
    115 
    116                         $active_installations = array_column( $plugin_names, 'installs', 'url' );
    117                         echo esc_attr( $active_installations['http://wordpress.org/plugins/wp-expand-tabs-free'] ) . '+';
     113                        $plugin_data = $this->happy_users();
     114                        if ( isset( $plugin_data['plugins'] ) ) {
     115                            $plugin_names         = array_values( $plugin_data['plugins'] );
     116                            $active_installations = array_column( $plugin_names, 'installs', 'url' );
     117                            echo esc_attr( $active_installations['http://wordpress.org/plugins/wp-expand-tabs-free'] ) . '+';
     118                        } else {
     119                            echo '7000+';
     120                        }
    118121                        ?>
    119122                        </h3>
     
    123126                        <h3 class="sp-tabs__font-24">
    124127                        <?php
    125                         $active_installations = array_column( $plugin_names, 'downloads', 'url' );
    126                         echo esc_attr( $active_installations['http://wordpress.org/plugins/wp-expand-tabs-free'] );
     128                        if ( isset( $plugin_data['plugins'] ) ) {
     129                            $active_downloads = array_column( $plugin_names, 'downloads', 'url' );
     130                            echo esc_attr( $active_downloads['http://wordpress.org/plugins/wp-expand-tabs-free'] );
     131                        } else {
     132                            echo '78779';
     133                        }
    127134                        ?>
    128135                        </h3>
     
    132139                        <h3 class="sp-tabs__font-24">
    133140                        <?php
    134                         $active_installations = array_column( $plugin_names, 'rating', 'url' );
    135                         echo esc_attr( $active_installations['http://wordpress.org/plugins/wp-expand-tabs-free'] ) . '/5';
     141                        if ( isset( $plugin_data['plugins'] ) ) {
     142                            $plugin_rating = array_column( $plugin_names, 'rating', 'url' );
     143                            echo esc_attr( $plugin_rating['http://wordpress.org/plugins/wp-expand-tabs-free'] ) . '/5';
     144                        } else {
     145                            echo '4.9/5';
     146                        }
    136147                        ?>
    137148                        </h3>
     
    350361                            <?php
    351362                            $install = 0;
    352                             foreach ( $plugin_names as &$plugin_name ) {
    353                                 $install += $plugin_name['installs'];
     363                            if ( isset( $plugin_data['plugins'] ) ) {
     364
     365                                foreach ( $plugin_names as &$plugin_name ) {
     366                                    $install += $plugin_name['installs'];
     367                                }
     368                                echo esc_attr( $install + '15000' ) . '+';
     369                            } else {
     370                                echo '243000+';
    354371                            }
    355                             echo esc_attr( $install + '15000' ) . '+';
    356372                            ?>
    357373                            Happy Users in 160+ Countries </h2>
  • wp-expand-tabs-free/trunk/includes/class-wp-tabs.php

    r2700595 r2742958  
    160160
    161161        /**
     162         * The class Elementor shortcode addons..
     163         */
     164        if ( ( is_plugin_active( 'elementor/elementor.php' ) || is_plugin_active_for_network( 'elementor/elementor.php' ) ) ) {
     165            require_once WP_TABS_PATH . 'admin/ElementorAddons/class-wp-tabs-elementor-addons.php';
     166        }
     167
     168        /**
    162169         * The class responsible for defining all actions that occur in the public-facing
    163170         * side of the site.
  • wp-expand-tabs-free/trunk/plugin-main.php

    r2725318 r2742958  
    1212 * Plugin URI:        https://shapedplugin.com/plugin/wp-tabs-pro/?ref=1
    1313 * Description:       WP Tabs is the most user-friendly, highly customizable, responsive WordPress tabs plugin to display your content in a clean organized tabbed navigation.
    14  * Version:           2.1.10
     14 * Version:           2.1.11
    1515 * Author:            ShapedPlugin
    1616 * Author URI:        https://shapedplugin.com/
     
    3232 */
    3333define( 'WP_TABS_NAME', 'WP Tabs' );
    34 define( 'WP_TABS_VERSION', '2.1.10' );
     34define( 'WP_TABS_VERSION', '2.1.11' );
    3535define( 'WP_TABS_BASENAME', plugin_basename( __FILE__ ) );
    3636define( 'WP_TABS_PATH', plugin_dir_path( __FILE__ ) );
  • wp-expand-tabs-free/trunk/public/css/wp-tabs-public.css

    r2725318 r2742958  
    22 * All of the CSS for public-facing functionality had included in this file.
    33 */
     4.edit-post-visual-editor .sp-tab__lay-default *,
    45.sp-tab__lay-default * {
    56    box-sizing: border-box;
     
    213214    padding-bottom: 56.25%;
    214215    /* 16:9 */
    215     padding-top: 25px;
    216216    height: 0;
    217217}
  • wp-expand-tabs-free/trunk/public/css/wp-tabs-public.min.css

    r2725318 r2742958  
    1 .sp-tab__lay-default *{box-sizing:border-box}#sp-tab__ul{margin:0;padding:0;font-size:0}#sp-tab__ul li{list-style:none;margin:0}img.alignright{float:right;margin:0 0 1em 1em}img.alignleft{float:left;margin:0 1em 1em 0}.sp-tab__nav{display:flex;flex-wrap:wrap;padding-left:0;margin-bottom:0;list-style:none}.sp-tab__nav-link{display:flex;flex-direction:column;justify-content:center;align-items:center}.sp-tab__nav-link .sp-tab__tab_title{display:inline-block;margin:0}.sp-tab__nav-link .sp-tab__tab_title:before{display:none}.sp-tab__nav-link:focus,.sp-tab__nav-link:hover{text-decoration:none}.sp-tab__nav-tabs{border-bottom:1px solid #dee2e6}.sp-tab__nav-tabs .sp-tab__nav-link:focus,.sp-tab__nav-tabs .sp-tab__nav-link:hover{border-color:#e9ecef #e9ecef #dee2e6}.sp-tab__nav-tabs .sp-tab__nav-link.sp-tab__disabled{color:#6c757d;background-color:transparent;border-color:transparent}.sp-tab__nav-tabs .sp-tab__dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.sp-tab__nav-pills .sp-tab__nav-link{border-radius:.25rem}.sp-tab__nav-pills .show>.sp-tab__nav-link,.sp-tab__nav-pills .sp-tab__nav-link.sp-tab__active{color:#fff;background-color:#007bff}.sp-tab__nav-fill .sp-tab__nav-item{flex:1 1 auto;text-align:center}.sp-tab__nav-justified .sp-tab__nav-item{flex-basis:0;flex-grow:1;text-align:center}.sp-tab__tab-content>.sp-tab__tab-pane{display:none;overflow:hidden}.sp-tab__tab-content>.sp-tab__active{display:block}.sp-tab__fade{transition:opacity .15s linear}@media (prefers-reduced-motion:reduce){.sp-tab__fade{transition:none}}.sp-tab__fade:not(.sp-tab__show){opacity:0}.sp-tab__lay-default ul>li>a{text-decoration:none;color:#111}.sp-tab__lay-default ul .sp-tab__nav-item:last-child{margin-right:0}.sp-tab__nav-tabs .sp-tab__nav-link.sp-tab__disabled,.sp-tab__nav-tabs .sp-tab__nav-link.sp-tab__disabled i.sp-tab-fa{color:#6c757d;pointer-events:none;cursor:default;background-color:#f6f6f6}.sp-tab__lay-default ul>li>a>span,.sp-tab__lay-default ul>li>label>span{font-size:80%;color:#716c6c;display:flex;align-items:center}div[id^=sp-wp-tabs-wrapper_]{position:relative}.sp-tab__preloader{position:absolute;z-index:999;left:50%;top:50%;transform:translateY(-50%)}.sp-tab__spinner{margin:100px auto;width:50px;height:40px;text-align:center;font-size:10px}.sp-tab__spinner>div{background-color:#333;height:100%;width:6px;display:inline-block;-webkit-animation:sk-stretchdelay 1.2s infinite ease-in-out;animation:sk-stretchdelay 1.2s infinite ease-in-out}.sp-tab__spinner .rect2{-webkit-animation-delay:-1.1s;animation-delay:-1.1s}.sp-tab__spinner .rect3{-webkit-animation-delay:-1s;animation-delay:-1s}.sp-tab__spinner .rect4{-webkit-animation-delay:-.9s;animation-delay:-.9s}.sp-tab__spinner .rect5{-webkit-animation-delay:-.8s;animation-delay:-.8s}.sp-tab__tab-content{width:100%}.wp-tab-iframe-container{position:relative;padding-bottom:56.25%;padding-top:25px;height:0}.sp-tab__tab-pane .wp-tab-iframe-container iframe{width:100%!important;height:100%!important;border:none;margin:0;padding:0;position:absolute;top:0;left:0}@-webkit-keyframes sk-stretchdelay{0%,100%,40%{-webkit-transform:scaleY(.4)}20%{-webkit-transform:scaleY(1)}}@keyframes sk-stretchdelay{0%,100%,40%{transform:scaleY(.4);-webkit-transform:scaleY(.4)}20%{transform:scaleY(1);-webkit-transform:scaleY(1)}}.sp-tab__lay-default .sp-tab__tab-content p:empty{display:none}.sp-tab__lay-default .sp-tab__tab-content label{display:inline}.sp-tab__lay-default .sp-tab__tab-content ol,.sp-tab__lay-default .sp-tab__tab-content ul{margin:0 0 1rem 1rem}.sp-tab__lay-default .sp-tab__tab-content .sp-tab-content ul{list-style:inherit}
     1.edit-post-visual-editor .sp-tab__lay-default *,.sp-tab__lay-default *{box-sizing:border-box}#sp-tab__ul{margin:0;padding:0;font-size:0}#sp-tab__ul li{list-style:none;margin:0}img.alignright{float:right;margin:0 0 1em 1em}img.alignleft{float:left;margin:0 1em 1em 0}.sp-tab__nav{display:flex;flex-wrap:wrap;padding-left:0;margin-bottom:0;list-style:none}.sp-tab__nav-link{display:flex;flex-direction:column;justify-content:center;align-items:center}.sp-tab__nav-link .sp-tab__tab_title{display:inline-block;margin:0}.sp-tab__nav-link .sp-tab__tab_title:before{display:none}.sp-tab__nav-link:focus,.sp-tab__nav-link:hover{text-decoration:none}.sp-tab__nav-tabs{border-bottom:1px solid #dee2e6}.sp-tab__nav-tabs .sp-tab__nav-link:focus,.sp-tab__nav-tabs .sp-tab__nav-link:hover{border-color:#e9ecef #e9ecef #dee2e6}.sp-tab__nav-tabs .sp-tab__nav-link.sp-tab__disabled{color:#6c757d;background-color:transparent;border-color:transparent}.sp-tab__nav-tabs .sp-tab__dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.sp-tab__nav-pills .sp-tab__nav-link{border-radius:.25rem}.sp-tab__nav-pills .show>.sp-tab__nav-link,.sp-tab__nav-pills .sp-tab__nav-link.sp-tab__active{color:#fff;background-color:#007bff}.sp-tab__nav-fill .sp-tab__nav-item{flex:1 1 auto;text-align:center}.sp-tab__nav-justified .sp-tab__nav-item{flex-basis:0;flex-grow:1;text-align:center}.sp-tab__tab-content>.sp-tab__tab-pane{display:none;overflow:hidden}.sp-tab__tab-content>.sp-tab__active{display:block}.sp-tab__fade{transition:opacity .15s linear}@media (prefers-reduced-motion:reduce){.sp-tab__fade{transition:none}}.sp-tab__fade:not(.sp-tab__show){opacity:0}.sp-tab__lay-default ul>li>a{text-decoration:none;color:#111}.sp-tab__lay-default ul .sp-tab__nav-item:last-child{margin-right:0}.sp-tab__nav-tabs .sp-tab__nav-link.sp-tab__disabled,.sp-tab__nav-tabs .sp-tab__nav-link.sp-tab__disabled i.sp-tab-fa{color:#6c757d;pointer-events:none;cursor:default;background-color:#f6f6f6}.sp-tab__lay-default ul>li>a>span,.sp-tab__lay-default ul>li>label>span{font-size:80%;color:#716c6c;display:flex;align-items:center}div[id^=sp-wp-tabs-wrapper_]{position:relative}.sp-tab__preloader{position:absolute;z-index:999;left:50%;top:50%;transform:translateY(-50%)}.sp-tab__spinner{margin:100px auto;width:50px;height:40px;text-align:center;font-size:10px}.sp-tab__spinner>div{background-color:#333;height:100%;width:6px;display:inline-block;-webkit-animation:sk-stretchdelay 1.2s infinite ease-in-out;animation:sk-stretchdelay 1.2s infinite ease-in-out}.sp-tab__spinner .rect2{-webkit-animation-delay:-1.1s;animation-delay:-1.1s}.sp-tab__spinner .rect3{-webkit-animation-delay:-1s;animation-delay:-1s}.sp-tab__spinner .rect4{-webkit-animation-delay:-.9s;animation-delay:-.9s}.sp-tab__spinner .rect5{-webkit-animation-delay:-.8s;animation-delay:-.8s}.sp-tab__tab-content{width:100%}.wp-tab-iframe-container{position:relative;padding-bottom:56.25%;height:0}.sp-tab__tab-pane .wp-tab-iframe-container iframe{width:100%!important;height:100%!important;border:none;margin:0;padding:0;position:absolute;top:0;left:0}@-webkit-keyframes sk-stretchdelay{0%,100%,40%{-webkit-transform:scaleY(.4)}20%{-webkit-transform:scaleY(1)}}@keyframes sk-stretchdelay{0%,100%,40%{transform:scaleY(.4);-webkit-transform:scaleY(.4)}20%{transform:scaleY(1);-webkit-transform:scaleY(1)}}.sp-tab__lay-default .sp-tab__tab-content p:empty{display:none}.sp-tab__lay-default .sp-tab__tab-content label{display:inline}.sp-tab__lay-default .sp-tab__tab-content ol,.sp-tab__lay-default .sp-tab__tab-content ul{margin:0 0 1rem 1rem}.sp-tab__lay-default .sp-tab__tab-content .sp-tab-content ul{list-style:inherit}
  • wp-expand-tabs-free/trunk/public/js/tab.js

    r2602769 r2742958  
    171171   * ------------------------------------------------------------------------
    172172   */
    173   var NAME = 'tab';
     173  var NAME = 'sp_tab';
    174174  var VERSION = '4.3.1';
    175175  var DATA_KEY = 'sp.tab';
  • wp-expand-tabs-free/trunk/public/js/tab.min.js

    r2602769 r2742958  
    44  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
    55  */
    6 !function(global,factory){"object"==typeof exports&&"undefined"!=typeof module?module.exports=factory(require("jquery"),require("./util.js")):"function"==typeof define&&define.amd?define(["jquery","./util.js"],factory):(global=global||self).SP_WP_Tabs=factory(global.jQuery,global.Util)}(this,(function($,Util){"use strict";function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){return protoProps&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Constructor}$=$&&$.hasOwnProperty("default")?$.default:$,Util=Util&&Util.hasOwnProperty("default")?Util.default:Util;var TRANSITION_END="transitionend",MILLISECONDS_MULTIPLIER=1e3;function getSpecialTransitionEndEvent(){return{bindType:TRANSITION_END,delegateType:TRANSITION_END,handle:function handle(event){if($(event.target).is(this))return event.handleObj.handler.apply(this,arguments)}}}function transitionEndEmulator(duration){var _this=this,called=!1;return $(this).one(Util.TRANSITION_END,(function(){called=!0})),setTimeout((function(){called||Util.triggerTransitionEnd(_this)}),duration),this}function setTransitionEndSupport(){$.fn.emulateTransitionEnd=transitionEndEmulator,$.event.special[Util.TRANSITION_END]=getSpecialTransitionEndEvent()}var Util={TRANSITION_END:"bsTransitionEnd",getUID:function getUID(prefix){do{prefix+=~~(Math.random()*MAX_UID)}while(document.getElementById(prefix));return prefix},getSelectorFromElement:function getSelectorFromElement(element){var selector=element.getAttribute("data-target");if(!selector||"#"===selector){var forAttr=element.getAttribute("for");selector=forAttr&&"#"!==forAttr?forAttr.trim():""}try{return document.querySelector(selector)?selector:null}catch(err){return null}},getTransitionDurationFromElement:function getTransitionDurationFromElement(element){if(!element)return 0;var transitionDuration=$(element).css("transition-duration"),transitionDelay=$(element).css("transition-delay"),floatTransitionDuration=parseFloat(transitionDuration),floatTransitionDelay=parseFloat(transitionDelay);return floatTransitionDuration||floatTransitionDelay?(transitionDuration=transitionDuration.split(",")[0],transitionDelay=transitionDelay.split(",")[0],1e3*(parseFloat(transitionDuration)+parseFloat(transitionDelay))):0},reflow:function reflow(element){return element.offsetHeight},triggerTransitionEnd:function triggerTransitionEnd(element){$(element).trigger(TRANSITION_END)},supportsTransitionEnd:function supportsTransitionEnd(){return Boolean(TRANSITION_END)},isElement:function isElement(obj){return(obj[0]||obj).nodeType},typeCheckConfig:function typeCheckConfig(componentName,config,configTypes){for(var property in configTypes)if(Object.prototype.hasOwnProperty.call(configTypes,property)){var expectedTypes=configTypes[property],value=config[property],valueType=value&&Util.isElement(value)?"element":toType(value);if(!new RegExp(expectedTypes).test(valueType))throw new Error(componentName.toUpperCase()+': Option "'+property+'" provided type "'+valueType+'" but expected type "'+expectedTypes+'".')}},findShadowRoot:function findShadowRoot(element){if(!document.documentElement.attachShadow)return null;if("function"==typeof element.getRootNode){var root=element.getRootNode();return root instanceof ShadowRoot?root:null}return element instanceof ShadowRoot?element:element.parentNode?Util.findShadowRoot(element.parentNode):null}};setTransitionEndSupport();var NAME="tab",VERSION="4.3.1",DATA_KEY="sp.tab",EVENT_KEY=".sp.tab",DATA_API_KEY=".data-api",JQUERY_NO_CONFLICT=$.fn.tab,Event={HIDE:"hide.sp.tab",HIDDEN:"hidden.sp.tab",SHOW:"show.sp.tab",SHOWN:"shown.sp.tab",CLICK_DATA_API:"click.sp.tab.data-api"},ClassName_DROPDOWN_MENU="sp-tab__dropdown-menu",ClassName_ACTIVE="sp-tab__active",ClassName_DISABLED="sp-tab__disabled",ClassName_FADE="sp-tab__fade",ClassName_SHOW="sp-tab__show",Selector_DROPDOWN=".sp-tab__dropdown",Selector_NAV_LIST_GROUP=".sp-tab__nav, .list-group",Selector_ACTIVE=".sp-tab__active",Selector_ACTIVE_UL="> li > .sp-tab__active",Selector_DATA_TOGGLE='[data-sptoggle="tab"], [data-sptoggle="pill"], [data-sptoggle="list"]',Selector_DROPDOWN_TOGGLE=".sp-tab__dropdown-toggle",Selector_DROPDOWN_ACTIVE_CHILD="> .sp-tab__dropdown-menu .sp-tab__active",SP_WP_Tabs=function(){function SP_WP_Tabs(element){this._element=element}var _proto=SP_WP_Tabs.prototype;return _proto.show=function show(){var _this=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&$(this._element).hasClass(ClassName_ACTIVE)||$(this._element).hasClass(ClassName_DISABLED))){var target,previous,listElement=$(this._element).closest(Selector_NAV_LIST_GROUP)[0],selector=Util.getSelectorFromElement(this._element);if(listElement){var itemSelector="UL"===listElement.nodeName||"OL"===listElement.nodeName?Selector_ACTIVE_UL:Selector_ACTIVE;previous=(previous=$.makeArray($(listElement).find(itemSelector)))[previous.length-1]}var hideEvent=$.Event(Event.HIDE,{relatedTarget:this._element}),showEvent=$.Event(Event.SHOW,{relatedTarget:previous});if(previous&&$(previous).trigger(hideEvent),$(this._element).trigger(showEvent),!showEvent.isDefaultPrevented()&&!hideEvent.isDefaultPrevented()){selector&&(target=document.querySelector(selector)),this._activate(this._element,listElement);var complete=function complete(){var hiddenEvent=$.Event(Event.HIDDEN,{relatedTarget:_this._element}),shownEvent=$.Event(Event.SHOWN,{relatedTarget:previous});$(previous).trigger(hiddenEvent),$(_this._element).trigger(shownEvent)};target?this._activate(target,target.parentNode,complete):complete()}}},_proto.dispose=function dispose(){$.removeData(this._element,"sp.tab"),this._element=null},_proto._activate=function _activate(element,container,callback){var _this2=this,activeElements,active=(!container||"UL"!==container.nodeName&&"OL"!==container.nodeName?$(container).children(Selector_ACTIVE):$(container).find(Selector_ACTIVE_UL))[0],isTransitioning=callback&&active&&$(active).hasClass(ClassName_FADE),complete=function complete(){return _this2._transitionComplete(element,active,callback)};if(active&&isTransitioning){var transitionDuration=Util.getTransitionDurationFromElement(active);$(active).removeClass(ClassName_SHOW).one(Util.TRANSITION_END,complete).emulateTransitionEnd(transitionDuration)}else complete()},_proto._transitionComplete=function _transitionComplete(element,active,callback){if(active){$(active).removeClass(ClassName_ACTIVE);var dropdownChild=$(active.parentNode).find(Selector_DROPDOWN_ACTIVE_CHILD)[0];dropdownChild&&$(dropdownChild).removeClass(ClassName_ACTIVE),"sptab"===active.getAttribute("role")&&active.setAttribute("aria-selected",!1)}if($(element).addClass(ClassName_ACTIVE),"sptab"===element.getAttribute("role")&&element.setAttribute("aria-selected",!0),Util.reflow(element),element.classList.contains(ClassName_FADE)&&element.classList.add(ClassName_SHOW),element.parentNode&&$(element.parentNode).hasClass(ClassName_DROPDOWN_MENU)){var dropdownElement=$(element).closest(Selector_DROPDOWN)[0];if(dropdownElement){var dropdownToggleList=[].slice.call(dropdownElement.querySelectorAll(Selector_DROPDOWN_TOGGLE));$(dropdownToggleList).addClass(ClassName_ACTIVE)}element.setAttribute("aria-expanded",!0)}callback&&callback()},SP_WP_Tabs._jQueryInterface=function _jQueryInterface(config){return this.each((function(){var $this=$(this),data=$this.data("sp.tab");if(data||(data=new SP_WP_Tabs(this),$this.data("sp.tab",data)),"string"==typeof config){if(void 0===data[config])throw new TypeError('No method named "'+config+'"');data[config]()}}))},_createClass(SP_WP_Tabs,null,[{key:"VERSION",get:function get(){return"4.3.1"}}]),SP_WP_Tabs}();return $(document).on(Event.CLICK_DATA_API,Selector_DATA_TOGGLE,(function(event){event.preventDefault(),SP_WP_Tabs._jQueryInterface.call($(this),"show")})),$.fn.tab=SP_WP_Tabs._jQueryInterface,$.fn.tab.Constructor=SP_WP_Tabs,$.fn.tab.noConflict=function(){return $.fn.tab=JQUERY_NO_CONFLICT,SP_WP_Tabs._jQueryInterface},SP_WP_Tabs}));
     6!function(global,factory){"object"==typeof exports&&"undefined"!=typeof module?module.exports=factory(require("jquery"),require("./util.js")):"function"==typeof define&&define.amd?define(["jquery","./util.js"],factory):(global=global||self).SP_WP_Tabs=factory(global.jQuery,global.Util)}(this,(function($,Util){"use strict";function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}function _createClass(Constructor,protoProps,staticProps){return protoProps&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Constructor}$=$&&$.hasOwnProperty("default")?$.default:$,Util=Util&&Util.hasOwnProperty("default")?Util.default:Util;var TRANSITION_END="transitionend",MILLISECONDS_MULTIPLIER=1e3;function getSpecialTransitionEndEvent(){return{bindType:TRANSITION_END,delegateType:TRANSITION_END,handle:function handle(event){if($(event.target).is(this))return event.handleObj.handler.apply(this,arguments)}}}function transitionEndEmulator(duration){var _this=this,called=!1;return $(this).one(Util.TRANSITION_END,(function(){called=!0})),setTimeout((function(){called||Util.triggerTransitionEnd(_this)}),duration),this}function setTransitionEndSupport(){$.fn.emulateTransitionEnd=transitionEndEmulator,$.event.special[Util.TRANSITION_END]=getSpecialTransitionEndEvent()}var Util={TRANSITION_END:"bsTransitionEnd",getUID:function getUID(prefix){do{prefix+=~~(Math.random()*MAX_UID)}while(document.getElementById(prefix));return prefix},getSelectorFromElement:function getSelectorFromElement(element){var selector=element.getAttribute("data-target");if(!selector||"#"===selector){var forAttr=element.getAttribute("for");selector=forAttr&&"#"!==forAttr?forAttr.trim():""}try{return document.querySelector(selector)?selector:null}catch(err){return null}},getTransitionDurationFromElement:function getTransitionDurationFromElement(element){if(!element)return 0;var transitionDuration=$(element).css("transition-duration"),transitionDelay=$(element).css("transition-delay"),floatTransitionDuration=parseFloat(transitionDuration),floatTransitionDelay=parseFloat(transitionDelay);return floatTransitionDuration||floatTransitionDelay?(transitionDuration=transitionDuration.split(",")[0],transitionDelay=transitionDelay.split(",")[0],1e3*(parseFloat(transitionDuration)+parseFloat(transitionDelay))):0},reflow:function reflow(element){return element.offsetHeight},triggerTransitionEnd:function triggerTransitionEnd(element){$(element).trigger(TRANSITION_END)},supportsTransitionEnd:function supportsTransitionEnd(){return Boolean(TRANSITION_END)},isElement:function isElement(obj){return(obj[0]||obj).nodeType},typeCheckConfig:function typeCheckConfig(componentName,config,configTypes){for(var property in configTypes)if(Object.prototype.hasOwnProperty.call(configTypes,property)){var expectedTypes=configTypes[property],value=config[property],valueType=value&&Util.isElement(value)?"element":toType(value);if(!new RegExp(expectedTypes).test(valueType))throw new Error(componentName.toUpperCase()+': Option "'+property+'" provided type "'+valueType+'" but expected type "'+expectedTypes+'".')}},findShadowRoot:function findShadowRoot(element){if(!document.documentElement.attachShadow)return null;if("function"==typeof element.getRootNode){var root=element.getRootNode();return root instanceof ShadowRoot?root:null}return element instanceof ShadowRoot?element:element.parentNode?Util.findShadowRoot(element.parentNode):null}};setTransitionEndSupport();var NAME="sp_tab",VERSION="4.3.1",DATA_KEY="sp.tab",EVENT_KEY=".sp.tab",DATA_API_KEY=".data-api",JQUERY_NO_CONFLICT=$.fn[NAME],Event={HIDE:"hide.sp.tab",HIDDEN:"hidden.sp.tab",SHOW:"show.sp.tab",SHOWN:"shown.sp.tab",CLICK_DATA_API:"click.sp.tab.data-api"},ClassName_DROPDOWN_MENU="sp-tab__dropdown-menu",ClassName_ACTIVE="sp-tab__active",ClassName_DISABLED="sp-tab__disabled",ClassName_FADE="sp-tab__fade",ClassName_SHOW="sp-tab__show",Selector_DROPDOWN=".sp-tab__dropdown",Selector_NAV_LIST_GROUP=".sp-tab__nav, .list-group",Selector_ACTIVE=".sp-tab__active",Selector_ACTIVE_UL="> li > .sp-tab__active",Selector_DATA_TOGGLE='[data-sptoggle="tab"], [data-sptoggle="pill"], [data-sptoggle="list"]',Selector_DROPDOWN_TOGGLE=".sp-tab__dropdown-toggle",Selector_DROPDOWN_ACTIVE_CHILD="> .sp-tab__dropdown-menu .sp-tab__active",SP_WP_Tabs=function(){function SP_WP_Tabs(element){this._element=element}var _proto=SP_WP_Tabs.prototype;return _proto.show=function show(){var _this=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&$(this._element).hasClass(ClassName_ACTIVE)||$(this._element).hasClass(ClassName_DISABLED))){var target,previous,listElement=$(this._element).closest(Selector_NAV_LIST_GROUP)[0],selector=Util.getSelectorFromElement(this._element);if(listElement){var itemSelector="UL"===listElement.nodeName||"OL"===listElement.nodeName?Selector_ACTIVE_UL:Selector_ACTIVE;previous=(previous=$.makeArray($(listElement).find(itemSelector)))[previous.length-1]}var hideEvent=$.Event(Event.HIDE,{relatedTarget:this._element}),showEvent=$.Event(Event.SHOW,{relatedTarget:previous});if(previous&&$(previous).trigger(hideEvent),$(this._element).trigger(showEvent),!showEvent.isDefaultPrevented()&&!hideEvent.isDefaultPrevented()){selector&&(target=document.querySelector(selector)),this._activate(this._element,listElement);var complete=function complete(){var hiddenEvent=$.Event(Event.HIDDEN,{relatedTarget:_this._element}),shownEvent=$.Event(Event.SHOWN,{relatedTarget:previous});$(previous).trigger(hiddenEvent),$(_this._element).trigger(shownEvent)};target?this._activate(target,target.parentNode,complete):complete()}}},_proto.dispose=function dispose(){$.removeData(this._element,"sp.tab"),this._element=null},_proto._activate=function _activate(element,container,callback){var _this2=this,activeElements,active=(!container||"UL"!==container.nodeName&&"OL"!==container.nodeName?$(container).children(Selector_ACTIVE):$(container).find(Selector_ACTIVE_UL))[0],isTransitioning=callback&&active&&$(active).hasClass(ClassName_FADE),complete=function complete(){return _this2._transitionComplete(element,active,callback)};if(active&&isTransitioning){var transitionDuration=Util.getTransitionDurationFromElement(active);$(active).removeClass(ClassName_SHOW).one(Util.TRANSITION_END,complete).emulateTransitionEnd(transitionDuration)}else complete()},_proto._transitionComplete=function _transitionComplete(element,active,callback){if(active){$(active).removeClass(ClassName_ACTIVE);var dropdownChild=$(active.parentNode).find(Selector_DROPDOWN_ACTIVE_CHILD)[0];dropdownChild&&$(dropdownChild).removeClass(ClassName_ACTIVE),"sptab"===active.getAttribute("role")&&active.setAttribute("aria-selected",!1)}if($(element).addClass(ClassName_ACTIVE),"sptab"===element.getAttribute("role")&&element.setAttribute("aria-selected",!0),Util.reflow(element),element.classList.contains(ClassName_FADE)&&element.classList.add(ClassName_SHOW),element.parentNode&&$(element.parentNode).hasClass(ClassName_DROPDOWN_MENU)){var dropdownElement=$(element).closest(Selector_DROPDOWN)[0];if(dropdownElement){var dropdownToggleList=[].slice.call(dropdownElement.querySelectorAll(Selector_DROPDOWN_TOGGLE));$(dropdownToggleList).addClass(ClassName_ACTIVE)}element.setAttribute("aria-expanded",!0)}callback&&callback()},SP_WP_Tabs._jQueryInterface=function _jQueryInterface(config){return this.each((function(){var $this=$(this),data=$this.data("sp.tab");if(data||(data=new SP_WP_Tabs(this),$this.data("sp.tab",data)),"string"==typeof config){if(void 0===data[config])throw new TypeError('No method named "'+config+'"');data[config]()}}))},_createClass(SP_WP_Tabs,null,[{key:"VERSION",get:function get(){return"4.3.1"}}]),SP_WP_Tabs}();return $(document).on(Event.CLICK_DATA_API,Selector_DATA_TOGGLE,(function(event){event.preventDefault(),SP_WP_Tabs._jQueryInterface.call($(this),"show")})),$.fn[NAME]=SP_WP_Tabs._jQueryInterface,$.fn[NAME].Constructor=SP_WP_Tabs,$.fn[NAME].noConflict=function(){return $.fn[NAME]=JQUERY_NO_CONFLICT,SP_WP_Tabs._jQueryInterface},SP_WP_Tabs}));
  • wp-expand-tabs-free/trunk/public/js/wp-tabs-public.js

    r2719252 r2742958  
    1 (function( $ ) {
     1(function ($) {
    22    'use strict';
    33
    44    $(document).ready(function () {
    55        $('div[id^="sp-wp-tabs-wrapper_"]').each(function () {
    6             var _this         = $(this);
    7             var tabsID        = _this.attr('id');
    8             var preloader     = $('#' + tabsID).data('preloader');
    9             var activemode    = $('#' + tabsID).data('activemode');
     6            var _this = $(this);
     7            var tabsID = _this.attr('id');
     8            var preloader = $('#' + tabsID).data('preloader');
     9            var activemode = $('#' + tabsID).data('activemode');
    1010
    1111            // Preloader
    12             if (preloader){
     12            if (preloader) {
    1313                // $(window).on("load", function () {
    14                     $(".sp-tab__preloader").fadeOut();
     14                $(".sp-tab__preloader").fadeOut();
    1515                // });
    1616            }
     
    1818            // Tabs On Hover
    1919            if ('tabs-activator-event-hover' == activemode) {
    20                 $('#' + tabsID).on('mouseenter.sp.tab.data-api', '[data-sptoggle="tab"], [data-hover="tab"]', function () {
    21                     $(this).tab('show');
     20                $('#' + tabsID).on('mouseenter.sp.tab.data-api', '[data-sptoggle="tab"], [data-hover="tab"]', function (e) {
     21                    e.preventDefault();
     22                    $(this).sp_tab('show');
    2223                });
    2324            }
    24             $('#' + tabsID + ' iframe').wrap("<div class='wp-tab-iframe-container'></div>");
    25            
     25
     26            // Iframe wrapper
     27            $('#' + tabsID + ' iframe:not(.wp-tab-iframe,[src*="omny.fm/"])').each(function (i) {
     28                let max_width = $(this).attr('width') > 100 ? 'max-width:' + $(this).attr('width') + 'px' : '';
     29                $(this).addClass('wp-tab-iframe').wrap("<div class='wp-tab-iframe-container " + tabsID + "_" + i + " ' style='" + max_width + "'></div>");
     30            })
    2631            // Tab #anchoring
    2732            $(function () {
     
    3439
    3540            var $tabs = $('#' + tabsID + ' .sp-tab__nav-item');
     41
    3642            $('label', $tabs).on('click', function (e) {
    3743                e.preventDefault();
    38                 // Add hash url
    39                 window.location.hash = $(this).attr('for');
     44                if ('tabs-activator-event-hover' !== activemode) {
     45                    // Add hash url
     46                    window.location.hash = $(this).attr('for');
     47                }
    4048            });
     49
    4150
    4251            // tab accordion mode hashing in mobile.
     
    4958    });
    5059
    51 })( jQuery );
     60})(jQuery);
  • wp-expand-tabs-free/trunk/public/js/wp-tabs-public.min.js

    r2719252 r2742958  
    1 !function($){"use strict";$(document).ready((function(){$('div[id^="sp-wp-tabs-wrapper_"]').each((function(){var _this,tabsID=$(this).attr("id"),preloader=$("#"+tabsID).data("preloader"),activemode=$("#"+tabsID).data("activemode");preloader&&$(".sp-tab__preloader").fadeOut(),"tabs-activator-event-hover"==activemode&&$("#"+tabsID).on("mouseenter.sp.tab.data-api",'[data-sptoggle="tab"], [data-hover="tab"]',(function(){$(this).tab("show")})),$("#"+tabsID+" iframe").wrap("<div class='wp-tab-iframe-container'></div>"),$((function(){""!=window.location.hash&&($("#"+tabsID+' .sp-tab__nav-tabs > li [for="'+window.location.hash+'"]').trigger("click"),$("#"+tabsID+".sp-tab__default-accordion .sp-tab__tab-pane"+window.location.hash+" > label").trigger("click"))}));var $tabs=$("#"+tabsID+" .sp-tab__nav-item");$("label",$tabs).on("click",(function(e){e.preventDefault(),window.location.hash=$(this).attr("for")})),$("#"+tabsID+".sp-tab__default-accordion .sp-tab__tab-pane label[data-sptoggle]").on("click",(function(e){e.preventDefault(),window.location.hash="#"+$(this).parents(".sp-tab__tab-pane").attr("id")}))}))}))}(jQuery);
     1!function($){"use strict";$(document).ready((function(){$('div[id^="sp-wp-tabs-wrapper_"]').each((function(){var _this,tabsID=$(this).attr("id"),preloader=$("#"+tabsID).data("preloader"),activemode=$("#"+tabsID).data("activemode");preloader&&$(".sp-tab__preloader").fadeOut(),"tabs-activator-event-hover"==activemode&&$("#"+tabsID).on("mouseenter.sp.tab.data-api",'[data-sptoggle="tab"], [data-hover="tab"]',(function(e){e.preventDefault(),$(this).sp_tab("show")})),$("#"+tabsID+' iframe:not(.wp-tab-iframe,[src*="omny.fm/"])').each((function(i){let max_width=$(this).attr("width")>100?"max-width:"+$(this).attr("width")+"px":"";$(this).addClass("wp-tab-iframe").wrap("<div class='wp-tab-iframe-container "+tabsID+"_"+i+" ' style='"+max_width+"'></div>")})),$((function(){""!=window.location.hash&&($("#"+tabsID+' .sp-tab__nav-tabs > li [for="'+window.location.hash+'"]').trigger("click"),$("#"+tabsID+".sp-tab__default-accordion .sp-tab__tab-pane"+window.location.hash+" > label").trigger("click"))}));var $tabs=$("#"+tabsID+" .sp-tab__nav-item");$("label",$tabs).on("click",(function(e){e.preventDefault(),"tabs-activator-event-hover"!==activemode&&(window.location.hash=$(this).attr("for"))})),$("#"+tabsID+".sp-tab__default-accordion .sp-tab__tab-pane label[data-sptoggle]").on("click",(function(e){e.preventDefault(),window.location.hash="#"+$(this).parents(".sp-tab__tab-pane").attr("id")}))}))}))}(jQuery);
  • wp-expand-tabs-free/trunk/readme.txt

    r2725318 r2742958  
    55Requires at least: 4.3
    66Tested up to: 6.0
    7 Stable tag: 2.1.10
     7Stable tag: 2.1.11
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    243243== Changelog ==
    244244
     245= 2.1.11 - Jun 15, 2022 =
     246* New: Elementor Addon to show WP Tabs on the Elementor edit page
     247* Improved: The responsive video in WP Tab content
     248* Fix: The premium page warnings.
     249* Fix: Conflict with Bootstrap 5.
     250* Fix: Scroll issue if the mouse on hover is enabled.
     251
    245252= 2.1.10 - May 17, 2022 =
    246253* Tested: WordPress 6.0 compatibility.
Note: See TracChangeset for help on using the changeset viewer.