Version Description
1.9.5 - Beware of the changes to the language file!
Download this release
Release Info
Developer | ooohboi |
Plugin | OoohBoi Steroids for Elementor |
Version | 1.9.6 |
Comparing to | |
See all releases |
Code changes from version 1.9.5 to 1.9.6
- assets/css/editor-dark.css +4 -2
- assets/css/editor.css +4 -2
- assets/js/container-extras-min.js +1 -0
- assets/js/container-extras.js +34 -3
- assets/js/harakiri-min.js +1 -1
- assets/js/harakiri.js +28 -1
- assets/js/hoveranimator.js +1 -1
- assets/js/interactor.js +257 -0
- controls/ooohboi-container-extras.php +61 -2
- controls/ooohboi-glider.php +2 -0
- controls/ooohboi-harakiri.php +144 -14
- controls/ooohboi-hover-animator.php +5 -2
- controls/ooohboi-imbox.php +21 -0
- controls/ooohboi-interactor.php +718 -0
- controls/ooohboi-oh-animator.php +3 -1
- controls/ooohboi-overlay-underlay.php +1 -1
- controls/ooohboi-perspektive.php +1 -1
- controls/ooohboi-photomorph.php +1 -1
- controls/ooohboi-searchcop.php +1 -1
- controls/ooohboi-spacerat.php +1 -1
- controls/ooohboi-widget-stalker.php +178 -138
- inc/common-functions.php +10 -1
- inc/info/ob-landing.php +21 -1
- ooohboi-steroids.php +17 -16
- readme.txt +12 -2
assets/css/editor-dark.css
CHANGED
@@ -29,7 +29,8 @@
|
|
29 |
.elementor-control-_ob_loco_title_section:after,
|
30 |
.elementor-control-_ob_bullet:after,
|
31 |
.elementor-control-_ob_container_extras:after,
|
32 |
-
.elementor-control-_ob_animator_section_title:after
|
|
|
33 |
content: "";
|
34 |
position: absolute;
|
35 |
height: 20px;
|
@@ -92,7 +93,8 @@
|
|
92 |
.rtl .elementor-control-_ob_loco_title_section:after,
|
93 |
.rtl .elementor-control-_ob_bullet:after,
|
94 |
.rtl .elementor-control-_ob_container_extras:after,
|
95 |
-
.rtl .elementor-control-_ob_animator_section_title:after
|
|
|
96 |
left: 20px;
|
97 |
right: unset;
|
98 |
}
|
29 |
.elementor-control-_ob_loco_title_section:after,
|
30 |
.elementor-control-_ob_bullet:after,
|
31 |
.elementor-control-_ob_container_extras:after,
|
32 |
+
.elementor-control-_ob_animator_section_title:after,
|
33 |
+
.elementor-control-_ob_steroids_interactor:after {
|
34 |
content: "";
|
35 |
position: absolute;
|
36 |
height: 20px;
|
93 |
.rtl .elementor-control-_ob_loco_title_section:after,
|
94 |
.rtl .elementor-control-_ob_bullet:after,
|
95 |
.rtl .elementor-control-_ob_container_extras:after,
|
96 |
+
.rtl .elementor-control-_ob_animator_section_title:after,
|
97 |
+
.rtl .elementor-control-_ob_steroids_interactor:after {
|
98 |
left: 20px;
|
99 |
right: unset;
|
100 |
}
|
assets/css/editor.css
CHANGED
@@ -29,7 +29,8 @@
|
|
29 |
.elementor-control-_ob_loco_title_section:after,
|
30 |
.elementor-control-_ob_bullet:after,
|
31 |
.elementor-control-_ob_container_extras:after,
|
32 |
-
.elementor-control-_ob_animator_section_title:after
|
|
|
33 |
content: "";
|
34 |
position: absolute;
|
35 |
height: 20px;
|
@@ -92,7 +93,8 @@
|
|
92 |
.rtl .elementor-control-_ob_loco_title_section:after,
|
93 |
.rtl .elementor-control-_ob_bullet:after,
|
94 |
.rtl .elementor-control-_ob_container_extras:after,
|
95 |
-
.rtl .elementor-control-_ob_animator_section_title:after
|
|
|
96 |
left: 20px;
|
97 |
right: unset;
|
98 |
}
|
29 |
.elementor-control-_ob_loco_title_section:after,
|
30 |
.elementor-control-_ob_bullet:after,
|
31 |
.elementor-control-_ob_container_extras:after,
|
32 |
+
.elementor-control-_ob_animator_section_title:after,
|
33 |
+
.elementor-control-_ob_steroids_interactor:after {
|
34 |
content: "";
|
35 |
position: absolute;
|
36 |
height: 20px;
|
93 |
.rtl .elementor-control-_ob_loco_title_section:after,
|
94 |
.rtl .elementor-control-_ob_bullet:after,
|
95 |
.rtl .elementor-control-_ob_container_extras:after,
|
96 |
+
.rtl .elementor-control-_ob_animator_section_title:after,
|
97 |
+
.rtl .elementor-control-_ob_steroids_interactor:after {
|
98 |
left: 20px;
|
99 |
right: unset;
|
100 |
}
|
assets/js/container-extras-min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
"use strict";jQuery(window).on("elementor/frontend/init",(function(){var e,n=elementorModules.frontend.handlers.Base;e=n.extend({onInit:function(){n.prototype.onInit.apply(this,arguments),this.isContainerExtras()&&(this.$element.addClass("ob-is-container-extras"),this.initContainerExtends())},isContainerExtras:function(){return"yes"===this.getElementSettings("_ob_use_container_extras")},onElementChange:function(e){"_ob_use_container_extras"===e&&("yes"===this.getElementSettings("_ob_use_container_extras")?this.$element.addClass("ob-is-container-extras"):this.$element.removeClass("ob-is-container-extras"))},initContainerExtends:function(){if(!this.isEdit){var e={};try{e=JSON.parse(this.$element.attr("data-settings"))}catch(e){return}if(void 0!==e._ob_ce_link){var n=e._ob_ce_link;if(""===n.url)return void this.$element.removeClass("ob-container-link");this.$element.addClass("ob-container-link"),this.$element.off("click"),this.$element.on("click",(function(){n.is_external?window.open(n.url):location.href=n.url}))}}}}),elementorFrontend.hooks.addAction("frontend/element_ready/container",(function(n){elementorFrontend.elementsHandler.addHandler(e,{$element:n})}))}));
|
assets/js/container-extras.js
CHANGED
@@ -13,12 +13,13 @@
|
|
13 |
|
14 |
onInit: function() {
|
15 |
ModuleHandler.prototype.onInit.apply( this, arguments );
|
16 |
-
if( this.
|
17 |
-
this.$element.addClass( 'ob-is-container-extras' );
|
|
|
18 |
}
|
19 |
},
|
20 |
|
21 |
-
|
22 |
return ( this.getElementSettings( '_ob_use_container_extras' ) === 'yes' );
|
23 |
},
|
24 |
|
@@ -28,6 +29,36 @@
|
|
28 |
else this.$element.removeClass( 'ob-is-container-extras' );
|
29 |
}
|
30 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
|
32 |
} );
|
33 |
|
13 |
|
14 |
onInit: function() {
|
15 |
ModuleHandler.prototype.onInit.apply( this, arguments );
|
16 |
+
if( this.isContainerExtras() ) {
|
17 |
+
this.$element.addClass( 'ob-is-container-extras' );
|
18 |
+
this.initContainerExtends();
|
19 |
}
|
20 |
},
|
21 |
|
22 |
+
isContainerExtras: function() {
|
23 |
return ( this.getElementSettings( '_ob_use_container_extras' ) === 'yes' );
|
24 |
},
|
25 |
|
29 |
else this.$element.removeClass( 'ob-is-container-extras' );
|
30 |
}
|
31 |
},
|
32 |
+
|
33 |
+
initContainerExtends: function() {
|
34 |
+
if( ! this.isEdit ) {
|
35 |
+
var container_settings = {};
|
36 |
+
try {
|
37 |
+
container_settings = JSON.parse( this.$element.attr( 'data-settings' ) );
|
38 |
+
} catch ( error ) {
|
39 |
+
console.log( error );
|
40 |
+
return;
|
41 |
+
}
|
42 |
+
// handle links
|
43 |
+
if( undefined !== container_settings._ob_ce_link ) {
|
44 |
+
|
45 |
+
var continer_link = container_settings._ob_ce_link;
|
46 |
+
if( '' === continer_link.url ) {
|
47 |
+
this.$element.removeClass( 'ob-container-link' );
|
48 |
+
return;
|
49 |
+
} else {
|
50 |
+
this.$element.addClass( 'ob-container-link' );
|
51 |
+
}
|
52 |
+
|
53 |
+
this.$element.off( 'click' );
|
54 |
+
this.$element.on( 'click', function() {
|
55 |
+
if( continer_link.is_external ) window.open( continer_link.url );
|
56 |
+
else location.href = continer_link.url;
|
57 |
+
} );
|
58 |
+
|
59 |
+
}
|
60 |
+
}
|
61 |
+
},
|
62 |
|
63 |
} );
|
64 |
|
assets/js/harakiri-min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
"use strict";!function(e,
|
1 |
+
"use strict";!function(e,t){e(t).on("elementor/frontend/init",(function(){var t,i=elementorModules.frontend.handlers.Base;t=i.extend({onInit:function(){i.prototype.onInit.apply(this,arguments),this.isHarakiri()&&(this.$element.addClass("ob-harakiri"),"clip"===this.getElementSettings("_ob_harakiri_text_clip")&&this.updateCSS("add"))},isHarakiri:function(){return"yes"===this.getElementSettings("_ob_use_harakiri")},onElementChange:function(e){"_ob_harakiri_writing_mode"===e&&("inherit"!==this.getElementSettings("_ob_harakiri_writing_mode")?this.$element.addClass("ob-harakiri"):this.$element.removeClass("ob-harakiri")),"_ob_harakiri_text_clip"===e&&("clip"===this.getElementSettings("_ob_harakiri_text_clip")?this.updateCSS("add"):""===this.getElementSettings("_ob_harakiri_text_clip")&&this.updateCSS("remove"))},updateCSS:function(e){"add"===e&&this.$element.find(".elementor-heading-title").css("background-clip","text").css("-webkit-text-fill-color","transparent"),"remove"===e&&this.$element.find(".elementor-heading-title").css("background-clip","unset").css("-webkit-text-fill-color","unset")}});var n={"heading.default":t,"text-editor.default":t};e.each(n,(function(e,t){elementorFrontend.hooks.addAction("frontend/element_ready/"+e,(function(e){elementorFrontend.elementsHandler.addHandler(t,{$element:e})}))}))}))}(jQuery,window);
|
assets/js/harakiri.js
CHANGED
@@ -15,11 +15,12 @@
|
|
15 |
ModuleHandler.prototype.onInit.apply( this, arguments );
|
16 |
if( this.isHarakiri() ) {
|
17 |
this.$element.addClass( 'ob-harakiri' );
|
|
|
18 |
}
|
19 |
},
|
20 |
|
21 |
isHarakiri: function() {
|
22 |
-
return ( this.getElementSettings( '
|
23 |
},
|
24 |
|
25 |
onElementChange: function( changedProp ) {
|
@@ -27,6 +28,32 @@
|
|
27 |
if( 'inherit' !== this.getElementSettings( '_ob_harakiri_writing_mode' ) ) this.$element.addClass( 'ob-harakiri' );
|
28 |
else this.$element.removeClass( 'ob-harakiri' );
|
29 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
},
|
31 |
|
32 |
} );
|
15 |
ModuleHandler.prototype.onInit.apply( this, arguments );
|
16 |
if( this.isHarakiri() ) {
|
17 |
this.$element.addClass( 'ob-harakiri' );
|
18 |
+
if( 'clip' === this.getElementSettings( '_ob_harakiri_text_clip' ) ) this.updateCSS( 'add' );
|
19 |
}
|
20 |
},
|
21 |
|
22 |
isHarakiri: function() {
|
23 |
+
return ( this.getElementSettings( '_ob_use_harakiri' ) === 'yes' );
|
24 |
},
|
25 |
|
26 |
onElementChange: function( changedProp ) {
|
28 |
if( 'inherit' !== this.getElementSettings( '_ob_harakiri_writing_mode' ) ) this.$element.addClass( 'ob-harakiri' );
|
29 |
else this.$element.removeClass( 'ob-harakiri' );
|
30 |
}
|
31 |
+
if( changedProp === '_ob_harakiri_text_clip' ) {
|
32 |
+
if( 'clip' === this.getElementSettings( '_ob_harakiri_text_clip' ) ) {
|
33 |
+
this.updateCSS( 'add' );
|
34 |
+
} else if( '' === this.getElementSettings( '_ob_harakiri_text_clip' ) ) {
|
35 |
+
this.updateCSS( 'remove' );
|
36 |
+
}
|
37 |
+
}
|
38 |
+
},
|
39 |
+
|
40 |
+
updateCSS: function( action ) {
|
41 |
+
|
42 |
+
if( 'add' === action ) {
|
43 |
+
|
44 |
+
this.$element.find( '.elementor-heading-title' )
|
45 |
+
.css( 'background-clip', 'text' )
|
46 |
+
.css( '-webkit-text-fill-color', 'transparent' );
|
47 |
+
|
48 |
+
}
|
49 |
+
if( 'remove' === action ) {
|
50 |
+
|
51 |
+
this.$element.find( '.elementor-heading-title' )
|
52 |
+
.css( 'background-clip', 'unset' )
|
53 |
+
.css( '-webkit-text-fill-color', 'unset' );
|
54 |
+
|
55 |
+
}
|
56 |
+
|
57 |
},
|
58 |
|
59 |
} );
|
assets/js/hoveranimator.js
CHANGED
@@ -69,7 +69,7 @@
|
|
69 |
}
|
70 |
},
|
71 |
|
72 |
-
runHoverAnimator: function() {
|
73 |
|
74 |
var myself = this.$element.find( '.elementor-widget-container' );
|
75 |
var parent_column = myself.parent().closest( '.ob-is-hoveranimator' );
|
69 |
}
|
70 |
},
|
71 |
|
72 |
+
runHoverAnimator: function() {
|
73 |
|
74 |
var myself = this.$element.find( '.elementor-widget-container' );
|
75 |
var parent_column = myself.parent().closest( '.ob-is-hoveranimator' );
|
assets/js/interactor.js
ADDED
@@ -0,0 +1,257 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
'use strict';
|
2 |
+
|
3 |
+
( function ( $, w ) {
|
4 |
+
|
5 |
+
var $window = $( w );
|
6 |
+
|
7 |
+
$window.on( 'elementor/frontend/init', function() {
|
8 |
+
|
9 |
+
var ModuleHandler = elementorModules.frontend.handlers.Base,
|
10 |
+
Interactor;
|
11 |
+
|
12 |
+
Interactor = ModuleHandler.extend( {
|
13 |
+
|
14 |
+
click_count: 0,
|
15 |
+
|
16 |
+
onInit: function() {
|
17 |
+
|
18 |
+
ModuleHandler.prototype.onInit.apply( this, arguments );
|
19 |
+
if( this.isInteractorObject() ) {
|
20 |
+
|
21 |
+
// console.log( parent.window.$e );
|
22 |
+
|
23 |
+
elementor.hooks.addAction( 'panel/open_editor/widget', function( panel, model, view ) {
|
24 |
+
|
25 |
+
var container = view.getContainer();
|
26 |
+
var settings = view.getContainer().settings.attributes;
|
27 |
+
|
28 |
+
console.log( container.repeaters._ob_i_props_repeater );
|
29 |
+
|
30 |
+
container.repeaters._ob_i_props_repeater.view.on( 'onAddButtonClick', function( evt ) {
|
31 |
+
|
32 |
+
console.log( 'New Repeater Item Added' );
|
33 |
+
|
34 |
+
} );
|
35 |
+
|
36 |
+
/*
|
37 |
+
parent.window.$e.run( "document/elements/settings", {
|
38 |
+
container: container,
|
39 |
+
settings: settings,
|
40 |
+
options: {
|
41 |
+
external: true
|
42 |
+
}
|
43 |
+
} );
|
44 |
+
*/
|
45 |
+
|
46 |
+
} );
|
47 |
+
|
48 |
+
//const editor = elementor.getPanelView().getCurrentPageView();
|
49 |
+
//const model_cid = this.getModelCID( '_ob_i_props_repeater' );
|
50 |
+
//const view = editor.children.findByModelCid( model_cid );
|
51 |
+
|
52 |
+
|
53 |
+
this.$element.addClass( 'ob-is-interactor' );
|
54 |
+
this.run();
|
55 |
+
}
|
56 |
+
|
57 |
+
},
|
58 |
+
|
59 |
+
isInteractorObject: function() {
|
60 |
+
return ( this.getElementSettings( '_ob_do_interactor' ) === 'yes' );
|
61 |
+
},
|
62 |
+
|
63 |
+
onElementChange: function( changedProp ) {
|
64 |
+
if( changedProp === '_ob_do_interactor' ) {
|
65 |
+
if( 'yes' === this.getElementSettings( '_ob_do_interactor' ) ) {
|
66 |
+
this.$element.addClass( 'ob-is-interactor' );
|
67 |
+
} else if( '' === this.getElementSettings( '_ob_do_interactor' ) ) {
|
68 |
+
this.$element.removeClass( 'ob-is-interactor' );
|
69 |
+
}
|
70 |
+
}
|
71 |
+
},
|
72 |
+
|
73 |
+
bindEvents: function() {
|
74 |
+
//this.run();
|
75 |
+
/*
|
76 |
+
var TMP_this = this;
|
77 |
+
elementor.channels.editor.on( 'change', function( el ) {
|
78 |
+
if( el._parent.model.id === TMP_this.$element[ 0 ].dataset.id ) {
|
79 |
+
console.log( 'Something has been changed' );
|
80 |
+
}
|
81 |
+
} );
|
82 |
+
*/
|
83 |
+
},
|
84 |
+
|
85 |
+
run: function() {
|
86 |
+
if( this.isInteractorObject() ) this.deployInteractor();
|
87 |
+
},
|
88 |
+
|
89 |
+
deployInteractor: function() {
|
90 |
+
|
91 |
+
var el_settings = {};
|
92 |
+
|
93 |
+
el_settings._ob_i_type = this.getElementSettings( '_ob_i_type' ) || 'mouseenter';
|
94 |
+
el_settings.rptr = this.getElementSettings( '_ob_i_props_repeater' );
|
95 |
+
|
96 |
+
// repeater
|
97 |
+
var rptr_target = '';
|
98 |
+
var all_elements = [];
|
99 |
+
var me = this.$element;
|
100 |
+
var _this = this;
|
101 |
+
|
102 |
+
$.each( el_settings.rptr, function( i, val ) {
|
103 |
+
|
104 |
+
// target element
|
105 |
+
if( 'other' === val._ob_i_target ) {
|
106 |
+
// chck for the class name or ID
|
107 |
+
var target_id = val._ob_i_target_id_or_class.trim();
|
108 |
+
if( ( target_id.startsWith( '.' ) || target_id.startsWith( '#' ) ) && target_id.length > 2 && $( target_id ).length ) {
|
109 |
+
rptr_target = target_id;
|
110 |
+
}
|
111 |
+
} else if( 'self' === val._ob_i_target ) {
|
112 |
+
rptr_target = '[data-id="' + me[ 0 ].dataset[ 'id' ] + '"]';
|
113 |
+
}
|
114 |
+
|
115 |
+
if( 'none' === val._ob_i_property || '' === rptr_target ) return; // bail if none property
|
116 |
+
|
117 |
+
var transforms = [ 'translateX', 'translateY', 'scale', 'rotate', 'skewX', 'skewY' ]; // handled differently as a CSS property
|
118 |
+
|
119 |
+
var prop = val._ob_i_property;
|
120 |
+
|
121 |
+
var from_obj = val[ '_ob_i_prop_' + prop + '_from' ];
|
122 |
+
var to_obj = val[ '_ob_i_prop_' + prop + '_to' ];
|
123 |
+
var from_size = ( 'object' === typeof from_obj ) ? from_obj.size : from_obj;
|
124 |
+
var from_unit = ( 'object' === typeof from_obj ) ? from_obj.unit : '';
|
125 |
+
var to_size = ( 'object' === typeof to_obj ) ? to_obj.size : to_obj;
|
126 |
+
var to_unit = ( 'object' === typeof to_obj ) ? to_obj.unit : '';
|
127 |
+
var the_css_from = {};
|
128 |
+
var the_css_to = {};
|
129 |
+
|
130 |
+
if( $.inArray( prop, transforms ) === -1 ) {
|
131 |
+
// populate values
|
132 |
+
the_css_from[ prop ] = from_size + from_unit;
|
133 |
+
the_css_to[ prop ] = to_size + to_unit;
|
134 |
+
} else {
|
135 |
+
// populate values
|
136 |
+
if( 'rotate' === prop || 'skewX' === prop || 'skewY' === prop ) {
|
137 |
+
from_unit = 'deg';
|
138 |
+
to_unit = 'deg';
|
139 |
+
}
|
140 |
+
|
141 |
+
the_css_from[ 'transform' ] = prop + '(' + from_size + from_unit + ')';
|
142 |
+
the_css_to[ 'transform' ] = prop + '(' + to_size + to_unit + ')';
|
143 |
+
}
|
144 |
+
|
145 |
+
// transform origin
|
146 |
+
var transform_origin = val[ '_ob_i_prop_tr_origin' ];
|
147 |
+
if( 'none' !== transform_origin ) {
|
148 |
+
the_css_from[ 'transform-origin' ] = transform_origin;
|
149 |
+
}
|
150 |
+
// transition
|
151 |
+
the_css_from[ 'transition' ] = 'all ' + val._ob_i_duration + 's ' + val._ob_i_easing + ' ' + val._ob_i_delay + 's';
|
152 |
+
|
153 |
+
all_elements.push( { 'target' : rptr_target, 'from' : the_css_from, 'to' : the_css_to } );
|
154 |
+
|
155 |
+
} );
|
156 |
+
|
157 |
+
// merge duplicated properties
|
158 |
+
var dupes = []; // duplicates chck
|
159 |
+
var new_elements = []; // new build
|
160 |
+
|
161 |
+
$.each( all_elements, function( i, val ) {
|
162 |
+
|
163 |
+
if( dupes.indexOf( val.target ) !== -1 ) {
|
164 |
+
|
165 |
+
var index = dupes.indexOf( val.target );
|
166 |
+
var existing = all_elements[ index ];
|
167 |
+
|
168 |
+
var new_from = merger_objects( existing.from, val.from );
|
169 |
+
var new_to = merger_objects( existing.to, val.to );
|
170 |
+
|
171 |
+
new_elements[ index ].from = new_from;
|
172 |
+
new_elements[ index ].to = new_to;
|
173 |
+
|
174 |
+
} else {
|
175 |
+
|
176 |
+
dupes.push( val.target );
|
177 |
+
new_elements.push( val );
|
178 |
+
|
179 |
+
}
|
180 |
+
|
181 |
+
} );
|
182 |
+
|
183 |
+
// set initial states
|
184 |
+
$.each( new_elements, function( i, val ) { $( val.target ).css( val.from ) } );
|
185 |
+
|
186 |
+
// events
|
187 |
+
if( 'click' === el_settings._ob_i_type ) {
|
188 |
+
me.on( 'click', function( e ) {
|
189 |
+
e.preventDefault(); // prevent default
|
190 |
+
if( ! _this.click_count ) {
|
191 |
+
$.each( new_elements, function( i, val ) {
|
192 |
+
$( val.target ).css( val.to );
|
193 |
+
_this.click_count = 1;
|
194 |
+
} );
|
195 |
+
} else {
|
196 |
+
$.each( new_elements, function( i, val ) {
|
197 |
+
$( val.target ).css( val.from );
|
198 |
+
_this.click_count = 0;
|
199 |
+
} );
|
200 |
+
}
|
201 |
+
} );
|
202 |
+
}
|
203 |
+
// action mouseenter
|
204 |
+
if( 'mouseenter' === el_settings._ob_i_type ) {
|
205 |
+
me.on( 'mouseenter', function( e ) {
|
206 |
+
$.each( new_elements, function( i, val ) {
|
207 |
+
$( val.target ).css( val.to );
|
208 |
+
} );
|
209 |
+
} );
|
210 |
+
me.on( 'mouseleave', function( e ) {
|
211 |
+
$.each( new_elements, function( i, val ) {
|
212 |
+
$( val.target ).css( val.from );
|
213 |
+
} );
|
214 |
+
} );
|
215 |
+
}
|
216 |
+
/*
|
217 |
+
if( this.isEdit ) {
|
218 |
+
var TMP_this = this;
|
219 |
+
// the DOM hack to prevent all kinds of shit ...
|
220 |
+
elementor.channels.editor.on( 'change', function( el ) {
|
221 |
+
console.log( el._parent );
|
222 |
+
if( el._parent.model.id === TMP_this.getID() ) {
|
223 |
+
console.log( 'Something has been changed' );
|
224 |
+
}
|
225 |
+
} );
|
226 |
+
}
|
227 |
+
*/
|
228 |
+
},
|
229 |
+
|
230 |
+
} );
|
231 |
+
|
232 |
+
// merge all properties into 1
|
233 |
+
function merger_objects( obj1, obj2 ) {
|
234 |
+
$.each( obj2, function( key, value ) {
|
235 |
+
obj1[ key ] = value;
|
236 |
+
} );
|
237 |
+
|
238 |
+
return obj1;
|
239 |
+
}
|
240 |
+
|
241 |
+
var handlersList = {
|
242 |
+
'container': Interactor,
|
243 |
+
'widget': Interactor,
|
244 |
+
};
|
245 |
+
|
246 |
+
$.each( handlersList, function( widgetName, handlerClass ) {
|
247 |
+
|
248 |
+
elementorFrontend.hooks.addAction( 'frontend/element_ready/' + widgetName, function( $scope ) {
|
249 |
+
elementorFrontend.elementsHandler.addHandler( handlerClass, { $element: $scope } );
|
250 |
+
} );
|
251 |
+
|
252 |
+
} );
|
253 |
+
|
254 |
+
} );
|
255 |
+
|
256 |
+
|
257 |
+
} ( jQuery, window ) );
|
controls/ooohboi-container-extras.php
CHANGED
@@ -39,7 +39,7 @@ class OoohBoi_Container_Extras {
|
|
39 |
/* enqueue script JS */
|
40 |
public static function enqueue_scripts() {
|
41 |
|
42 |
-
$extension_js = plugin_dir_path( __DIR__ ) . 'assets/js/container-extras.js';
|
43 |
|
44 |
if( file_exists( $extension_js ) ) {
|
45 |
wp_add_inline_script( 'elementor-frontend', file_get_contents( $extension_js ) );
|
@@ -87,7 +87,7 @@ class OoohBoi_Container_Extras {
|
|
87 |
]
|
88 |
);
|
89 |
|
90 |
-
// ------------------------------------------------------------------------- CONTROL: Yes 4
|
91 |
$element->add_control(
|
92 |
'_ob_use_container_extras',
|
93 |
[
|
@@ -123,6 +123,65 @@ class OoohBoi_Container_Extras {
|
|
123 |
]
|
124 |
);
|
125 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
126 |
}
|
127 |
|
128 |
}
|
39 |
/* enqueue script JS */
|
40 |
public static function enqueue_scripts() {
|
41 |
|
42 |
+
$extension_js = plugin_dir_path( __DIR__ ) . 'assets/js/container-extras-min.js';
|
43 |
|
44 |
if( file_exists( $extension_js ) ) {
|
45 |
wp_add_inline_script( 'elementor-frontend', file_get_contents( $extension_js ) );
|
87 |
]
|
88 |
);
|
89 |
|
90 |
+
// ------------------------------------------------------------------------- CONTROL: Yes 4 extras
|
91 |
$element->add_control(
|
92 |
'_ob_use_container_extras',
|
93 |
[
|
123 |
]
|
124 |
);
|
125 |
|
126 |
+
// --------------------------------------------------------------------------------------------- CONTROL Container calc min height
|
127 |
+
$element->add_responsive_control(
|
128 |
+
'_ob_ce_calc_min_height',
|
129 |
+
[
|
130 |
+
'label' => __( 'Calc Min Height', 'ooohboi-steroids' ),
|
131 |
+
'type' => Controls_Manager::TEXT,
|
132 |
+
'separator' => 'before',
|
133 |
+
'label_block' => true,
|
134 |
+
'default' => '',
|
135 |
+
'description' => __( 'You can enter any acceptable CSS value ( 50em, 25vw, 42.1% ) or the expression ( 100% - 300px, 55vw - 150px, 15rem - 20px ). NO calc() needed, it will be added automatically!', 'ooohboi-steroids' ),
|
136 |
+
'selectors' => [
|
137 |
+
'{{WRAPPER}}.ob-is-container-extras' => '--min-height: calc({{VALUE}}) !important;',
|
138 |
+
],
|
139 |
+
'frontend_available' => true,
|
140 |
+
'condition' => [
|
141 |
+
'_ob_use_container_extras' => 'yes',
|
142 |
+
],
|
143 |
+
]
|
144 |
+
);
|
145 |
+
// ------------------------------------------------------------------------- CONTROL: Link or No?
|
146 |
+
$element->add_control(
|
147 |
+
'_ob_ce_link_type',
|
148 |
+
[
|
149 |
+
'label' => __( 'Container Link', 'ooohboi-steroids' ),
|
150 |
+
'type' => Controls_Manager::SELECT,
|
151 |
+
'default' => 'default',
|
152 |
+
'separator' => 'before',
|
153 |
+
'options' => [
|
154 |
+
'default' => __( 'None', 'ooohboi-steroids' ),
|
155 |
+
'pointer' => __( 'Custom URL', 'ooohboi-steroids' ),
|
156 |
+
],
|
157 |
+
'selectors' => [
|
158 |
+
'{{WRAPPER}}.ob-is-container-extras' => 'cursor: {{VALUE}};',
|
159 |
+
],
|
160 |
+
'condition' => [
|
161 |
+
'_ob_use_container_extras' => 'yes',
|
162 |
+
],
|
163 |
+
]
|
164 |
+
);
|
165 |
+
// ------------------------------------------------------------------------- CONTROL: Link to...
|
166 |
+
$element->add_control(
|
167 |
+
'_ob_ce_link',
|
168 |
+
[
|
169 |
+
'label' => __( 'Link', 'ooohboi-steroids' ),
|
170 |
+
'type' => Controls_Manager::URL,
|
171 |
+
'separator' => 'before',
|
172 |
+
'frontend_available' => true,
|
173 |
+
'dynamic' => [
|
174 |
+
'active' => true,
|
175 |
+
],
|
176 |
+
'placeholder' => __( 'https://your-link.com', 'ooohboi-steroids' ),
|
177 |
+
'condition' => [
|
178 |
+
'_ob_use_container_extras' => 'yes',
|
179 |
+
'_ob_ce_link_type' => 'pointer',
|
180 |
+
],
|
181 |
+
'show_label' => false,
|
182 |
+
]
|
183 |
+
);
|
184 |
+
|
185 |
}
|
186 |
|
187 |
}
|
controls/ooohboi-glider.php
CHANGED
@@ -35,6 +35,7 @@ class OoohBoi_Glider {
|
|
35 |
add_action( 'elementor/element/after_add_attributes', [ __CLASS__, 'add_container_attributes' ] );
|
36 |
|
37 |
/* should enqueue? */
|
|
|
38 |
add_action( 'elementor/frontend/container/before_render', [ __CLASS__, 'should_script_enqueue' ] );
|
39 |
/* add script */
|
40 |
add_action( 'elementor/preview/enqueue_scripts', [ __CLASS__, 'enqueue_scripts' ] );
|
@@ -62,6 +63,7 @@ class OoohBoi_Glider {
|
|
62 |
self::enqueue_scripts();
|
63 |
|
64 |
remove_action( 'elementor/frontend/section/before_render', [ __CLASS__, 'should_script_enqueue' ] );
|
|
|
65 |
}
|
66 |
}
|
67 |
/* add_container_attributes separate from an old ELEmentor grid */
|
35 |
add_action( 'elementor/element/after_add_attributes', [ __CLASS__, 'add_container_attributes' ] );
|
36 |
|
37 |
/* should enqueue? */
|
38 |
+
add_action( 'elementor/frontend/section/before_render', [ __CLASS__, 'should_script_enqueue' ] );
|
39 |
add_action( 'elementor/frontend/container/before_render', [ __CLASS__, 'should_script_enqueue' ] );
|
40 |
/* add script */
|
41 |
add_action( 'elementor/preview/enqueue_scripts', [ __CLASS__, 'enqueue_scripts' ] );
|
63 |
self::enqueue_scripts();
|
64 |
|
65 |
remove_action( 'elementor/frontend/section/before_render', [ __CLASS__, 'should_script_enqueue' ] );
|
66 |
+
remove_action( 'elementor/frontend/container/before_render', [ __CLASS__, 'should_script_enqueue' ] );
|
67 |
}
|
68 |
}
|
69 |
/* add_container_attributes separate from an old ELEmentor grid */
|
controls/ooohboi-harakiri.php
CHANGED
@@ -2,6 +2,7 @@
|
|
2 |
use Elementor\Controls_Manager;
|
3 |
use Elementor\Controls_Stack;
|
4 |
use Elementor\Element_Base;
|
|
|
5 |
|
6 |
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
exit; // Exit if accessed directly.
|
@@ -84,6 +85,20 @@ class OoohBoi_Harakiri {
|
|
84 |
'separator' => 'before',
|
85 |
]
|
86 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
// --------------------------------------------------------------------------------------------- CONTROL: Text COLOR Regular
|
88 |
$element->add_control(
|
89 |
'_ob_harakiri_color_hover',
|
@@ -95,6 +110,9 @@ class OoohBoi_Harakiri {
|
|
95 |
'selectors' => [
|
96 |
'{{WRAPPER}} .elementor-heading-title:hover' => 'color: {{VALUE}};',
|
97 |
],
|
|
|
|
|
|
|
98 |
]
|
99 |
);
|
100 |
$element->add_responsive_control(
|
@@ -114,6 +132,9 @@ class OoohBoi_Harakiri {
|
|
114 |
'{{WRAPPER}}.ob-harakiri' => 'writing-mode: {{VALUE}};',
|
115 |
'{{WRAPPER}}.ob-harakiri .elementor-heading-title' => 'writing-mode: {{VALUE}};',
|
116 |
'{{WRAPPER}}.ob-harakiri .elementor-widget-container > div' => 'writing-mode: {{VALUE}};',
|
|
|
|
|
|
|
117 |
],
|
118 |
]
|
119 |
);
|
@@ -136,6 +157,9 @@ class OoohBoi_Harakiri {
|
|
136 |
'{{WRAPPER}}.ob-harakiri .elementor-heading-title' => 'transform: {{VALUE}};',
|
137 |
'{{WRAPPER}}.ob-harakiri .elementor-widget-container > div' => 'transform: {{VALUE}};',
|
138 |
],
|
|
|
|
|
|
|
139 |
]
|
140 |
);
|
141 |
|
@@ -160,6 +184,7 @@ class OoohBoi_Harakiri {
|
|
160 |
'{{WRAPPER}}.ob-harakiri .elementor-widget-container > div' => 'inline-size: {{VALUE}};',
|
161 |
],
|
162 |
'condition' => [
|
|
|
163 |
'_ob_harakiri_writing_mode!' => 'inherit',
|
164 |
],
|
165 |
]
|
@@ -195,24 +220,65 @@ class OoohBoi_Harakiri {
|
|
195 |
'device_args' => [
|
196 |
Controls_Stack::RESPONSIVE_TABLET => [
|
197 |
'condition' => [
|
|
|
198 |
'_ob_harakiri_height_tablet' => [ 'initial' ],
|
199 |
'_ob_harakiri_writing_mode!' => 'inherit',
|
200 |
],
|
201 |
],
|
202 |
Controls_Stack::RESPONSIVE_MOBILE => [
|
203 |
'condition' => [
|
|
|
204 |
'_ob_harakiri_height_mobile' => [ 'initial' ],
|
205 |
'_ob_harakiri_writing_mode!' => 'inherit',
|
206 |
],
|
207 |
],
|
208 |
],
|
209 |
'condition' => [
|
|
|
210 |
'_ob_harakiri_height' => [ 'initial' ],
|
211 |
'_ob_harakiri_writing_mode!' => 'inherit',
|
212 |
],
|
213 |
]
|
214 |
);
|
215 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
216 |
/* Textender alter-ego since v 1.7.0 */
|
217 |
$element->add_responsive_control(
|
218 |
'_ob_harakiri_mix_blend',
|
@@ -251,31 +317,95 @@ class OoohBoi_Harakiri {
|
|
251 |
'selectors' => [
|
252 |
'{{WRAPPER}} .elementor-widget-container' => 'mix-blend-mode: {{VALUE}};',
|
253 |
],
|
|
|
|
|
|
|
254 |
],
|
255 |
Controls_Stack::RESPONSIVE_MOBILE => [
|
256 |
'selectors' => [
|
257 |
'{{WRAPPER}} .elementor-widget-container' => 'mix-blend-mode: {{VALUE}};',
|
258 |
],
|
|
|
|
|
|
|
259 |
],
|
|
|
|
|
|
|
260 |
],
|
261 |
]
|
262 |
);
|
263 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
264 |
/* since 1.8.2 - cutt bottom margin */
|
265 |
-
$element->
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
|
|
|
|
|
|
|
|
|
|
279 |
|
280 |
}
|
281 |
|
2 |
use Elementor\Controls_Manager;
|
3 |
use Elementor\Controls_Stack;
|
4 |
use Elementor\Element_Base;
|
5 |
+
use Elementor\Group_Control_Background;
|
6 |
|
7 |
if ( ! defined( 'ABSPATH' ) ) {
|
8 |
exit; // Exit if accessed directly.
|
85 |
'separator' => 'before',
|
86 |
]
|
87 |
);
|
88 |
+
// --------------------------------------------------------------------------------------------- CONTROL: Use Harakiri
|
89 |
+
$element->add_control(
|
90 |
+
'_ob_use_harakiri',
|
91 |
+
[
|
92 |
+
'label' => esc_html__( 'Enable Harakiri?', 'ooohboi-steroids' ),
|
93 |
+
'separator' => 'after',
|
94 |
+
'type' => Controls_Manager::SWITCHER,
|
95 |
+
'label_on' => esc_html__( 'Yes', 'ooohboi-steroids' ),
|
96 |
+
'label_off' => esc_html__( 'No', 'ooohboi-steroids' ),
|
97 |
+
'return_value' => 'yes',
|
98 |
+
'default' => 'yes',
|
99 |
+
'frontend_available' => true,
|
100 |
+
]
|
101 |
+
);
|
102 |
// --------------------------------------------------------------------------------------------- CONTROL: Text COLOR Regular
|
103 |
$element->add_control(
|
104 |
'_ob_harakiri_color_hover',
|
110 |
'selectors' => [
|
111 |
'{{WRAPPER}} .elementor-heading-title:hover' => 'color: {{VALUE}};',
|
112 |
],
|
113 |
+
'condition' => [
|
114 |
+
'_ob_use_harakiri' => 'yes',
|
115 |
+
],
|
116 |
]
|
117 |
);
|
118 |
$element->add_responsive_control(
|
132 |
'{{WRAPPER}}.ob-harakiri' => 'writing-mode: {{VALUE}};',
|
133 |
'{{WRAPPER}}.ob-harakiri .elementor-heading-title' => 'writing-mode: {{VALUE}};',
|
134 |
'{{WRAPPER}}.ob-harakiri .elementor-widget-container > div' => 'writing-mode: {{VALUE}};',
|
135 |
+
],
|
136 |
+
'condition' => [
|
137 |
+
'_ob_use_harakiri' => 'yes',
|
138 |
],
|
139 |
]
|
140 |
);
|
157 |
'{{WRAPPER}}.ob-harakiri .elementor-heading-title' => 'transform: {{VALUE}};',
|
158 |
'{{WRAPPER}}.ob-harakiri .elementor-widget-container > div' => 'transform: {{VALUE}};',
|
159 |
],
|
160 |
+
'condition' => [
|
161 |
+
'_ob_use_harakiri' => 'yes',
|
162 |
+
],
|
163 |
]
|
164 |
);
|
165 |
|
184 |
'{{WRAPPER}}.ob-harakiri .elementor-widget-container > div' => 'inline-size: {{VALUE}};',
|
185 |
],
|
186 |
'condition' => [
|
187 |
+
'_ob_use_harakiri' => 'yes',
|
188 |
'_ob_harakiri_writing_mode!' => 'inherit',
|
189 |
],
|
190 |
]
|
220 |
'device_args' => [
|
221 |
Controls_Stack::RESPONSIVE_TABLET => [
|
222 |
'condition' => [
|
223 |
+
'_ob_use_harakiri' => 'yes',
|
224 |
'_ob_harakiri_height_tablet' => [ 'initial' ],
|
225 |
'_ob_harakiri_writing_mode!' => 'inherit',
|
226 |
],
|
227 |
],
|
228 |
Controls_Stack::RESPONSIVE_MOBILE => [
|
229 |
'condition' => [
|
230 |
+
'_ob_use_harakiri' => 'yes',
|
231 |
'_ob_harakiri_height_mobile' => [ 'initial' ],
|
232 |
'_ob_harakiri_writing_mode!' => 'inherit',
|
233 |
],
|
234 |
],
|
235 |
],
|
236 |
'condition' => [
|
237 |
+
'_ob_use_harakiri' => 'yes',
|
238 |
'_ob_harakiri_height' => [ 'initial' ],
|
239 |
'_ob_harakiri_writing_mode!' => 'inherit',
|
240 |
],
|
241 |
]
|
242 |
);
|
243 |
|
244 |
+
// --------------------------------------------------------------------------------------------- CONTROL Text Indent
|
245 |
+
$element->add_responsive_control(
|
246 |
+
'_ob_harakiri_txt_indent',
|
247 |
+
[
|
248 |
+
'label' => __( 'Text Indent', 'ooohboi-steroids' ),
|
249 |
+
'separator' => 'before',
|
250 |
+
'type' => Controls_Manager::SLIDER,
|
251 |
+
'size_units' => [ 'px', '%', 'em', 'vw' ],
|
252 |
+
'range' => [
|
253 |
+
'px' => [
|
254 |
+
'max' => 200,
|
255 |
+
],
|
256 |
+
'%' => [
|
257 |
+
'max' => 100,
|
258 |
+
'step' => 0.1,
|
259 |
+
],
|
260 |
+
'vw' => [
|
261 |
+
'max' => 100,
|
262 |
+
'step' => 0.1,
|
263 |
+
],
|
264 |
+
'em' => [
|
265 |
+
'max' => 100,
|
266 |
+
'step' => 0.1,
|
267 |
+
],
|
268 |
+
],
|
269 |
+
'default' => [
|
270 |
+
'unit' => 'px',
|
271 |
+
'size' => 0,
|
272 |
+
],
|
273 |
+
'selectors' => [
|
274 |
+
'{{WRAPPER}} .elementor-widget-container' => 'text-indent: {{SIZE}}{{UNIT}};',
|
275 |
+
],
|
276 |
+
'condition' => [
|
277 |
+
'_ob_use_harakiri' => 'yes',
|
278 |
+
],
|
279 |
+
]
|
280 |
+
);
|
281 |
+
|
282 |
/* Textender alter-ego since v 1.7.0 */
|
283 |
$element->add_responsive_control(
|
284 |
'_ob_harakiri_mix_blend',
|
317 |
'selectors' => [
|
318 |
'{{WRAPPER}} .elementor-widget-container' => 'mix-blend-mode: {{VALUE}};',
|
319 |
],
|
320 |
+
'condition' => [
|
321 |
+
'_ob_use_harakiri' => 'yes',
|
322 |
+
],
|
323 |
],
|
324 |
Controls_Stack::RESPONSIVE_MOBILE => [
|
325 |
'selectors' => [
|
326 |
'{{WRAPPER}} .elementor-widget-container' => 'mix-blend-mode: {{VALUE}};',
|
327 |
],
|
328 |
+
'condition' => [
|
329 |
+
'_ob_use_harakiri' => 'yes',
|
330 |
+
],
|
331 |
],
|
332 |
+
],
|
333 |
+
'condition' => [
|
334 |
+
'_ob_use_harakiri' => 'yes',
|
335 |
],
|
336 |
]
|
337 |
);
|
338 |
|
339 |
+
/* BG clip Headings */
|
340 |
+
// --------------------------------------------------------------------------------------------- CONTROL BACKGROUND Regular
|
341 |
+
if( 'heading' === $element->get_name() ) {
|
342 |
+
|
343 |
+
// --------------------------------------------------------------------------------------------- ScrollTrigger Description
|
344 |
+
$element->add_control(
|
345 |
+
'_ob_harakiri_clip_bg_block_desc',
|
346 |
+
[
|
347 |
+
'label' => esc_html__( 'Clip Text', 'ooohboi-steroids' ),
|
348 |
+
'type' => Controls_Manager::RAW_HTML,
|
349 |
+
'raw' => esc_html__( 'Add the background (image or gradient), select "Clip to text", and your Heading text color will change to either of these two.', 'ooohboi-steroids' ),
|
350 |
+
'content_classes' => 'elementor-control-field-description',
|
351 |
+
'condition' => [
|
352 |
+
'_ob_use_harakiri' => 'yes',
|
353 |
+
],
|
354 |
+
]
|
355 |
+
);
|
356 |
+
|
357 |
+
$element->add_group_control(
|
358 |
+
Group_Control_Background::get_type(),
|
359 |
+
[
|
360 |
+
'name' => '_ob_harakiri_text_clip_bg',
|
361 |
+
'types' => [ 'classic', 'gradient' ],
|
362 |
+
'separator' => 'before',
|
363 |
+
'frontend_available' => true,
|
364 |
+
'selector' => '{{WRAPPER}} .elementor-heading-title',
|
365 |
+
'condition' => [
|
366 |
+
'_ob_use_harakiri' => 'yes',
|
367 |
+
],
|
368 |
+
]
|
369 |
+
);
|
370 |
+
$element->add_control(
|
371 |
+
'_ob_harakiri_text_clip',
|
372 |
+
[
|
373 |
+
'label' => __( 'Background clip', 'ooohboi-steroids' ),
|
374 |
+
'description' => __( 'Apply the background to text only', 'ooohboi-steroids' ),
|
375 |
+
'type' => Controls_Manager::SELECT,
|
376 |
+
'default' => 'none',
|
377 |
+
'options' => [
|
378 |
+
'none' => __( 'Normal', 'ooohboi-steroids' ),
|
379 |
+
'clip' => __( 'Clip to text', 'ooohboi-steroids' ),
|
380 |
+
],
|
381 |
+
'frontend_available' => true,
|
382 |
+
'separator' => 'after',
|
383 |
+
'condition' => [
|
384 |
+
'_ob_use_harakiri' => 'yes',
|
385 |
+
],
|
386 |
+
]
|
387 |
+
);
|
388 |
+
}
|
389 |
/* since 1.8.2 - cutt bottom margin */
|
390 |
+
if( 'heading' !== $element->get_name() ) {
|
391 |
+
$element->add_control(
|
392 |
+
'_ob_harakiri_cut_bottom_margin',
|
393 |
+
[
|
394 |
+
'label' => __( 'Cut off the bottom margin', 'ooohboi-steroids' ),
|
395 |
+
'description' => __( 'NOTE: Only the last child P(aragraph) shall be cut off!', 'ooohboi-steroids' ),
|
396 |
+
'type' => Controls_Manager::SWITCHER,
|
397 |
+
'label_on' => __( 'Yes', 'ooohboi-steroids' ),
|
398 |
+
'label_off' => __( 'No', 'ooohboi-steroids' ),
|
399 |
+
'return_value' => 'inherit',
|
400 |
+
'selectors' => [
|
401 |
+
'{{WRAPPER}} .elementor-widget-container p:last-child' => 'margin-bottom: 0px;',
|
402 |
+
],
|
403 |
+
'condition' => [
|
404 |
+
'_ob_use_harakiri' => 'yes',
|
405 |
+
],
|
406 |
+
]
|
407 |
+
);
|
408 |
+
}
|
409 |
|
410 |
}
|
411 |
|
controls/ooohboi-hover-animator.php
CHANGED
@@ -41,6 +41,8 @@ class OoohBoi_Hover_Animator {
|
|
41 |
add_action( 'elementor/frontend/container/before_render', [ __CLASS__, 'do_element_classing' ] );
|
42 |
|
43 |
/* should enqueue? */
|
|
|
|
|
44 |
add_action( 'elementor/frontend/widget/before_render', [ __CLASS__, 'should_script_enqueue' ] );
|
45 |
/* add script */
|
46 |
add_action( 'elementor/preview/enqueue_scripts', [ __CLASS__, 'enqueue_scripts' ] );
|
@@ -67,7 +69,9 @@ class OoohBoi_Hover_Animator {
|
|
67 |
self::$should_script_enqueue = true;
|
68 |
self::enqueue_scripts();
|
69 |
|
70 |
-
remove_action( 'elementor/frontend/
|
|
|
|
|
71 |
}
|
72 |
}
|
73 |
|
@@ -186,7 +190,6 @@ class OoohBoi_Hover_Animator {
|
|
186 |
'frontend_available' => true,
|
187 |
]
|
188 |
);
|
189 |
-
|
190 |
// --------------------------------------------------------------------------------------------- CONTROL OPACITY
|
191 |
$element->add_control(
|
192 |
'_ob_hoveranimator_opacity_popover',
|
41 |
add_action( 'elementor/frontend/container/before_render', [ __CLASS__, 'do_element_classing' ] );
|
42 |
|
43 |
/* should enqueue? */
|
44 |
+
add_action( 'elementor/frontend/column/before_render', [ __CLASS__, 'should_script_enqueue' ] );
|
45 |
+
add_action( 'elementor/frontend/container/before_render', [ __CLASS__, 'should_script_enqueue' ] );
|
46 |
add_action( 'elementor/frontend/widget/before_render', [ __CLASS__, 'should_script_enqueue' ] );
|
47 |
/* add script */
|
48 |
add_action( 'elementor/preview/enqueue_scripts', [ __CLASS__, 'enqueue_scripts' ] );
|
69 |
self::$should_script_enqueue = true;
|
70 |
self::enqueue_scripts();
|
71 |
|
72 |
+
remove_action( 'elementor/frontend/column/before_render', [ __CLASS__, 'should_script_enqueue' ] );
|
73 |
+
remove_action( 'elementor/frontend/container/before_render', [ __CLASS__, 'should_script_enqueue' ] );
|
74 |
+
remove_action( 'elementor/frontend/widget/before_render', [ __CLASS__, 'should_script_enqueue' ] );
|
75 |
}
|
76 |
}
|
77 |
|
190 |
'frontend_available' => true,
|
191 |
]
|
192 |
);
|
|
|
193 |
// --------------------------------------------------------------------------------------------- CONTROL OPACITY
|
194 |
$element->add_control(
|
195 |
'_ob_hoveranimator_opacity_popover',
|
controls/ooohboi-imbox.php
CHANGED
@@ -102,6 +102,27 @@ final class OoohBoi_Imbox {
|
|
102 |
],
|
103 |
]
|
104 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
105 |
|
106 |
// ------------------------------------------------------------------------- CONTROL: Yes 4 more controls
|
107 |
$element->add_control(
|
102 |
],
|
103 |
]
|
104 |
);
|
105 |
+
// 1.9.6 patch
|
106 |
+
$element->add_responsive_control(
|
107 |
+
'_ob_imbox_no_collapse_cont_align',
|
108 |
+
[
|
109 |
+
'label' => __( 'Content position', 'ooohboi-steroids' ),
|
110 |
+
'description' => __( 'Where to align the content to?', 'ooohboi-steroids' ),
|
111 |
+
'type' => Controls_Manager::SELECT,
|
112 |
+
'default' => 'center',
|
113 |
+
'options' => [
|
114 |
+
'flex-start' => __( 'Start', 'ooohboi-steroids' ),
|
115 |
+
'center' => __( 'Center', 'ooohboi-steroids' ),
|
116 |
+
'flex-end' => __( 'End', 'ooohboi-steroids' ),
|
117 |
+
],
|
118 |
+
'selectors' => [
|
119 |
+
'{{WRAPPER}}.elementor-position-left .elementor-image-box-wrapper .elementor-image-box-content, {{WRAPPER}}.elementor-position-right .elementor-image-box-wrapper .elementor-image-box-content' => 'align-self: {{VALUE}};',
|
120 |
+
],
|
121 |
+
'condition' => [
|
122 |
+
'_ob_imbox_no_collapse' => 'inherit',
|
123 |
+
],
|
124 |
+
]
|
125 |
+
);
|
126 |
|
127 |
// ------------------------------------------------------------------------- CONTROL: Yes 4 more controls
|
128 |
$element->add_control(
|
controls/ooohboi-interactor.php
ADDED
@@ -0,0 +1,718 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
use Elementor\Controls_Manager;
|
3 |
+
use Elementor\Controls_Stack;
|
4 |
+
use Elementor\Element_Base;
|
5 |
+
use Elementor\Repeater;
|
6 |
+
|
7 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
8 |
+
exit; // Exit if accessed directly.
|
9 |
+
}
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Main OoohBoi Interactor Class
|
13 |
+
*
|
14 |
+
* The main class that initiates and runs the plugin.
|
15 |
+
*
|
16 |
+
* @since 1.9.6
|
17 |
+
*/
|
18 |
+
class OoohBoi_Interactor {
|
19 |
+
|
20 |
+
static $should_script_enqueue = false;
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Initialize
|
24 |
+
*
|
25 |
+
* @since 1.9.6
|
26 |
+
*
|
27 |
+
* @access public
|
28 |
+
*/
|
29 |
+
public static function init() {
|
30 |
+
|
31 |
+
/* containers */
|
32 |
+
add_action( 'elementor/element/container/section_layout/after_section_end', [ __CLASS__, 'add_section' ] );
|
33 |
+
add_action( 'elementor/frontend/container/before_render', [ __CLASS__, 'add_attributes' ] );
|
34 |
+
/* widgets */
|
35 |
+
add_action( 'elementor/element/common/_section_background/after_section_end', [ __CLASS__, 'add_section' ] );
|
36 |
+
add_action( 'elementor/element/after_add_attributes', [ __CLASS__, 'add_attributes' ] );
|
37 |
+
|
38 |
+
/* should enqueue? */
|
39 |
+
add_action( 'elementor/frontend/container/before_render', [ __CLASS__, 'should_script_enqueue' ] );
|
40 |
+
add_action( 'elementor/frontend/widget/before_render', [ __CLASS__, 'should_script_enqueue' ] );
|
41 |
+
/* add script */
|
42 |
+
add_action( 'elementor/preview/enqueue_scripts', [ __CLASS__, 'enqueue_scripts' ] );
|
43 |
+
|
44 |
+
}
|
45 |
+
|
46 |
+
public static function add_attributes( $element ) {
|
47 |
+
|
48 |
+
if ( \Elementor\Plugin::instance()->editor->is_edit_mode() ) return;
|
49 |
+
$settings = $element->get_settings_for_display();
|
50 |
+
|
51 |
+
if ( isset( $settings[ '_ob_do_interactor' ] ) && 'yes' === $settings[ '_ob_do_interactor' ] ) {
|
52 |
+
|
53 |
+
$element->add_render_attribute( '_wrapper', [
|
54 |
+
'class' => 'ob-is-interactor'
|
55 |
+
] );
|
56 |
+
|
57 |
+
}
|
58 |
+
|
59 |
+
}
|
60 |
+
|
61 |
+
/* enqueue script JS */
|
62 |
+
public static function enqueue_scripts() {
|
63 |
+
|
64 |
+
$extension_js = plugin_dir_path( __DIR__ ) . 'assets/js/interactor.js';
|
65 |
+
|
66 |
+
if( file_exists( $extension_js ) ) {
|
67 |
+
wp_add_inline_script( 'elementor-frontend', file_get_contents( $extension_js ) );
|
68 |
+
}
|
69 |
+
|
70 |
+
}
|
71 |
+
/* should enqueue? */
|
72 |
+
public static function should_script_enqueue( $element ) {
|
73 |
+
|
74 |
+
if( self::$should_script_enqueue ) return;
|
75 |
+
|
76 |
+
if( 'yes' == $element->get_settings_for_display( '_ob_do_interactor' ) ) {
|
77 |
+
|
78 |
+
self::$should_script_enqueue = true;
|
79 |
+
self::enqueue_scripts();
|
80 |
+
|
81 |
+
remove_action( 'elementor/frontend/container/before_render', [ __CLASS__, 'should_script_enqueue' ] );
|
82 |
+
remove_action( 'elementor/frontend/widget/before_render', [ __CLASS__, 'should_script_enqueue' ] );
|
83 |
+
}
|
84 |
+
}
|
85 |
+
|
86 |
+
public static function add_section( $element ) {
|
87 |
+
|
88 |
+
$element->start_controls_section(
|
89 |
+
'_ob_steroids_interactor',
|
90 |
+
[
|
91 |
+
'label' => 'I N T E R A C T O R',
|
92 |
+
'tab' => Controls_Manager::TAB_ADVANCED,
|
93 |
+
]
|
94 |
+
);
|
95 |
+
|
96 |
+
// --------------------------------------------------------------------------------------------- CONTROL: Use Interactor
|
97 |
+
$element->add_control(
|
98 |
+
'_ob_do_interactor',
|
99 |
+
[
|
100 |
+
'label' => esc_html__( 'Enable Interactor?', 'ooohboi-steroids' ),
|
101 |
+
'separator' => 'after',
|
102 |
+
'type' => Controls_Manager::SWITCHER,
|
103 |
+
'label_on' => esc_html__( 'Yes', 'ooohboi-steroids' ),
|
104 |
+
'label_off' => esc_html__( 'No', 'ooohboi-steroids' ),
|
105 |
+
'return_value' => 'yes',
|
106 |
+
'default' => 'no',
|
107 |
+
'frontend_available' => true,
|
108 |
+
]
|
109 |
+
);
|
110 |
+
// --------------------------------------------------------------------------------------------- CONTROL: Interaction Type
|
111 |
+
$element->add_control(
|
112 |
+
'_ob_i_type',
|
113 |
+
[
|
114 |
+
'label' => esc_html__( 'Interaction Type', 'ooohboi-steroids' ),
|
115 |
+
'description' => esc_html__( 'It is either the onClick or onHover the selected element/widget', 'ooohboi-steroids' ),
|
116 |
+
'type' => Controls_Manager::SELECT,
|
117 |
+
'default' => 'mouseenter',
|
118 |
+
'options' => [
|
119 |
+
'click' => esc_html__( 'Mouse Click', 'ooohboi-steroids' ),
|
120 |
+
'mouseenter' => esc_html__( 'Mouse Over', 'ooohboi-steroids' ),
|
121 |
+
],
|
122 |
+
'condition' => [
|
123 |
+
'_ob_do_interactor' => 'yes',
|
124 |
+
],
|
125 |
+
'frontend_available' => true,
|
126 |
+
]
|
127 |
+
);
|
128 |
+
// ------------------------------------------------------------------------- CONTROL: Force pointer
|
129 |
+
$element->add_control(
|
130 |
+
'_ob_i_target_pointer',
|
131 |
+
[
|
132 |
+
'label' => esc_html__( 'Pointer Type', 'ooohboi-steroids' ),
|
133 |
+
'description' => esc_html__( 'Force pointer type on the trigger if needed', 'ooohboi-steroids' ),
|
134 |
+
'type' => Controls_Manager::SELECT,
|
135 |
+
'default' => 'default',
|
136 |
+
'separator' => 'before',
|
137 |
+
'options' => [
|
138 |
+
'default' => esc_html__( 'Default', 'ooohboi-steroids' ),
|
139 |
+
'pointer' => esc_html__( 'Pointer', 'ooohboi-steroids' ),
|
140 |
+
],
|
141 |
+
'selectors' => [
|
142 |
+
'{{WRAPPER}}' => 'cursor: {{VALUE}};',
|
143 |
+
],
|
144 |
+
'condition' => [
|
145 |
+
'_ob_do_interactor' => 'yes',
|
146 |
+
],
|
147 |
+
]
|
148 |
+
);
|
149 |
+
|
150 |
+
// --------------------------------------------------------------------------------------------- CONTROL: Interactions
|
151 |
+
$element->add_control(
|
152 |
+
'_ob_i_property_descr',
|
153 |
+
[
|
154 |
+
'label' => esc_html__( 'Interactive Properties', 'ooohboi-steroids' ),
|
155 |
+
'type' => Controls_Manager::RAW_HTML,
|
156 |
+
'raw' => esc_html__( 'Add as many as you like but avoid redundancy!', 'ooohboi-steroids' ),
|
157 |
+
'content_classes' => 'elementor-control-field-description',
|
158 |
+
'separator' => 'before',
|
159 |
+
'condition' => [
|
160 |
+
'_ob_do_interactor' => 'yes',
|
161 |
+
],
|
162 |
+
]
|
163 |
+
);
|
164 |
+
|
165 |
+
$repeater = new Repeater();
|
166 |
+
|
167 |
+
// -------------------------------------------------------------------------- CONTROL: Interaction Target
|
168 |
+
$repeater->add_control(
|
169 |
+
'_ob_i_target',
|
170 |
+
[
|
171 |
+
'label' => esc_html__( 'Interaction Target', 'ooohboi-steroids' ),
|
172 |
+
'description' => esc_html__( 'Self or any other element on page', 'ooohboi-steroids' ),
|
173 |
+
'type' => Controls_Manager::SELECT,
|
174 |
+
'default' => 'self',
|
175 |
+
'options' => [
|
176 |
+
'self' => esc_html__( 'Self', 'ooohboi-steroids' ),
|
177 |
+
'other' => esc_html__( 'Other element', 'ooohboi-steroids' ),
|
178 |
+
],
|
179 |
+
'frontend_available' => true,
|
180 |
+
]
|
181 |
+
);
|
182 |
+
// --------------------------------------------------------------------------------------------- CONTROL: target element class or ID
|
183 |
+
$repeater->add_control(
|
184 |
+
'_ob_i_target_id_or_class',
|
185 |
+
[
|
186 |
+
'label' => esc_html__( 'Element class or ID', 'ooohboi-steroids' ),
|
187 |
+
'description' => esc_html__( 'Enter the target element class or ID. IT MUST INCLUDE THE PREFIX! For instance; ".some-class-name" (for the custom class name) or "#some-id" (for the element ID)', 'ooohboi-steroids' ),
|
188 |
+
'type' => Controls_Manager::TEXT,
|
189 |
+
'condition' => [
|
190 |
+
'_ob_i_target' => 'other'
|
191 |
+
],
|
192 |
+
'frontend_available' => true,
|
193 |
+
]
|
194 |
+
);
|
195 |
+
// ------------------------------------------------------------------------- CONTROL Select animatable property
|
196 |
+
$repeater->add_control(
|
197 |
+
'_ob_i_property',
|
198 |
+
[
|
199 |
+
'label' => esc_html__( 'Animate', 'ooohboi-steroids' ),
|
200 |
+
'type' => Controls_Manager::SELECT,
|
201 |
+
'default' => 'none',
|
202 |
+
'frontend_available' => true,
|
203 |
+
'options' => [
|
204 |
+
'none' => esc_html__( 'None', 'ooohboi-steroids' ),
|
205 |
+
'width' => esc_html__( 'Width', 'ooohboi-steroids' ),
|
206 |
+
'height' => esc_html__( 'Height', 'ooohboi-steroids' ),
|
207 |
+
'translateX' => esc_html__( 'Translate X', 'ooohboi-steroids' ),
|
208 |
+
'translateY' => esc_html__( 'Translate Y', 'ooohboi-steroids' ),
|
209 |
+
'opacity' => esc_html__( 'Opacity', 'ooohboi-steroids' ),
|
210 |
+
'color' => esc_html__( 'Color', 'ooohboi-steroids' ),
|
211 |
+
'background-color' => esc_html__( 'Background color', 'ooohboi-steroids' ),
|
212 |
+
'scale' => esc_html__( 'Scale', 'ooohboi-steroids' ),
|
213 |
+
'rotate' => esc_html__( 'Rotate', 'ooohboi-steroids' ),
|
214 |
+
'skewX' => esc_html__( 'SkewX', 'ooohboi-steroids' ),
|
215 |
+
'skewY' => esc_html__( 'SkewY', 'ooohboi-steroids' ),
|
216 |
+
],
|
217 |
+
]
|
218 |
+
);
|
219 |
+
// --------------------------------------------------------------------------------------------- CONTROL duration
|
220 |
+
$repeater->add_control(
|
221 |
+
'_ob_i_duration',
|
222 |
+
[
|
223 |
+
'label' => esc_html__( 'Duration', 'ooohboi-steroids' ),
|
224 |
+
'description' => esc_html__( 'Animation duration in seconds. 0.4 is deafult.', 'ooohboi-steroids' ),
|
225 |
+
'type' => Controls_Manager::NUMBER,
|
226 |
+
'frontend_available' => true,
|
227 |
+
'min' => 0,
|
228 |
+
'default' => 0.4,
|
229 |
+
]
|
230 |
+
);
|
231 |
+
// --------------------------------------------------------------------------------------------- CONTROL delay
|
232 |
+
$repeater->add_control(
|
233 |
+
'_ob_i_delay',
|
234 |
+
[
|
235 |
+
'label' => esc_html__( 'Delay', 'ooohboi-steroids' ),
|
236 |
+
'description' => esc_html__( 'Seconds to pause before the animation starts.', 'ooohboi-steroids' ),
|
237 |
+
'type' => Controls_Manager::NUMBER,
|
238 |
+
'frontend_available' => true,
|
239 |
+
'min' => 0,
|
240 |
+
'default' => 0,
|
241 |
+
]
|
242 |
+
);
|
243 |
+
// ------------------------------------------------------------------------- CONTROL: Transforms easing
|
244 |
+
$repeater->add_control(
|
245 |
+
'_ob_i_easing',
|
246 |
+
[
|
247 |
+
'label' => esc_html__( 'Easing', 'ooohboi-steroids' ),
|
248 |
+
'type' => Controls_Manager::SELECT,
|
249 |
+
'frontend_available' => true,
|
250 |
+
'default' => 'ease-in-out',
|
251 |
+
'separator' => 'before',
|
252 |
+
'options' => [
|
253 |
+
'ease' => esc_html__( 'Default', 'ooohboi-steroids' ),
|
254 |
+
'ease-in' => esc_html__( 'Ease-in', 'ooohboi-steroids' ),
|
255 |
+
'ease-out' => esc_html__( 'Ease-out', 'ooohboi-steroids' ),
|
256 |
+
'ease-in-out' => esc_html__( 'Ease-in-out', 'ooohboi-steroids' ),
|
257 |
+
],
|
258 |
+
]
|
259 |
+
);
|
260 |
+
// FROM ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
261 |
+
$repeater->add_control(
|
262 |
+
'_ob_i_prop_width_from',
|
263 |
+
[
|
264 |
+
'label' => esc_html__( 'From', 'ooohboi-steroids' ),
|
265 |
+
'type' => Controls_Manager::SLIDER,
|
266 |
+
'frontend_available' => true,
|
267 |
+
'range' => [
|
268 |
+
'px' => [
|
269 |
+
'max' => 500,
|
270 |
+
'step' => 1,
|
271 |
+
],
|
272 |
+
'%' => [
|
273 |
+
'max' => 100,
|
274 |
+
'step' => 1,
|
275 |
+
],
|
276 |
+
'vw' => [
|
277 |
+
'max' => 100,
|
278 |
+
'step' => 1,
|
279 |
+
],
|
280 |
+
],
|
281 |
+
'size_units' => [ 'px', '%', 'vw' ],
|
282 |
+
'default' => [
|
283 |
+
'unit' => 'px',
|
284 |
+
'size' => 0,
|
285 |
+
],
|
286 |
+
'condition' => [
|
287 |
+
'_ob_i_property' => 'width'
|
288 |
+
],
|
289 |
+
]
|
290 |
+
);
|
291 |
+
$repeater->add_control(
|
292 |
+
'_ob_i_prop_height_from',
|
293 |
+
[
|
294 |
+
'label' => esc_html__( 'From', 'ooohboi-steroids' ),
|
295 |
+
'type' => Controls_Manager::SLIDER,
|
296 |
+
'frontend_available' => true,
|
297 |
+
'range' => [
|
298 |
+
'px' => [
|
299 |
+
'max' => 500,
|
300 |
+
'step' => 1,
|
301 |
+
],
|
302 |
+
'%' => [
|
303 |
+
'max' => 100,
|
304 |
+
'step' => 1,
|
305 |
+
],
|
306 |
+
'vh' => [
|
307 |
+
'max' => 100,
|
308 |
+
'step' => 1,
|
309 |
+
],
|
310 |
+
],
|
311 |
+
'size_units' => [ 'px', '%', 'vh' ],
|
312 |
+
'default' => [
|
313 |
+
'unit' => 'px',
|
314 |
+
'size' => 0,
|
315 |
+
],
|
316 |
+
'condition' => [
|
317 |
+
'_ob_i_property' => 'height'
|
318 |
+
],
|
319 |
+
]
|
320 |
+
);
|
321 |
+
$repeater->add_control(
|
322 |
+
'_ob_i_prop_translateX_from',
|
323 |
+
[
|
324 |
+
'label' => esc_html__( 'From', 'ooohboi-steroids' ),
|
325 |
+
'type' => Controls_Manager::SLIDER,
|
326 |
+
'frontend_available' => true,
|
327 |
+
'range' => [
|
328 |
+
'px' => [
|
329 |
+
'max' => 500,
|
330 |
+
'step' => 1,
|
331 |
+
],
|
332 |
+
'%' => [
|
333 |
+
'max' => 100,
|
334 |
+
'step' => 1,
|
335 |
+
],
|
336 |
+
],
|
337 |
+
'size_units' => [ 'px', '%' ],
|
338 |
+
'default' => [
|
339 |
+
'unit' => 'px',
|
340 |
+
'size' => 0,
|
341 |
+
],
|
342 |
+
'condition' => [
|
343 |
+
'_ob_i_property' => 'translateX'
|
344 |
+
],
|
345 |
+
]
|
346 |
+
);
|
347 |
+
$repeater->add_control(
|
348 |
+
'_ob_i_prop_translateY_from',
|
349 |
+
[
|
350 |
+
'label' => esc_html__( 'From', 'ooohboi-steroids' ),
|
351 |
+
'type' => Controls_Manager::SLIDER,
|
352 |
+
'frontend_available' => true,
|
353 |
+
'range' => [
|
354 |
+
'px' => [
|
355 |
+
'max' => 500,
|
356 |
+
'step' => 1,
|
357 |
+
],
|
358 |
+
'%' => [
|
359 |
+
'max' => 100,
|
360 |
+
'step' => 1,
|
361 |
+
],
|
362 |
+
],
|
363 |
+
'size_units' => [ 'px', '%' ],
|
364 |
+
'default' => [
|
365 |
+
'unit' => 'px',
|
366 |
+
'size' => 0,
|
367 |
+
],
|
368 |
+
'condition' => [
|
369 |
+
'_ob_i_property' => 'translateY'
|
370 |
+
],
|
371 |
+
]
|
372 |
+
);
|
373 |
+
$repeater->add_control(
|
374 |
+
'_ob_i_prop_opacity_from',
|
375 |
+
[
|
376 |
+
'label' => esc_html__( 'From', 'ooohboi-steroids' ),
|
377 |
+
'type' => Controls_Manager::NUMBER,
|
378 |
+
'frontend_available' => true,
|
379 |
+
'min' => 0,
|
380 |
+
'max' => 1,
|
381 |
+
'default' => 1,
|
382 |
+
'condition' => [
|
383 |
+
'_ob_i_property' => 'opacity',
|
384 |
+
],
|
385 |
+
]
|
386 |
+
);
|
387 |
+
$repeater->add_control(
|
388 |
+
'_ob_i_prop_color_from',
|
389 |
+
[
|
390 |
+
'label' => esc_html__( 'From', 'ooohboi-steroids' ),
|
391 |
+
'type' => Controls_Manager::COLOR,
|
392 |
+
'frontend_available' => true,
|
393 |
+
'condition' => [
|
394 |
+
'_ob_i_property' => 'color'
|
395 |
+
],
|
396 |
+
]
|
397 |
+
);
|
398 |
+
$repeater->add_control(
|
399 |
+
'_ob_i_prop_background-color_from',
|
400 |
+
[
|
401 |
+
'label' => esc_html__( 'From', 'ooohboi-steroids' ),
|
402 |
+
'type' => Controls_Manager::COLOR,
|
403 |
+
'frontend_available' => true,
|
404 |
+
'condition' => [
|
405 |
+
'_ob_i_property' => 'background-color'
|
406 |
+
],
|
407 |
+
]
|
408 |
+
);
|
409 |
+
$repeater->add_control(
|
410 |
+
'_ob_i_prop_scale_from',
|
411 |
+
[
|
412 |
+
'label' => esc_html__( 'From', 'ooohboi-steroids' ),
|
413 |
+
'type' => Controls_Manager::NUMBER,
|
414 |
+
'frontend_available' => true,
|
415 |
+
'min' => 0,
|
416 |
+
'default' => 1,
|
417 |
+
'condition' => [
|
418 |
+
'_ob_i_property' => 'scale',
|
419 |
+
],
|
420 |
+
]
|
421 |
+
);
|
422 |
+
$repeater->add_control(
|
423 |
+
'_ob_i_prop_rotate_from',
|
424 |
+
[
|
425 |
+
'label' => esc_html__( 'From', 'ooohboi-steroids' ),
|
426 |
+
'type' => Controls_Manager::NUMBER,
|
427 |
+
'frontend_available' => true,
|
428 |
+
'min' => -360,
|
429 |
+
'max' => 360,
|
430 |
+
'default' => 0,
|
431 |
+
'condition' => [
|
432 |
+
'_ob_i_property' => 'rotate',
|
433 |
+
],
|
434 |
+
]
|
435 |
+
);
|
436 |
+
$repeater->add_control(
|
437 |
+
'_ob_i_prop_skewX_from',
|
438 |
+
[
|
439 |
+
'label' => esc_html__( 'From', 'ooohboi-steroids' ),
|
440 |
+
'type' => Controls_Manager::NUMBER,
|
441 |
+
'frontend_available' => true,
|
442 |
+
'min' => -360,
|
443 |
+
'max' => 360,
|
444 |
+
'default' => 0,
|
445 |
+
'condition' => [
|
446 |
+
'_ob_i_property' => 'skewX',
|
447 |
+
],
|
448 |
+
]
|
449 |
+
);
|
450 |
+
$repeater->add_control(
|
451 |
+
'_ob_i_prop_skewY_from',
|
452 |
+
[
|
453 |
+
'label' => esc_html__( 'From', 'ooohboi-steroids' ),
|
454 |
+
'type' => Controls_Manager::NUMBER,
|
455 |
+
'frontend_available' => true,
|
456 |
+
'min' => -360,
|
457 |
+
'max' => 360,
|
458 |
+
'default' => 0,
|
459 |
+
'condition' => [
|
460 |
+
'_ob_i_property' => 'skewY',
|
461 |
+
],
|
462 |
+
]
|
463 |
+
);
|
464 |
+
// TO ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
465 |
+
$repeater->add_control(
|
466 |
+
'_ob_i_prop_width_to',
|
467 |
+
[
|
468 |
+
'label' => esc_html__( 'To', 'ooohboi-steroids' ),
|
469 |
+
'type' => Controls_Manager::SLIDER,
|
470 |
+
'frontend_available' => true,
|
471 |
+
'range' => [
|
472 |
+
'px' => [
|
473 |
+
'max' => 500,
|
474 |
+
'step' => 1,
|
475 |
+
],
|
476 |
+
'%' => [
|
477 |
+
'max' => 100,
|
478 |
+
'step' => 1,
|
479 |
+
],
|
480 |
+
'vw' => [
|
481 |
+
'max' => 100,
|
482 |
+
'step' => 1,
|
483 |
+
],
|
484 |
+
],
|
485 |
+
'size_units' => [ 'px', '%', 'vw' ],
|
486 |
+
'default' => [
|
487 |
+
'unit' => 'px',
|
488 |
+
'size' => 0,
|
489 |
+
],
|
490 |
+
'condition' => [
|
491 |
+
'_ob_i_property' => 'width'
|
492 |
+
],
|
493 |
+
]
|
494 |
+
);
|
495 |
+
$repeater->add_control(
|
496 |
+
'_ob_i_prop_height_to',
|
497 |
+
[
|
498 |
+
'label' => esc_html__( 'To', 'ooohboi-steroids' ),
|
499 |
+
'type' => Controls_Manager::SLIDER,
|
500 |
+
'frontend_available' => true,
|
501 |
+
'range' => [
|
502 |
+
'px' => [
|
503 |
+
'max' => 500,
|
504 |
+
'step' => 1,
|
505 |
+
],
|
506 |
+
'%' => [
|
507 |
+
'max' => 100,
|
508 |
+
'step' => 1,
|
509 |
+
],
|
510 |
+
'vh' => [
|
511 |
+
'max' => 100,
|
512 |
+
'step' => 1,
|
513 |
+
],
|
514 |
+
],
|
515 |
+
'size_units' => [ 'px', '%', 'vh' ],
|
516 |
+
'default' => [
|
517 |
+
'unit' => 'px',
|
518 |
+
'size' => 0,
|
519 |
+
],
|
520 |
+
'condition' => [
|
521 |
+
'_ob_i_property' => 'height'
|
522 |
+
],
|
523 |
+
]
|
524 |
+
);
|
525 |
+
$repeater->add_control(
|
526 |
+
'_ob_i_prop_translateX_to',
|
527 |
+
[
|
528 |
+
'label' => esc_html__( 'To', 'ooohboi-steroids' ),
|
529 |
+
'type' => Controls_Manager::SLIDER,
|
530 |
+
'frontend_available' => true,
|
531 |
+
'range' => [
|
532 |
+
'px' => [
|
533 |
+
'max' => 500,
|
534 |
+
'step' => 1,
|
535 |
+
],
|
536 |
+
'%' => [
|
537 |
+
'max' => 100,
|
538 |
+
'step' => 1,
|
539 |
+
],
|
540 |
+
],
|
541 |
+
'size_units' => [ 'px', '%' ],
|
542 |
+
'default' => [
|
543 |
+
'unit' => 'px',
|
544 |
+
'size' => 0,
|
545 |
+
],
|
546 |
+
'condition' => [
|
547 |
+
'_ob_i_property' => 'translateX'
|
548 |
+
],
|
549 |
+
]
|
550 |
+
);
|
551 |
+
$repeater->add_control(
|
552 |
+
'_ob_i_prop_translateY_to',
|
553 |
+
[
|
554 |
+
'label' => esc_html__( 'To', 'ooohboi-steroids' ),
|
555 |
+
'type' => Controls_Manager::SLIDER,
|
556 |
+
'frontend_available' => true,
|
557 |
+
'range' => [
|
558 |
+
'px' => [
|
559 |
+
'max' => 500,
|
560 |
+
'step' => 1,
|
561 |
+
],
|
562 |
+
'%' => [
|
563 |
+
'max' => 100,
|
564 |
+
'step' => 1,
|
565 |
+
],
|
566 |
+
],
|
567 |
+
'size_units' => [ 'px', '%' ],
|
568 |
+
'default' => [
|
569 |
+
'unit' => 'px',
|
570 |
+
'size' => 0,
|
571 |
+
],
|
572 |
+
'condition' => [
|
573 |
+
'_ob_i_property' => 'translateY'
|
574 |
+
],
|
575 |
+
]
|
576 |
+
);
|
577 |
+
$repeater->add_control(
|
578 |
+
'_ob_i_prop_opacity_to',
|
579 |
+
[
|
580 |
+
'label' => esc_html__( 'To', 'ooohboi-steroids' ),
|
581 |
+
'type' => Controls_Manager::NUMBER,
|
582 |
+
'frontend_available' => true,
|
583 |
+
'min' => 0,
|
584 |
+
'max' => 1,
|
585 |
+
'default' => 1,
|
586 |
+
'condition' => [
|
587 |
+
'_ob_i_property' => 'opacity',
|
588 |
+
],
|
589 |
+
]
|
590 |
+
);
|
591 |
+
$repeater->add_control(
|
592 |
+
'_ob_i_prop_color_to',
|
593 |
+
[
|
594 |
+
'label' => esc_html__( 'To', 'ooohboi-steroids' ),
|
595 |
+
'type' => Controls_Manager::COLOR,
|
596 |
+
'frontend_available' => true,
|
597 |
+
'condition' => [
|
598 |
+
'_ob_i_property' => 'color'
|
599 |
+
],
|
600 |
+
]
|
601 |
+
);
|
602 |
+
$repeater->add_control(
|
603 |
+
'_ob_i_prop_background-color_to',
|
604 |
+
[
|
605 |
+
'label' => esc_html__( 'To', 'ooohboi-steroids' ),
|
606 |
+
'type' => Controls_Manager::COLOR,
|
607 |
+
'frontend_available' => true,
|
608 |
+
'condition' => [
|
609 |
+
'_ob_i_property' => 'background-color'
|
610 |
+
],
|
611 |
+
]
|
612 |
+
);
|
613 |
+
$repeater->add_control(
|
614 |
+
'_ob_i_prop_scale_to',
|
615 |
+
[
|
616 |
+
'label' => esc_html__( 'To', 'ooohboi-steroids' ),
|
617 |
+
'type' => Controls_Manager::NUMBER,
|
618 |
+
'frontend_available' => true,
|
619 |
+
'min' => 0,
|
620 |
+
'default' => 1,
|
621 |
+
'condition' => [
|
622 |
+
'_ob_i_property' => 'scale',
|
623 |
+
],
|
624 |
+
]
|
625 |
+
);
|
626 |
+
$repeater->add_control(
|
627 |
+
'_ob_i_prop_tr_origin',
|
628 |
+
[
|
629 |
+
'label' => esc_html__( 'Transform Origin', 'ooohboi-steroids' ),
|
630 |
+
'type' => Controls_Manager::SELECT,
|
631 |
+
'frontend_available' => true,
|
632 |
+
'default' => 'none',
|
633 |
+
'options' => [
|
634 |
+
'none' => esc_html__( 'None', 'ooohboi-steroids' ),
|
635 |
+
'left top' => esc_html__( 'Left Top', 'ooohboi-steroids' ),
|
636 |
+
'left center' => esc_html__( 'Left Center', 'ooohboi-steroids' ),
|
637 |
+
'left bottom' => esc_html__( 'Left Bottom', 'ooohboi-steroids' ),
|
638 |
+
'center top' => esc_html__( 'Center Top', 'ooohboi-steroids' ),
|
639 |
+
'center center' => esc_html__( 'Center Center', 'ooohboi-steroids' ),
|
640 |
+
'center bottom' => esc_html__( 'Center Bottom', 'ooohboi-steroids' ),
|
641 |
+
'right top' => esc_html__( 'Right Top', 'ooohboi-steroids' ),
|
642 |
+
'right center' => esc_html__( 'Right Center', 'ooohboi-steroids' ),
|
643 |
+
'right bottom' => esc_html__( 'Right Bottom', 'ooohboi-steroids' ),
|
644 |
+
],
|
645 |
+
'condition' => [
|
646 |
+
'_ob_i_property' => 'scale',
|
647 |
+
],
|
648 |
+
]
|
649 |
+
);
|
650 |
+
$repeater->add_control(
|
651 |
+
'_ob_i_prop_rotate_to',
|
652 |
+
[
|
653 |
+
'label' => esc_html__( 'To', 'ooohboi-steroids' ),
|
654 |
+
'type' => Controls_Manager::NUMBER,
|
655 |
+
'frontend_available' => true,
|
656 |
+
'min' => -360,
|
657 |
+
'max' => 360,
|
658 |
+
'default' => 0,
|
659 |
+
'condition' => [
|
660 |
+
'_ob_i_property' => 'rotate',
|
661 |
+
],
|
662 |
+
]
|
663 |
+
);
|
664 |
+
$repeater->add_control(
|
665 |
+
'_ob_i_prop_skewX_to',
|
666 |
+
[
|
667 |
+
'label' => esc_html__( 'To', 'ooohboi-steroids' ),
|
668 |
+
'type' => Controls_Manager::NUMBER,
|
669 |
+
'frontend_available' => true,
|
670 |
+
'min' => -360,
|
671 |
+
'max' => 360,
|
672 |
+
'default' => 0,
|
673 |
+
'condition' => [
|
674 |
+
'_ob_i_property' => 'skewX',
|
675 |
+
],
|
676 |
+
]
|
677 |
+
);
|
678 |
+
$repeater->add_control(
|
679 |
+
'_ob_i_prop_skewY_to',
|
680 |
+
[
|
681 |
+
'label' => esc_html__( 'To', 'ooohboi-steroids' ),
|
682 |
+
'type' => Controls_Manager::NUMBER,
|
683 |
+
'frontend_available' => true,
|
684 |
+
'min' => -360,
|
685 |
+
'max' => 360,
|
686 |
+
'default' => 0,
|
687 |
+
'condition' => [
|
688 |
+
'_ob_i_property' => 'skewY',
|
689 |
+
],
|
690 |
+
]
|
691 |
+
);
|
692 |
+
// render REPEATER
|
693 |
+
$element->add_control(
|
694 |
+
'_ob_i_props_repeater',
|
695 |
+
[
|
696 |
+
'type' => Controls_Manager::REPEATER,
|
697 |
+
'frontend_available' => true,
|
698 |
+
'fields' => $repeater->get_controls(),
|
699 |
+
'title_field' => '<# print(_ob_i_property.slice(0,1).toUpperCase() + _ob_i_property.slice(1) + ` | ` + _ob_i_target + ` | ` + _ob_i_target_id_or_class) #>',
|
700 |
+
'default' => [
|
701 |
+
[
|
702 |
+
'_ob_i_property' => 'translateX',
|
703 |
+
'_ob_i_prop_translateX_from' => 0,
|
704 |
+
'_ob_i_prop_translateX_to' => 0,
|
705 |
+
],
|
706 |
+
],
|
707 |
+
'condition' => [
|
708 |
+
'_ob_do_interactor' => 'yes',
|
709 |
+
],
|
710 |
+
]
|
711 |
+
);
|
712 |
+
|
713 |
+
$element->end_controls_section(); // END SECTION / PANEL
|
714 |
+
|
715 |
+
}
|
716 |
+
|
717 |
+
|
718 |
+
}
|
controls/ooohboi-oh-animator.php
CHANGED
@@ -32,6 +32,7 @@ class OoohBoi_Oh_Animator {
|
|
32 |
|
33 |
/* should enqueue? */
|
34 |
add_action( 'elementor/frontend/container/before_render', [ __CLASS__, 'should_script_enqueue' ] );
|
|
|
35 |
/* add script */
|
36 |
add_action( 'elementor/preview/enqueue_scripts', [ __CLASS__, 'enqueue_scripts' ] );
|
37 |
|
@@ -57,7 +58,8 @@ class OoohBoi_Oh_Animator {
|
|
57 |
self::$should_script_enqueue = true;
|
58 |
self::enqueue_scripts();
|
59 |
|
60 |
-
remove_action( 'elementor/frontend/container/before_render', [ __CLASS__, 'should_script_enqueue' ] );
|
|
|
61 |
}
|
62 |
}
|
63 |
|
32 |
|
33 |
/* should enqueue? */
|
34 |
add_action( 'elementor/frontend/container/before_render', [ __CLASS__, 'should_script_enqueue' ] );
|
35 |
+
add_action( 'elementor/frontend/widget/before_render', [ __CLASS__, 'should_script_enqueue' ] );
|
36 |
/* add script */
|
37 |
add_action( 'elementor/preview/enqueue_scripts', [ __CLASS__, 'enqueue_scripts' ] );
|
38 |
|
58 |
self::$should_script_enqueue = true;
|
59 |
self::enqueue_scripts();
|
60 |
|
61 |
+
remove_action( 'elementor/frontend/container/before_render', [ __CLASS__, 'should_script_enqueue' ] );
|
62 |
+
remove_action( 'elementor/frontend/widget/before_render', [ __CLASS__, 'should_script_enqueue' ] );
|
63 |
}
|
64 |
}
|
65 |
|
controls/ooohboi-overlay-underlay.php
CHANGED
@@ -63,7 +63,7 @@ class OoohBoi_Overlay_Underlay {
|
|
63 |
self::$should_script_enqueue = true;
|
64 |
self::enqueue_scripts();
|
65 |
|
66 |
-
remove_action( 'elementor/frontend/
|
67 |
}
|
68 |
}
|
69 |
|
63 |
self::$should_script_enqueue = true;
|
64 |
self::enqueue_scripts();
|
65 |
|
66 |
+
remove_action( 'elementor/frontend/widget/before_render', [ __CLASS__, 'should_script_enqueue' ] );
|
67 |
}
|
68 |
}
|
69 |
|
controls/ooohboi-perspektive.php
CHANGED
@@ -57,7 +57,7 @@ class OoohBoi_Perspektive {
|
|
57 |
self::$should_script_enqueue = true;
|
58 |
self::enqueue_scripts();
|
59 |
|
60 |
-
remove_action( 'elementor/frontend/
|
61 |
}
|
62 |
}
|
63 |
|
57 |
self::$should_script_enqueue = true;
|
58 |
self::enqueue_scripts();
|
59 |
|
60 |
+
remove_action( 'elementor/frontend/widget/before_render', [ __CLASS__, 'should_script_enqueue' ] );
|
61 |
}
|
62 |
}
|
63 |
|
controls/ooohboi-photomorph.php
CHANGED
@@ -55,7 +55,7 @@ class OoohBoi_PhotoMorph {
|
|
55 |
self::$should_script_enqueue = true;
|
56 |
self::enqueue_scripts();
|
57 |
|
58 |
-
remove_action( 'elementor/frontend/
|
59 |
}
|
60 |
}
|
61 |
|
55 |
self::$should_script_enqueue = true;
|
56 |
self::enqueue_scripts();
|
57 |
|
58 |
+
remove_action( 'elementor/frontend/widget/before_render', [ __CLASS__, 'should_script_enqueue' ] );
|
59 |
}
|
60 |
}
|
61 |
|
controls/ooohboi-searchcop.php
CHANGED
@@ -54,7 +54,7 @@ class OoohBoi_SearchCop {
|
|
54 |
self::$should_script_enqueue = true;
|
55 |
self::enqueue_scripts();
|
56 |
|
57 |
-
remove_action( 'elementor/frontend/
|
58 |
}
|
59 |
}
|
60 |
|
54 |
self::$should_script_enqueue = true;
|
55 |
self::enqueue_scripts();
|
56 |
|
57 |
+
remove_action( 'elementor/frontend/widget/before_render', [ __CLASS__, 'should_script_enqueue' ] );
|
58 |
}
|
59 |
}
|
60 |
|
controls/ooohboi-spacerat.php
CHANGED
@@ -57,7 +57,7 @@ class OoohBoi_SpaceRat {
|
|
57 |
self::$should_script_enqueue = true;
|
58 |
self::enqueue_scripts();
|
59 |
|
60 |
-
remove_action( 'elementor/frontend/
|
61 |
}
|
62 |
}
|
63 |
|
57 |
self::$should_script_enqueue = true;
|
58 |
self::enqueue_scripts();
|
59 |
|
60 |
+
remove_action( 'elementor/frontend/widget/before_render', [ __CLASS__, 'should_script_enqueue' ] );
|
61 |
}
|
62 |
}
|
63 |
|
controls/ooohboi-widget-stalker.php
CHANGED
@@ -27,7 +27,11 @@ class OoohBoi_Widget_Stalker {
|
|
27 |
*/
|
28 |
public static function init() {
|
29 |
|
30 |
-
|
|
|
|
|
|
|
|
|
31 |
add_action( 'elementor/element/after_add_attributes', [ __CLASS__, 'ob_widget_stalker_add_attributes' ] );
|
32 |
|
33 |
/* should enqueue? */
|
@@ -57,7 +61,7 @@ class OoohBoi_Widget_Stalker {
|
|
57 |
self::$should_script_enqueue = true;
|
58 |
self::enqueue_scripts();
|
59 |
|
60 |
-
remove_action( 'elementor/frontend/
|
61 |
}
|
62 |
}
|
63 |
|
@@ -79,13 +83,25 @@ class OoohBoi_Widget_Stalker {
|
|
79 |
|
80 |
public static function ooohboi_widget_stalker_controls( Element_Base $element ) {
|
81 |
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
|
90 |
// ------------------------------------------------------------------------- CONTROL: Use Stalker
|
91 |
$element->add_control(
|
@@ -103,99 +119,103 @@ class OoohBoi_Widget_Stalker {
|
|
103 |
]
|
104 |
);
|
105 |
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
'
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
'
|
116 |
-
'
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
139 |
],
|
140 |
-
|
141 |
-
'
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
],
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
],
|
178 |
-
|
179 |
-
'
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
],
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
],
|
197 |
-
]
|
198 |
-
);
|
199 |
// --------------------------------------------------------------------------------------------- CONTROL max width
|
200 |
$element->add_responsive_control(
|
201 |
'_ob_ws_max_width',
|
@@ -213,51 +233,71 @@ class OoohBoi_Widget_Stalker {
|
|
213 |
],
|
214 |
]
|
215 |
);
|
216 |
-
|
217 |
-
$element->add_responsive_control(
|
218 |
-
'_ob_ws_align_self',
|
219 |
-
[
|
220 |
-
'label' => __( 'Align self', 'ooohboi-steroids' ),
|
221 |
-
'description' => __( 'Align this widget vertically', 'ooohboi-steroids' ),
|
222 |
-
'type' => Controls_Manager::SELECT,
|
223 |
-
'default' => 'auto',
|
224 |
-
'options' => [
|
225 |
-
'auto' => __( 'Auto', 'ooohboi-steroids' ),
|
226 |
-
'baseline' => __( 'Baseline', 'ooohboi-steroids' ),
|
227 |
-
'center' => __( 'Center', 'ooohboi-steroids' ),
|
228 |
-
'end' => __( 'End', 'ooohboi-steroids' ),
|
229 |
-
],
|
230 |
-
'selectors' => [
|
231 |
-
'{{WRAPPER}}.elementor-widget.ob-got-stalker' => 'align-self: {{VALUE}};',
|
232 |
-
],
|
233 |
-
'condition' => [
|
234 |
-
'_ob_widget_stalker_use' => 'yes',
|
235 |
-
],
|
236 |
-
]
|
237 |
-
);
|
238 |
-
// --------------------------------------------------------------------------------------------- 1.6.3 CONTROL Widget order
|
239 |
$element->add_responsive_control(
|
240 |
-
|
241 |
-
|
242 |
-
'label' => __( '
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
href="https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Ordering_Flex_Items#The_order_property" target="_blank">',
|
247 |
-
'</a>'
|
248 |
-
),
|
249 |
-
'type' => Controls_Manager::NUMBER,
|
250 |
-
'style_transfer' => true,
|
251 |
'selectors' => [
|
252 |
-
'{{WRAPPER}}.elementor-widget.ob-got-stalker' => '
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
]
|
258 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
259 |
|
260 |
-
$element->end_controls_section(); // END SECTION / PANEL
|
261 |
|
262 |
}
|
263 |
|
27 |
*/
|
28 |
public static function init() {
|
29 |
|
30 |
+
if( 'active' !== get_option( 'elementor_experiment-container' ) ) {
|
31 |
+
add_action( 'elementor/element/common/_section_background/after_section_end', [ __CLASS__, 'ooohboi_widget_stalker_controls' ] );
|
32 |
+
} else {
|
33 |
+
add_action( 'elementor/element/common/_section_style/before_section_end', [ __CLASS__, 'ooohboi_widget_stalker_controls' ] );
|
34 |
+
}
|
35 |
add_action( 'elementor/element/after_add_attributes', [ __CLASS__, 'ob_widget_stalker_add_attributes' ] );
|
36 |
|
37 |
/* should enqueue? */
|
61 |
self::$should_script_enqueue = true;
|
62 |
self::enqueue_scripts();
|
63 |
|
64 |
+
remove_action( 'elementor/frontend/widget/before_render', [ __CLASS__, 'should_script_enqueue' ] );
|
65 |
}
|
66 |
}
|
67 |
|
83 |
|
84 |
public static function ooohboi_widget_stalker_controls( Element_Base $element ) {
|
85 |
|
86 |
+
if( 'active' !== get_option( 'elementor_experiment-container' ) ) {
|
87 |
+
$element->start_controls_section(
|
88 |
+
'_ob_widget_stalker',
|
89 |
+
[
|
90 |
+
'label' => 'W I D G E T - S T A L K E R',
|
91 |
+
'tab' => Controls_Manager::TAB_ADVANCED,
|
92 |
+
]
|
93 |
+
);
|
94 |
+
} else {
|
95 |
+
// create panel section
|
96 |
+
$element->add_control(
|
97 |
+
'_ob_perspektive',
|
98 |
+
[
|
99 |
+
'label' => 'W I D G E T - S T A L K E R',
|
100 |
+
'type' => Controls_Manager::HEADING,
|
101 |
+
'separator' => 'before',
|
102 |
+
]
|
103 |
+
);
|
104 |
+
}
|
105 |
|
106 |
// ------------------------------------------------------------------------- CONTROL: Use Stalker
|
107 |
$element->add_control(
|
119 |
]
|
120 |
);
|
121 |
|
122 |
+
if( 'active' !== get_option( 'elementor_experiment-container' ) ) {
|
123 |
+
|
124 |
+
// ------------------------------------------------------------------------- CONTROL: Size Method
|
125 |
+
$element->add_responsive_control(
|
126 |
+
'_ob_ws_width_method',
|
127 |
+
[
|
128 |
+
'label' => __( 'Size Method', 'ooohboi-steroids' ),
|
129 |
+
'description' => __( 'Use Flex or Units?', 'ooohboi-steroids' ),
|
130 |
+
'type' => Controls_Manager::SELECT,
|
131 |
+
'default' => 'flex',
|
132 |
+
'options' => [
|
133 |
+
'flex' => __( 'Flex', 'ooohboi-steroids' ),
|
134 |
+
'units' => __( 'Units', 'ooohboi-steroids' ),
|
135 |
+
],
|
136 |
+
'condition' => [
|
137 |
+
'_ob_widget_stalker_use' => 'yes',
|
138 |
+
],
|
139 |
+
]
|
140 |
+
);
|
141 |
+
// --------------------------------------------------------------------------------------------- CONTROL Flex size
|
142 |
+
$element->add_responsive_control(
|
143 |
+
'_ob_ws_flex',
|
144 |
+
[
|
145 |
+
'label' => __( 'Flex', 'ooohboi-steroids' ),
|
146 |
+
'type' => Controls_Manager::NUMBER,
|
147 |
+
'separator' => 'before',
|
148 |
+
'default' => 'unset',
|
149 |
+
'min' => 1,
|
150 |
+
'selectors' => [
|
151 |
+
'{{WRAPPER}}.elementor-widget.ob-got-stalker' => 'flex: {{VALUE}}; width: unset; min-width: 1px;',
|
152 |
+
],
|
153 |
+
'device_args' => [
|
154 |
+
Controls_Stack::RESPONSIVE_TABLET => [
|
155 |
+
'selectors' => [
|
156 |
+
'{{WRAPPER}}.elementor-widget.ob-got-stalker' => 'flex: {{VALUE}}; width: unset; min-width: 1px;',
|
157 |
+
],
|
158 |
+
'condition' => [
|
159 |
+
'_ob_widget_stalker_use' => 'yes',
|
160 |
+
'_ob_ws_width_method_tablet' => 'flex',
|
161 |
+
],
|
162 |
],
|
163 |
+
Controls_Stack::RESPONSIVE_MOBILE => [
|
164 |
+
'selectors' => [
|
165 |
+
'{{WRAPPER}}.elementor-widget.ob-got-stalker' => 'flex: {{VALUE}}; width: unset; min-width: 1px;',
|
166 |
+
],
|
167 |
+
'condition' => [
|
168 |
+
'_ob_widget_stalker_use' => 'yes',
|
169 |
+
'_ob_ws_width_method_mobile' => 'flex',
|
170 |
+
],
|
171 |
],
|
172 |
+
],
|
173 |
+
'condition' => [
|
174 |
+
'_ob_widget_stalker_use' => 'yes',
|
175 |
+
'_ob_ws_width_method' => 'flex',
|
176 |
+
],
|
177 |
+
]
|
178 |
+
);
|
179 |
+
// --------------------------------------------------------------------------------------------- CONTROL width
|
180 |
+
$element->add_responsive_control(
|
181 |
+
'_ob_ws_width',
|
182 |
+
[
|
183 |
+
'label' => __( 'Widget width', 'ooohboi-steroids' ),
|
184 |
+
'type' => Controls_Manager::TEXT,
|
185 |
+
'separator' => 'before',
|
186 |
+
'label_block' => true,
|
187 |
+
'description' => __( 'You can enter any acceptable CSS value, for example: 50em, 300px, 100%, calc(100% - 300px).', 'ooohboi-steroids' ),
|
188 |
+
'selectors' => [
|
189 |
+
'{{WRAPPER}}.elementor-widget.ob-got-stalker' => 'width: {{VALUE}}; flex: unset;',
|
190 |
+
],
|
191 |
+
'device_args' => [
|
192 |
+
Controls_Stack::RESPONSIVE_TABLET => [
|
193 |
+
'selectors' => [
|
194 |
+
'{{WRAPPER}}.elementor-widget.ob-got-stalker' => 'width: {{VALUE}}; flex: unset;',
|
195 |
+
],
|
196 |
+
'condition' => [
|
197 |
+
'_ob_widget_stalker_use' => 'yes',
|
198 |
+
'_ob_ws_width_method_tablet' => 'units',
|
199 |
+
],
|
200 |
],
|
201 |
+
Controls_Stack::RESPONSIVE_MOBILE => [
|
202 |
+
'selectors' => [
|
203 |
+
'{{WRAPPER}}.elementor-widget.ob-got-stalker' => 'width: {{VALUE}}; flex: unset;',
|
204 |
+
],
|
205 |
+
'condition' => [
|
206 |
+
'_ob_widget_stalker_use' => 'yes',
|
207 |
+
'_ob_ws_width_method_mobile' => 'units',
|
208 |
+
],
|
209 |
],
|
210 |
+
],
|
211 |
+
'condition' => [
|
212 |
+
'_ob_widget_stalker_use' => 'yes',
|
213 |
+
'_ob_ws_width_method' => 'units',
|
214 |
+
],
|
215 |
+
]
|
216 |
+
);
|
217 |
+
|
218 |
+
}
|
|
|
|
|
|
|
219 |
// --------------------------------------------------------------------------------------------- CONTROL max width
|
220 |
$element->add_responsive_control(
|
221 |
'_ob_ws_max_width',
|
233 |
],
|
234 |
]
|
235 |
);
|
236 |
+
// --------------------------------------------------------------------------------------------- CONTROL Margin ------ 1.9.6
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
237 |
$element->add_responsive_control(
|
238 |
+
'_ob_ws_margin',
|
239 |
+
[
|
240 |
+
'label' => __( 'Margin', 'ooohboi-steroids' ),
|
241 |
+
'description' => __( 'Unlike Elementor\'s default margin, this is the true margin!', 'ooohboi-steroids' ),
|
242 |
+
'type' => Controls_Manager::DIMENSIONS,
|
243 |
+
'size_units' => [ 'px', 'em', '%', 'vw','vh' ],
|
|
|
|
|
|
|
|
|
|
|
244 |
'selectors' => [
|
245 |
+
'{{WRAPPER}}.elementor-widget.ob-got-stalker' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
|
246 |
+
],
|
247 |
+
'condition' => [
|
248 |
+
'_ob_widget_stalker_use' => 'yes',
|
249 |
+
],
|
250 |
]
|
251 |
);
|
252 |
+
if( 'active' !== get_option( 'elementor_experiment-container' ) ) {
|
253 |
+
|
254 |
+
// ------------------------------------------------------------------------- CONTROL: align self
|
255 |
+
$element->add_responsive_control(
|
256 |
+
'_ob_ws_align_self',
|
257 |
+
[
|
258 |
+
'label' => __( 'Align self', 'ooohboi-steroids' ),
|
259 |
+
'description' => __( 'Align this widget vertically', 'ooohboi-steroids' ),
|
260 |
+
'type' => Controls_Manager::SELECT,
|
261 |
+
'default' => 'auto',
|
262 |
+
'options' => [
|
263 |
+
'auto' => __( 'Auto', 'ooohboi-steroids' ),
|
264 |
+
'baseline' => __( 'Baseline', 'ooohboi-steroids' ),
|
265 |
+
'center' => __( 'Center', 'ooohboi-steroids' ),
|
266 |
+
'end' => __( 'End', 'ooohboi-steroids' ),
|
267 |
+
],
|
268 |
+
'selectors' => [
|
269 |
+
'{{WRAPPER}}.elementor-widget.ob-got-stalker' => 'align-self: {{VALUE}};',
|
270 |
+
],
|
271 |
+
'condition' => [
|
272 |
+
'_ob_widget_stalker_use' => 'yes',
|
273 |
+
],
|
274 |
+
]
|
275 |
+
);
|
276 |
+
// --------------------------------------------------------------------------------------------- 1.6.3 CONTROL Widget order
|
277 |
+
$element->add_responsive_control(
|
278 |
+
'_ob_ws_widget_order',
|
279 |
+
[
|
280 |
+
'label' => __( 'Widget Order', 'ooohboi-steroids' ),
|
281 |
+
'description' => sprintf(
|
282 |
+
__( 'More info at %sMozilla%s.', 'ooohboi-steroids' ),
|
283 |
+
'<a
|
284 |
+
href="https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Ordering_Flex_Items#The_order_property" target="_blank">',
|
285 |
+
'</a>'
|
286 |
+
),
|
287 |
+
'type' => Controls_Manager::NUMBER,
|
288 |
+
'style_transfer' => true,
|
289 |
+
'selectors' => [
|
290 |
+
'{{WRAPPER}}.elementor-widget.ob-got-stalker' => '-webkit-box-ordinal-group: calc({{VALUE}} + 1 ); -ms-flex-order:{{VALUE}}; order: {{VALUE}};',
|
291 |
+
],
|
292 |
+
'condition' => [
|
293 |
+
'_ob_widget_stalker_use' => 'yes',
|
294 |
+
],
|
295 |
+
]
|
296 |
+
);
|
297 |
+
|
298 |
+
}
|
299 |
|
300 |
+
if( 'active' !== get_option( 'elementor_experiment-container' ) ) $element->end_controls_section(); // END SECTION / PANEL
|
301 |
|
302 |
}
|
303 |
|
inc/common-functions.php
CHANGED
@@ -229,7 +229,16 @@ $fields[] = array(
|
|
229 |
'type' => 'switcher',
|
230 |
'description' => sprintf( __( '%sJust a few extra Container settings which can make your life easier (for Elementor 3.6 and above)%s', 'ooohboi-steroids' ), '<span class="ob-option-desc">', '</span>' ),
|
231 |
'default' => 'yes',
|
232 |
-
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
233 |
),
|
234 |
);
|
235 |
|
229 |
'type' => 'switcher',
|
230 |
'description' => sprintf( __( '%sJust a few extra Container settings which can make your life easier (for Elementor 3.6 and above)%s', 'ooohboi-steroids' ), '<span class="ob-option-desc">', '</span>' ),
|
231 |
'default' => 'yes',
|
232 |
+
),
|
233 |
+
/*
|
234 |
+
array(
|
235 |
+
'id' => 'ob_use_interactor',
|
236 |
+
'title' => 'INTERACTOR',
|
237 |
+
'type' => 'switcher',
|
238 |
+
'description' => sprintf( __( '%sCreate interactions between the elements on page (for Elementor 3.6 and above)%s', 'ooohboi-steroids' ), '<span class="ob-option-desc">', '</span>' ),
|
239 |
+
'default' => 'yes',
|
240 |
+
),
|
241 |
+
*/
|
242 |
),
|
243 |
);
|
244 |
|
inc/info/ob-landing.php
CHANGED
@@ -10,7 +10,27 @@
|
|
10 |
|
11 |
<div class="col-8">
|
12 |
|
13 |
-
<h3>What's new in v1.9.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
<p>
|
15 |
<strong>OH! ANIMATOR - Scroll triggered animations (beta)</strong>
|
16 |
</p>
|
10 |
|
11 |
<div class="col-8">
|
12 |
|
13 |
+
<h3>What's new in v1.9.6?</h3>
|
14 |
+
<p>
|
15 |
+
<strong>Fixes and improvements</strong>
|
16 |
+
</p>
|
17 |
+
<p>
|
18 |
+
Some new options added to the Container Extras! From now on you can calc() Container's Min Height or make the Container hyperlink.
|
19 |
+
</p>
|
20 |
+
<p>
|
21 |
+
Overlaiz extension is back to Containers! It's been off initially but many users wanted it back so there you have it :)
|
22 |
+
</p>
|
23 |
+
<p>
|
24 |
+
Widget Stalker extension has been merged with Elementor's Layout panel which means it no longer exist as a separate panel for Elementor 3.6 and above.
|
25 |
+
</p>
|
26 |
+
<p>
|
27 |
+
Oh Animator big bug has been fixed (animations didn't perform on the front-end)
|
28 |
+
</p>
|
29 |
+
<p>
|
30 |
+
GSAP & ScrollTrigger libsare now up to date.
|
31 |
+
</p>
|
32 |
+
|
33 |
+
<h3>Since v1.9.5?</h3>
|
34 |
<p>
|
35 |
<strong>OH! ANIMATOR - Scroll triggered animations (beta)</strong>
|
36 |
</p>
|
ooohboi-steroids.php
CHANGED
@@ -2,14 +2,14 @@
|
|
2 |
/**
|
3 |
* Plugin Name: OoohBoi Steroids for Elementor
|
4 |
* Description: An awesome set of tools, options and settings that expand Elementor defaults. Instead of creating new Elementor Widgets, these act like an upgrade of existing options or the self-standing panels.
|
5 |
-
* Version: 1.9.
|
6 |
* Author: OoohBoi
|
7 |
* Author URI: https://www.youtube.com/c/OoohBoi
|
8 |
* Text Domain: ooohboi-steroids
|
9 |
* Domain Path: /lang
|
10 |
* License: GPLv3
|
11 |
* Elementor tested up to: 3.7.9
|
12 |
-
* Elementor Pro tested up to: 3.7.
|
13 |
* License URI: http://www.gnu.org/licenses/gpl-3.0
|
14 |
*/
|
15 |
|
@@ -33,7 +33,7 @@ final class OoohBoi_Steroids {
|
|
33 |
*
|
34 |
* @var string The plugin version.
|
35 |
*/
|
36 |
-
const VERSION = '1.9.
|
37 |
|
38 |
/**
|
39 |
* Minimum Elementor Version
|
@@ -42,7 +42,7 @@ final class OoohBoi_Steroids {
|
|
42 |
*
|
43 |
* @var string Minimum Elementor version required to run the plugin.
|
44 |
*/
|
45 |
-
const MINIMUM_ELEMENTOR_VERSION = '3.
|
46 |
|
47 |
/**
|
48 |
* Elementor Version for Containers
|
@@ -365,11 +365,11 @@ final class OoohBoi_Steroids {
|
|
365 |
'OoohBoi_Glider' => 'ob_use_glider', 'OoohBoi_PhotoGiraffe' => 'ob_use_photogiraffe', 'OoohBoi_Teleporter' => 'ob_use_teleporter', 'OoohBoi_SearchCop' => 'ob_use_searchcop', 'OoohBoi_Videomasq' => 'ob_use_videomasq',
|
366 |
'OoohBoi_Butter_Button' => 'ob_use_butterbutton', 'OoohBoi_Perspektive' => 'ob_use_perspektive', 'OoohBoi_Shadough' => 'ob_use_shadough', 'OoohBoi_PhotoMorph' => 'ob_use_photomorph', 'OoohBoi_Commentz' => 'ob_use_commentz',
|
367 |
'OoohBoi_SpaceRat' => 'ob_use_spacerat', 'OoohBoi_Imbox' => 'ob_use_imbox', 'OoohBoi_Icobox' => 'ob_use_icobox', 'OoohBoi_Hover_Animator' => 'ob_use_hoveranimator', 'OoohBoi_Kontrolz' => 'ob_use_kontrolz',
|
368 |
-
|
369 |
|
370 |
/* since 1.9.1 & Elementor 3.6+ */
|
371 |
$exclude_with_containers = [];
|
372 |
-
if( $container_active ) $exclude_with_containers = [ '
|
373 |
|
374 |
if( ! $ob_settings_options ) {
|
375 |
foreach( $extensions_array as $extension_class => $extension_token ) {
|
@@ -409,9 +409,9 @@ final class OoohBoi_Steroids {
|
|
409 |
$mq = 'all';
|
410 |
if( 'auto' === $theme ) $mq = '(prefers-color-scheme: dark)';
|
411 |
|
412 |
-
wp_enqueue_style( 'ooohboi-steroids-styles-editor-dark', self::ooohboi_dark_stylesheet_url(), [ 'elementor-editor' ], self::VERSION . '
|
413 |
|
414 |
-
} else wp_enqueue_style( 'ooohboi-steroids-styles-dark', self::ooohboi_light_stylesheet_url(), [ 'elementor-editor' ], self::VERSION . '
|
415 |
|
416 |
}
|
417 |
public static function ooohboi_dark_stylesheet_url() {
|
@@ -467,19 +467,19 @@ final class OoohBoi_Steroids {
|
|
467 |
}
|
468 |
// gsap
|
469 |
if( 1 === self::$sfe_lib_gsap ) {
|
470 |
-
wp_register_script( 'gsap-js', '//cdnjs.cloudflare.com/ajax/libs/gsap/3.
|
471 |
}
|
472 |
// scroll trigger
|
473 |
if( 1 === self::$sfe_lib_scroll_trigger ) {
|
474 |
-
wp_register_script( 'scroll-trigger-js', '//cdnjs.cloudflare.com/ajax/libs/gsap/3.
|
475 |
}
|
476 |
// scroll to
|
477 |
if( 1 === self::$sfe_lib_scroll_to ) {
|
478 |
-
wp_register_script( 'scroll-to-js', '//cdnjs.cloudflare.com/ajax/libs/gsap/3.
|
479 |
}
|
480 |
// scroll motion path
|
481 |
if( 1 === self::$sfe_lib_motion_path ) {
|
482 |
-
wp_register_script( 'motion-path-js', '//cdnjs.cloudflare.com/ajax/libs/gsap/3.
|
483 |
}
|
484 |
// barba
|
485 |
if( 1 === self::$sfe_lib_barba && ! $ele_is_preview ) {
|
@@ -511,16 +511,16 @@ final class OoohBoi_Steroids {
|
|
511 |
include_once plugin_dir_path( __FILE__ ) . 'controls/ooohboi-harakiri.php'; // OoohBoi Harakiri
|
512 |
include_once plugin_dir_path( __FILE__ ) . 'controls/ooohboi-paginini.php'; // OoohBoi Paginini
|
513 |
include_once plugin_dir_path( __FILE__ ) . 'controls/ooohboi-glider.php'; // OoohBoi Glider Slider
|
|
|
514 |
if( 'active' !== get_option( 'elementor_experiment-container' ) ) {
|
515 |
-
include_once plugin_dir_path( __FILE__ ) . 'controls/ooohboi-overlaiz.php'; // OoohBoi Overlaiz
|
516 |
include_once plugin_dir_path( __FILE__ ) . 'controls/ooohboi-breaking-bad.php'; // OoohBoi Breaking Bad
|
517 |
include_once plugin_dir_path( __FILE__ ) . 'controls/ooohboi-photogiraffe.php'; // OoohBoi PhotoGiraffe
|
518 |
include_once plugin_dir_path( __FILE__ ) . 'controls/ooohboi-teleporter.php'; // OoohBoi Teleporter
|
|
|
519 |
}
|
520 |
include_once plugin_dir_path( __FILE__ ) . 'controls/ooohboi-searchcop.php'; // OoohBoi Search Cop
|
521 |
include_once plugin_dir_path( __FILE__ ) . 'controls/ooohboi-videomasq.php'; // OoohBoi Video Masq
|
522 |
include_once plugin_dir_path( __FILE__ ) . 'controls/ooohboi-butter-button.php'; // OoohBoi Butter Button
|
523 |
-
include_once plugin_dir_path( __FILE__ ) . 'controls/ooohboi-perspektive.php'; // OoohBoi Perspektive
|
524 |
include_once plugin_dir_path( __FILE__ ) . 'controls/ooohboi-shadough.php'; // OoohBoi Shadough
|
525 |
include_once plugin_dir_path( __FILE__ ) . 'controls/ooohboi-photomorph.php'; // OoohBoi PhotoMorph
|
526 |
include_once plugin_dir_path( __FILE__ ) . 'controls/ooohboi-commentz.php'; // OoohBoi Commentz
|
@@ -533,8 +533,9 @@ final class OoohBoi_Steroids {
|
|
533 |
include_once plugin_dir_path( __FILE__ ) . 'controls/ooohboi-pseudo.php'; // OoohBoi Pseudo
|
534 |
include_once plugin_dir_path( __FILE__ ) . 'controls/ooohboi-bullet.php'; // OoohBoi Bullet
|
535 |
// OoohBoi Container Extras ONLY IF ELEMENTOR >= ELEMENTOR_VERSION_CONTAINER
|
536 |
-
include_once plugin_dir_path( __FILE__ ) . 'controls/ooohboi-container-extras.php';
|
537 |
-
include_once plugin_dir_path( __FILE__ ) . 'controls/ooohboi-oh-animator.php';
|
|
|
538 |
// ----------
|
539 |
include_once plugin_dir_path( __FILE__ ) . 'controls/ooohboi-locomotion.php'; // OoohBoi Locomotion
|
540 |
}
|
2 |
/**
|
3 |
* Plugin Name: OoohBoi Steroids for Elementor
|
4 |
* Description: An awesome set of tools, options and settings that expand Elementor defaults. Instead of creating new Elementor Widgets, these act like an upgrade of existing options or the self-standing panels.
|
5 |
+
* Version: 1.9.6
|
6 |
* Author: OoohBoi
|
7 |
* Author URI: https://www.youtube.com/c/OoohBoi
|
8 |
* Text Domain: ooohboi-steroids
|
9 |
* Domain Path: /lang
|
10 |
* License: GPLv3
|
11 |
* Elementor tested up to: 3.7.9
|
12 |
+
* Elementor Pro tested up to: 3.7.9
|
13 |
* License URI: http://www.gnu.org/licenses/gpl-3.0
|
14 |
*/
|
15 |
|
33 |
*
|
34 |
* @var string The plugin version.
|
35 |
*/
|
36 |
+
const VERSION = '1.9.6';
|
37 |
|
38 |
/**
|
39 |
* Minimum Elementor Version
|
42 |
*
|
43 |
* @var string Minimum Elementor version required to run the plugin.
|
44 |
*/
|
45 |
+
const MINIMUM_ELEMENTOR_VERSION = '3.4';
|
46 |
|
47 |
/**
|
48 |
* Elementor Version for Containers
|
365 |
'OoohBoi_Glider' => 'ob_use_glider', 'OoohBoi_PhotoGiraffe' => 'ob_use_photogiraffe', 'OoohBoi_Teleporter' => 'ob_use_teleporter', 'OoohBoi_SearchCop' => 'ob_use_searchcop', 'OoohBoi_Videomasq' => 'ob_use_videomasq',
|
366 |
'OoohBoi_Butter_Button' => 'ob_use_butterbutton', 'OoohBoi_Perspektive' => 'ob_use_perspektive', 'OoohBoi_Shadough' => 'ob_use_shadough', 'OoohBoi_PhotoMorph' => 'ob_use_photomorph', 'OoohBoi_Commentz' => 'ob_use_commentz',
|
367 |
'OoohBoi_SpaceRat' => 'ob_use_spacerat', 'OoohBoi_Imbox' => 'ob_use_imbox', 'OoohBoi_Icobox' => 'ob_use_icobox', 'OoohBoi_Hover_Animator' => 'ob_use_hoveranimator', 'OoohBoi_Kontrolz' => 'ob_use_kontrolz',
|
368 |
+
'OoohBoi_Widget_Stalker' => 'ob_use_widgetstalker', 'OoohBoi_Pseudo' => 'ob_use_pseudo', 'OoohBoi_Bullet' => 'ob_use_bullet', 'OoohBoi_Container_Extras' => 'ob_use_container_extras', /*'OoohBoi_Interactor' => 'ob_use_interactor'*/ ];
|
369 |
|
370 |
/* since 1.9.1 & Elementor 3.6+ */
|
371 |
$exclude_with_containers = [];
|
372 |
+
if( $container_active ) $exclude_with_containers = [ 'OoohBoi_Breaking_Bad', 'OoohBoi_PhotoGiraffe', 'OoohBoi_Teleporter', 'OoohBoi_Perspektive' ];
|
373 |
|
374 |
if( ! $ob_settings_options ) {
|
375 |
foreach( $extensions_array as $extension_class => $extension_token ) {
|
409 |
$mq = 'all';
|
410 |
if( 'auto' === $theme ) $mq = '(prefers-color-scheme: dark)';
|
411 |
|
412 |
+
wp_enqueue_style( 'ooohboi-steroids-styles-editor-dark', self::ooohboi_dark_stylesheet_url(), [ 'elementor-editor' ], self::VERSION . '17052022', $mq );
|
413 |
|
414 |
+
} else wp_enqueue_style( 'ooohboi-steroids-styles-dark', self::ooohboi_light_stylesheet_url(), [ 'elementor-editor' ], self::VERSION . '17052022' );
|
415 |
|
416 |
}
|
417 |
public static function ooohboi_dark_stylesheet_url() {
|
467 |
}
|
468 |
// gsap
|
469 |
if( 1 === self::$sfe_lib_gsap ) {
|
470 |
+
wp_register_script( 'gsap-js', '//cdnjs.cloudflare.com/ajax/libs/gsap/3.10.4/gsap.min.js', [], self::VERSION, true );
|
471 |
}
|
472 |
// scroll trigger
|
473 |
if( 1 === self::$sfe_lib_scroll_trigger ) {
|
474 |
+
wp_register_script( 'scroll-trigger-js', '//cdnjs.cloudflare.com/ajax/libs/gsap/3.10.4/ScrollTrigger.min.js', [], self::VERSION, true );
|
475 |
}
|
476 |
// scroll to
|
477 |
if( 1 === self::$sfe_lib_scroll_to ) {
|
478 |
+
wp_register_script( 'scroll-to-js', '//cdnjs.cloudflare.com/ajax/libs/gsap/3.10.4/ScrollToPlugin.min.js', [], self::VERSION, true );
|
479 |
}
|
480 |
// scroll motion path
|
481 |
if( 1 === self::$sfe_lib_motion_path ) {
|
482 |
+
wp_register_script( 'motion-path-js', '//cdnjs.cloudflare.com/ajax/libs/gsap/3.10.4/MotionPathPlugin.min.js', [], self::VERSION, true );
|
483 |
}
|
484 |
// barba
|
485 |
if( 1 === self::$sfe_lib_barba && ! $ele_is_preview ) {
|
511 |
include_once plugin_dir_path( __FILE__ ) . 'controls/ooohboi-harakiri.php'; // OoohBoi Harakiri
|
512 |
include_once plugin_dir_path( __FILE__ ) . 'controls/ooohboi-paginini.php'; // OoohBoi Paginini
|
513 |
include_once plugin_dir_path( __FILE__ ) . 'controls/ooohboi-glider.php'; // OoohBoi Glider Slider
|
514 |
+
include_once plugin_dir_path( __FILE__ ) . 'controls/ooohboi-overlaiz.php'; // OoohBoi Overlaiz
|
515 |
if( 'active' !== get_option( 'elementor_experiment-container' ) ) {
|
|
|
516 |
include_once plugin_dir_path( __FILE__ ) . 'controls/ooohboi-breaking-bad.php'; // OoohBoi Breaking Bad
|
517 |
include_once plugin_dir_path( __FILE__ ) . 'controls/ooohboi-photogiraffe.php'; // OoohBoi PhotoGiraffe
|
518 |
include_once plugin_dir_path( __FILE__ ) . 'controls/ooohboi-teleporter.php'; // OoohBoi Teleporter
|
519 |
+
include_once plugin_dir_path( __FILE__ ) . 'controls/ooohboi-perspektive.php'; // OoohBoi Perspektive
|
520 |
}
|
521 |
include_once plugin_dir_path( __FILE__ ) . 'controls/ooohboi-searchcop.php'; // OoohBoi Search Cop
|
522 |
include_once plugin_dir_path( __FILE__ ) . 'controls/ooohboi-videomasq.php'; // OoohBoi Video Masq
|
523 |
include_once plugin_dir_path( __FILE__ ) . 'controls/ooohboi-butter-button.php'; // OoohBoi Butter Button
|
|
|
524 |
include_once plugin_dir_path( __FILE__ ) . 'controls/ooohboi-shadough.php'; // OoohBoi Shadough
|
525 |
include_once plugin_dir_path( __FILE__ ) . 'controls/ooohboi-photomorph.php'; // OoohBoi PhotoMorph
|
526 |
include_once plugin_dir_path( __FILE__ ) . 'controls/ooohboi-commentz.php'; // OoohBoi Commentz
|
533 |
include_once plugin_dir_path( __FILE__ ) . 'controls/ooohboi-pseudo.php'; // OoohBoi Pseudo
|
534 |
include_once plugin_dir_path( __FILE__ ) . 'controls/ooohboi-bullet.php'; // OoohBoi Bullet
|
535 |
// OoohBoi Container Extras ONLY IF ELEMENTOR >= ELEMENTOR_VERSION_CONTAINER
|
536 |
+
include_once plugin_dir_path( __FILE__ ) . 'controls/ooohboi-container-extras.php'; // OoohBoi Container Extras
|
537 |
+
include_once plugin_dir_path( __FILE__ ) . 'controls/ooohboi-oh-animator.php'; // OoohBoi Animator
|
538 |
+
/*include_once plugin_dir_path( __FILE__ ) . 'controls/ooohboi-interactor.php';*/ // OoohBoi Interactor
|
539 |
// ----------
|
540 |
include_once plugin_dir_path( __FILE__ ) . 'controls/ooohboi-locomotion.php'; // OoohBoi Locomotion
|
541 |
}
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: OoohBoi
|
|
3 |
Tags: page-builder, elementor, add-on, background-overlay, vertical text, ghost elements, overlapping columns
|
4 |
Donate link: https://www.paypal.me/ooohboi
|
5 |
Requires at least: 5.0
|
6 |
-
Tested up to: 5
|
7 |
-
Stable tag: 1.9.
|
8 |
Requires PHP: 7.0
|
9 |
License: GPLv3
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0
|
@@ -156,6 +156,16 @@ No, you don't. It'll work with both free version of Elementor and Elementor PRO.
|
|
156 |
|
157 |
== Changelog ==
|
158 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
159 |
= 1.9.5 =
|
160 |
- New extension: OH! ANIMATOR (available only if the GSAP and ScrollTrigger libraries enabled)
|
161 |
- New extension: CONTAINER EXTRAS
|
3 |
Tags: page-builder, elementor, add-on, background-overlay, vertical text, ghost elements, overlapping columns
|
4 |
Donate link: https://www.paypal.me/ooohboi
|
5 |
Requires at least: 5.0
|
6 |
+
Tested up to: 6.5
|
7 |
+
Stable tag: 1.9.6
|
8 |
Requires PHP: 7.0
|
9 |
License: GPLv3
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0
|
156 |
|
157 |
== Changelog ==
|
158 |
|
159 |
+
= 1.9.6. =
|
160 |
+
- Fix: IMBOX - Added option to align content vertically when "Prevent Image and Title Collaps" enabled
|
161 |
+
- Fix: OH ANIMATOR - Front-end animation bug
|
162 |
+
- New: CONTAINER EXTRAS - added options to calc() min-height and set the Container link
|
163 |
+
- New: WIDGET STALKER - panel options moved to the Advanced > Layout for Elementor 3.6+
|
164 |
+
- New: WIDGET STALKER - added the real Margin option (Elementor sets the widget margin as if dealing with padding)
|
165 |
+
- New: OVERLAIZ - Now working with the Flex Container too
|
166 |
+
- external libraries update: GSAP, ScrollTrigger, ScrollToPlugin, MotionPathPlugin - 3.10.4
|
167 |
+
- Note: PERSPEKTIVE extension removed for Elementor 3.6+ (R.I.P)
|
168 |
+
|
169 |
= 1.9.5 =
|
170 |
- New extension: OH! ANIMATOR (available only if the GSAP and ScrollTrigger libraries enabled)
|
171 |
- New extension: CONTAINER EXTRAS
|