Version Description
- New Widget - The Message Box widget
Download this release
Release Info
Developer | livemesh |
Plugin | Addons for Elementor |
Version | 6.16 |
Comparing to | |
See all releases |
Code changes from version 6.15 to 6.16
- addons-for-elementor.php +2 -2
- admin/views/settings.php +21 -0
- assets/css/widgets/message-box.css +40 -0
- assets/css/widgets/message-box.css.map +1 -0
- assets/css/widgets/message-box.scss +48 -0
- assets/js/widgets/message-box.js +40 -0
- assets/js/widgets/message-box.min.js +1 -0
- includes/widgets/message-box.php +351 -0
- plugin.php +23 -2
- readme.txt +4 -1
- templates/addons/message-box/content.php +48 -0
addons-for-elementor.php
CHANGED
@@ -8,7 +8,7 @@
|
|
8 |
* Author URI: https://livemeshelementor.com
|
9 |
* License: GPL3
|
10 |
* License URI: https://www.gnu.org/licenses/gpl-3.0.txt
|
11 |
-
* Version: 6.
|
12 |
* Text Domain: livemesh-el-addons
|
13 |
* Domain Path: languages
|
14 |
* Elementor tested up to: 3.5.0
|
@@ -37,7 +37,7 @@ if ( !defined( 'ABSPATH' ) ) {
|
|
37 |
|
38 |
if ( !function_exists( 'lae_fs' ) ) {
|
39 |
// Plugin version
|
40 |
-
define( 'LAE_VERSION', '6.
|
41 |
// Plugin Root File
|
42 |
define( 'LAE_PLUGIN_FILE', __FILE__ );
|
43 |
// Plugin Folder Path
|
8 |
* Author URI: https://livemeshelementor.com
|
9 |
* License: GPL3
|
10 |
* License URI: https://www.gnu.org/licenses/gpl-3.0.txt
|
11 |
+
* Version: 6.16
|
12 |
* Text Domain: livemesh-el-addons
|
13 |
* Domain Path: languages
|
14 |
* Elementor tested up to: 3.5.0
|
37 |
|
38 |
if ( !function_exists( 'lae_fs' ) ) {
|
39 |
// Plugin version
|
40 |
+
define( 'LAE_VERSION', '6.16' );
|
41 |
// Plugin Root File
|
42 |
define( 'LAE_PLUGIN_FILE', __FILE__ );
|
43 |
// Plugin Folder Path
|
admin/views/settings.php
CHANGED
@@ -21,6 +21,7 @@ $deactivate_element_posts_multislider = lae_get_option( 'lae_deactivate_element_
|
|
21 |
$deactivate_element_posts_gridbox_slider = lae_get_option( 'lae_deactivate_element_posts_gridbox_slider', false );
|
22 |
$deactivate_element_pricing_table = lae_get_option( 'lae_deactivate_element_pricing_table', false );
|
23 |
$deactivate_element_services = lae_get_option( 'lae_deactivate_element_services', false );
|
|
|
24 |
$deactivate_element_stats_bar = lae_get_option( 'lae_deactivate_element_stats_bar', false );
|
25 |
$deactivate_element_team = lae_get_option( 'lae_deactivate_element_team', false );
|
26 |
$deactivate_element_testimonials = lae_get_option( 'lae_deactivate_element_testimonials', false );
|
@@ -417,6 +418,26 @@ echo checked( !empty($deactivate_element_services), 1, false ) ;
|
|
417 |
</div>
|
418 |
</div>
|
419 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
420 |
<div class="lae-row lae-type-checkbox lae-field">
|
421 |
<label class="lae-label"><?php
|
422 |
echo __( 'Deactivate Stats Bars', 'livemesh-el-addons' ) ;
|
21 |
$deactivate_element_posts_gridbox_slider = lae_get_option( 'lae_deactivate_element_posts_gridbox_slider', false );
|
22 |
$deactivate_element_pricing_table = lae_get_option( 'lae_deactivate_element_pricing_table', false );
|
23 |
$deactivate_element_services = lae_get_option( 'lae_deactivate_element_services', false );
|
24 |
+
$deactivate_element_message_box = lae_get_option( 'lae_deactivate_element_message_box', false );
|
25 |
$deactivate_element_stats_bar = lae_get_option( 'lae_deactivate_element_stats_bar', false );
|
26 |
$deactivate_element_team = lae_get_option( 'lae_deactivate_element_team', false );
|
27 |
$deactivate_element_testimonials = lae_get_option( 'lae_deactivate_element_testimonials', false );
|
418 |
</div>
|
419 |
</div>
|
420 |
|
421 |
+
<div class="lae-row lae-type-checkbox lae-field">
|
422 |
+
<label class="lae-label"><?php
|
423 |
+
echo __( 'Deactivate Message Box', 'livemesh-el-addons' ) ;
|
424 |
+
?></label>
|
425 |
+
<p class="lae-desc"><?php
|
426 |
+
echo __( 'Deactivate the message box element.', 'livemesh-el-addons' ) ;
|
427 |
+
?></p>
|
428 |
+
<div class="lae-spacer" style="height: 5px"></div>
|
429 |
+
<div class="lae-toggle">
|
430 |
+
<input type="checkbox" class="lae-checkbox" name="lae_deactivate_element_message_box"
|
431 |
+
id="lae_deactivate_element_spacer" data-default=""
|
432 |
+
value="<?php
|
433 |
+
echo $deactivate_element_message_box ;
|
434 |
+
?>" <?php
|
435 |
+
echo checked( !empty($deactivate_element_message_box), 1, false ) ;
|
436 |
+
?>>
|
437 |
+
<label for="lae_deactivate_element_message_box"></label>
|
438 |
+
</div>
|
439 |
+
</div>
|
440 |
+
|
441 |
<div class="lae-row lae-type-checkbox lae-field">
|
442 |
<label class="lae-label"><?php
|
443 |
echo __( 'Deactivate Stats Bars', 'livemesh-el-addons' ) ;
|
assets/css/widgets/message-box.css
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* ------------------------------------ Services ------------------------------------------- */
|
2 |
+
/* -------- General services -------- */
|
3 |
+
.lae-message-box-container {
|
4 |
+
-webkit-transition: height 0.25s cubic-bezier(0.06, 0.51, 0.48, 11);
|
5 |
+
transition: height 0.25s cubic-bezier(0.06, 0.51, 0.48, 11); }
|
6 |
+
|
7 |
+
.lae-message-box {
|
8 |
+
display: -webkit-box;
|
9 |
+
display: -ms-flexbox;
|
10 |
+
display: flex;
|
11 |
+
padding: 40px;
|
12 |
+
background: #d9edf7;
|
13 |
+
-webkit-transition: opacity .2s ease,visibility .2s ease;
|
14 |
+
transition: opacity .2s ease,visibility .2s ease; }
|
15 |
+
.lae-message-box.lae-hidden {
|
16 |
+
opacity: 0;
|
17 |
+
visibility: hidden; }
|
18 |
+
.lae-message-box .lae-icon-wrapper, .lae-message-box .lae-image-wrapper {
|
19 |
+
line-height: 1;
|
20 |
+
margin-right: 20px; }
|
21 |
+
.lae-message-box .lae-icon-wrapper i {
|
22 |
+
color: #748085;
|
23 |
+
font-size: 36px; }
|
24 |
+
.lae-message-box .lae-message-title {
|
25 |
+
margin: 0; }
|
26 |
+
.lae-message-box .lae-message-text {
|
27 |
+
margin: 0; }
|
28 |
+
.lae-message-box .lae-close-icon {
|
29 |
+
position: absolute;
|
30 |
+
right: 15px;
|
31 |
+
top: 15px;
|
32 |
+
line-height: 1;
|
33 |
+
cursor: pointer;
|
34 |
+
-webkit-transition: color .25s ease-in-out;
|
35 |
+
transition: color .25s ease-in-out; }
|
36 |
+
.lae-message-box .lae-close-icon i {
|
37 |
+
color: #697073;
|
38 |
+
font-size: 24px; }
|
39 |
+
|
40 |
+
/*# sourceMappingURL=message-box.css.map */
|
assets/css/widgets/message-box.css.map
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
{"version":3,"sources":["message-box.scss"],"names":[],"mappings":"AAGA,+FAA+F;AAE/F,wCAAwC;AAExC;EACE,oEACF;EADE,4DACF,EAAA;;AAEA;EACE,qBAAa;EAAb,qBAAa;EAAb,cAAa;EACb,cAAa;EACb,oBAAmB;EACnB,yDAAgD;EAAhD,iDAAgD,EAAA;EAChD;IACE,WAAU;IACV,mBAAkB,EAAA;EAEpB;IACE,eAAc;IACd,mBAAkB,EAAA;EAEpB;IACE,eAAc;IACd,gBAAe,EAAA;EAEjB;IACE,UAAS,EAAA;EAEX;IACE,UAAS,EAAA;EAEX;IACE,mBAAkB;IAClB,YAAW;IACX,UAAS;IACT,eAAc;IACd,gBAAe;IACf,2CAAkC;IAAlC,mCAAkC,EAAA;IAClC;MACE,eAAc;MACd,gBAAe,EAAA","file":"message-box.css"}
|
assets/css/widgets/message-box.scss
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
@import "../lae-lib";
|
3 |
+
|
4 |
+
/* ------------------------------------ Services ------------------------------------------- */
|
5 |
+
|
6 |
+
/* -------- General services -------- */
|
7 |
+
|
8 |
+
.lae-message-box-container {
|
9 |
+
transition: height .25s cubic-bezier(.06,.51,.48,11)
|
10 |
+
}
|
11 |
+
|
12 |
+
.lae-message-box {
|
13 |
+
display: flex;
|
14 |
+
padding: 40px;
|
15 |
+
background: #d9edf7;
|
16 |
+
transition: opacity .2s ease,visibility .2s ease;
|
17 |
+
&.lae-hidden {
|
18 |
+
opacity: 0;
|
19 |
+
visibility: hidden;
|
20 |
+
}
|
21 |
+
.lae-icon-wrapper, .lae-image-wrapper {
|
22 |
+
line-height: 1;
|
23 |
+
margin-right: 20px;
|
24 |
+
}
|
25 |
+
.lae-icon-wrapper i {
|
26 |
+
color: #748085;
|
27 |
+
font-size: 36px;
|
28 |
+
}
|
29 |
+
.lae-message-title {
|
30 |
+
margin: 0;
|
31 |
+
}
|
32 |
+
.lae-message-text {
|
33 |
+
margin: 0;
|
34 |
+
}
|
35 |
+
.lae-close-icon {
|
36 |
+
position: absolute;
|
37 |
+
right: 15px;
|
38 |
+
top: 15px;
|
39 |
+
line-height: 1;
|
40 |
+
cursor: pointer;
|
41 |
+
transition: color .25s ease-in-out;
|
42 |
+
i {
|
43 |
+
color: #697073;
|
44 |
+
font-size: 24px;
|
45 |
+
}
|
46 |
+
}
|
47 |
+
}
|
48 |
+
|
assets/js/widgets/message-box.js
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
( function ( $ ) {
|
2 |
+
|
3 |
+
var LAE_Message_Box = function ( $scope ) {
|
4 |
+
|
5 |
+
let elem = $scope.find( '.lae-message-box' ).eq( 0 );
|
6 |
+
|
7 |
+
this._init( elem );
|
8 |
+
};
|
9 |
+
|
10 |
+
LAE_Message_Box.prototype = {
|
11 |
+
|
12 |
+
_init: function ( elem ) {
|
13 |
+
let container = elem.closest( ".elementor-element" );
|
14 |
+
container.addClass( "lae-message-box-container" );
|
15 |
+
elem.find( ".lae-close-icon" ).on( "click", function ( e ) {
|
16 |
+
$( this ).parent().addClass( "lae-hidden" );
|
17 |
+
container.addClass( "lae-hidden" );
|
18 |
+
container.animate( {
|
19 |
+
height: 0
|
20 |
+
}, {
|
21 |
+
queue: false
|
22 |
+
} )
|
23 |
+
} )
|
24 |
+
}
|
25 |
+
};
|
26 |
+
|
27 |
+
var WidgetLAEMessageBoxHandler = function ( $scope, $ ) {
|
28 |
+
|
29 |
+
new LAE_Message_Box( $scope );
|
30 |
+
|
31 |
+
};
|
32 |
+
|
33 |
+
// Make sure you run this code under Elementor..
|
34 |
+
$( window ).on( 'elementor/frontend/init', function () {
|
35 |
+
|
36 |
+
elementorFrontend.hooks.addAction( 'frontend/element_ready/lae-message-box.default', WidgetLAEMessageBoxHandler );
|
37 |
+
|
38 |
+
} );
|
39 |
+
|
40 |
+
} )( jQuery );
|
assets/js/widgets/message-box.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(function($){var LAE_Message_Box=function($scope){let elem=$scope.find(".lae-message-box").eq(0);this._init(elem)};LAE_Message_Box.prototype={_init:function(elem){let container=elem.closest(".elementor-element");container.addClass("lae-message-box-container");elem.find(".lae-close-icon").on("click",function(e){$(this).parent().addClass("lae-hidden");container.addClass("lae-hidden");container.animate({height:0},{queue:false})})}};var WidgetLAEMessageBoxHandler=function($scope,$){new LAE_Message_Box($scope)};$(window).on("elementor/frontend/init",function(){elementorFrontend.hooks.addAction("frontend/element_ready/lae-message-box.default",WidgetLAEMessageBoxHandler)})})(jQuery);
|
includes/widgets/message-box.php
ADDED
@@ -0,0 +1,351 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
Widget Name: Message Box
|
5 |
+
Description: Display messages to the user that can be dismissed.
|
6 |
+
Author: LiveMesh
|
7 |
+
Author URI: https://www.livemeshthemes.com
|
8 |
+
*/
|
9 |
+
namespace LivemeshAddons\Widgets;
|
10 |
+
|
11 |
+
use Elementor\Widget_Base ;
|
12 |
+
use Elementor\Controls_Manager ;
|
13 |
+
use Elementor\utils ;
|
14 |
+
use Elementor\Scheme_Color ;
|
15 |
+
use Elementor\Group_Control_Typography ;
|
16 |
+
use Elementor\Group_Control_Image_Size ;
|
17 |
+
use Elementor\Scheme_Typography ;
|
18 |
+
use Elementor\Icons_Manager ;
|
19 |
+
if ( !defined( 'ABSPATH' ) ) {
|
20 |
+
exit;
|
21 |
+
}
|
22 |
+
// Exit if accessed directly
|
23 |
+
class LAE_Message_Box_Widget extends LAE_Widget_Base
|
24 |
+
{
|
25 |
+
public function get_name()
|
26 |
+
{
|
27 |
+
return 'lae-message-box';
|
28 |
+
}
|
29 |
+
|
30 |
+
public function get_title()
|
31 |
+
{
|
32 |
+
return __( 'Message Box', 'livemesh-el-addons' );
|
33 |
+
}
|
34 |
+
|
35 |
+
public function get_icon()
|
36 |
+
{
|
37 |
+
return 'eicon-alert';
|
38 |
+
}
|
39 |
+
|
40 |
+
public function get_categories()
|
41 |
+
{
|
42 |
+
return array( 'livemesh-addons' );
|
43 |
+
}
|
44 |
+
|
45 |
+
public function get_custom_help_url()
|
46 |
+
{
|
47 |
+
return 'https://livemeshelementor.com/docs/livemesh-addons/core-addons/message-box-addon/';
|
48 |
+
}
|
49 |
+
|
50 |
+
public function get_script_depends()
|
51 |
+
{
|
52 |
+
return [ 'lae-frontend-scripts', 'lae-message-box-scripts' ];
|
53 |
+
}
|
54 |
+
|
55 |
+
public function get_style_depends()
|
56 |
+
{
|
57 |
+
return [ 'lae-icomoon-styles', 'lae-frontend-styles', 'lae-message-box-styles' ];
|
58 |
+
}
|
59 |
+
|
60 |
+
protected function _register_controls()
|
61 |
+
{
|
62 |
+
$this->start_controls_section( 'section_message_box', [
|
63 |
+
'label' => __( 'Message Box', 'livemesh-el-addons' ),
|
64 |
+
] );
|
65 |
+
$this->add_control( 'message_title', [
|
66 |
+
'label' => __( 'Message Title', 'livemesh-el-addons' ),
|
67 |
+
'type' => Controls_Manager::TEXT,
|
68 |
+
'label_block' => true,
|
69 |
+
'default' => __( 'My message title', 'livemesh-el-addons' ),
|
70 |
+
'dynamic' => [
|
71 |
+
'active' => true,
|
72 |
+
],
|
73 |
+
] );
|
74 |
+
$this->add_control( 'message_text', [
|
75 |
+
'label' => __( 'Message text', 'livemesh-el-addons' ),
|
76 |
+
'type' => Controls_Manager::TEXTAREA,
|
77 |
+
'default' => __( 'Message text goes here', 'livemesh-el-addons' ),
|
78 |
+
'label_block' => true,
|
79 |
+
'dynamic' => [
|
80 |
+
'active' => true,
|
81 |
+
],
|
82 |
+
] );
|
83 |
+
$this->add_control( 'icon_type', [
|
84 |
+
'label' => __( 'Icon Type', 'livemesh-el-addons' ),
|
85 |
+
'type' => Controls_Manager::SELECT,
|
86 |
+
'default' => 'icon',
|
87 |
+
'options' => [
|
88 |
+
'none' => __( 'None', 'livemesh-el-addons' ),
|
89 |
+
'icon' => __( 'Icon', 'livemesh-el-addons' ),
|
90 |
+
'icon_image' => __( 'Icon Image', 'livemesh-el-addons' ),
|
91 |
+
],
|
92 |
+
] );
|
93 |
+
$this->add_control( 'icon_image', [
|
94 |
+
'label' => __( 'Message Image', 'livemesh-el-addons' ),
|
95 |
+
'type' => Controls_Manager::MEDIA,
|
96 |
+
'default' => [
|
97 |
+
'url' => Utils::get_placeholder_image_src(),
|
98 |
+
],
|
99 |
+
'label_block' => true,
|
100 |
+
'condition' => [
|
101 |
+
'icon_type' => 'icon_image',
|
102 |
+
],
|
103 |
+
'dynamic' => [
|
104 |
+
'active' => true,
|
105 |
+
],
|
106 |
+
] );
|
107 |
+
$this->add_control( 'selected_icon', [
|
108 |
+
'label' => __( 'Message Icon', 'livemesh-el-addons' ),
|
109 |
+
'type' => Controls_Manager::ICONS,
|
110 |
+
'label_block' => true,
|
111 |
+
'default' => [
|
112 |
+
'value' => 'fas fa-home',
|
113 |
+
'library' => 'fa-solid',
|
114 |
+
],
|
115 |
+
'condition' => [
|
116 |
+
'icon_type' => 'icon',
|
117 |
+
],
|
118 |
+
'fa4compatibility' => 'icon',
|
119 |
+
] );
|
120 |
+
$this->add_control( 'upgrade_notice', [
|
121 |
+
'type' => Controls_Manager::RAW_HTML,
|
122 |
+
'separator' => 'before',
|
123 |
+
'raw' => '<div style="text-align:center;line-height:1.6;"><p>' . __( 'Unlock new possibilities with premium widgets and styles of <strong>Livemesh Addons for Elementor <i>Premium</i></strong>. ', 'livemesh-el-addons' ) . '</p><p style="padding-top:15px;"><a class="elementor-button elementor-button-default elementor-button-go-pro" href="https://livemeshelementor.com/pricing/#pricing-plans" target="_blank"><i class="fa fa-hand-o-right" aria-hidden="true"></i>' . __( 'Go Pro', 'livemesh-el-addons' ) . '</a></p></div>',
|
124 |
+
] );
|
125 |
+
$this->end_controls_section();
|
126 |
+
$this->start_controls_section( 'section_message_box_styling', [
|
127 |
+
'label' => __( 'Message Box', 'livemesh-el-addons' ),
|
128 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
129 |
+
] );
|
130 |
+
$this->add_control( 'message_box_background_color', [
|
131 |
+
'label' => __( 'Background Color', 'livemesh-el-addons' ),
|
132 |
+
'type' => Controls_Manager::COLOR,
|
133 |
+
'selectors' => [
|
134 |
+
'{{WRAPPER}} .lae-message-box' => 'background-color: {{VALUE}};',
|
135 |
+
],
|
136 |
+
] );
|
137 |
+
$this->add_control( 'message_box_background_image', [
|
138 |
+
'label' => __( 'Background Image', 'livemesh-el-addons' ),
|
139 |
+
'type' => Controls_Manager::MEDIA,
|
140 |
+
'selectors' => [
|
141 |
+
'{{WRAPPER}} .lae-message-box' => 'background-image: url({{URL}})',
|
142 |
+
],
|
143 |
+
] );
|
144 |
+
$this->add_control( 'message_box_background_size', [
|
145 |
+
'label' => __( 'Background Size', 'livemesh-el-addons' ),
|
146 |
+
'type' => Controls_Manager::SELECT,
|
147 |
+
'default' => 'cover',
|
148 |
+
'options' => [
|
149 |
+
'cover' => __( 'Cover', 'livemesh-el-addons' ),
|
150 |
+
'contain' => __( 'Contain', 'livemesh-el-addons' ),
|
151 |
+
'auto' => __( 'Auto', 'livemesh-el-addons' ),
|
152 |
+
],
|
153 |
+
'selectors' => [
|
154 |
+
'{{WRAPPER}} .lae-message-box' => 'background-size: {{VALUE}}',
|
155 |
+
],
|
156 |
+
'conditions' => [
|
157 |
+
'terms' => [ [
|
158 |
+
'name' => 'message_box_background_image[url]',
|
159 |
+
'operator' => '!=',
|
160 |
+
'value' => '',
|
161 |
+
] ],
|
162 |
+
],
|
163 |
+
] );
|
164 |
+
$this->add_control( 'message_box_border_radius', [
|
165 |
+
'label' => __( 'Border Radius', 'livemesh-el-addons' ),
|
166 |
+
'type' => Controls_Manager::DIMENSIONS,
|
167 |
+
'size_units' => [ 'px', '%', 'em' ],
|
168 |
+
'selectors' => [
|
169 |
+
'{{WRAPPER}} .lae-message-box' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
170 |
+
],
|
171 |
+
] );
|
172 |
+
$this->add_responsive_control( 'message_box_padding', [
|
173 |
+
'label' => __( 'Custom Padding', 'livemesh-el-addons' ),
|
174 |
+
'type' => Controls_Manager::DIMENSIONS,
|
175 |
+
'size_units' => [ 'px', '%', 'em' ],
|
176 |
+
'selectors' => [
|
177 |
+
'{{WRAPPER}} .lae-message-box' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
178 |
+
],
|
179 |
+
] );
|
180 |
+
$this->end_controls_section();
|
181 |
+
$this->start_controls_section( 'section_message_title', [
|
182 |
+
'label' => __( 'Message Title', 'livemesh-el-addons' ),
|
183 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
184 |
+
] );
|
185 |
+
$this->add_control( 'message_title_tag', [
|
186 |
+
'label' => __( 'Title HTML Tag', 'livemesh-el-addons' ),
|
187 |
+
'type' => Controls_Manager::SELECT,
|
188 |
+
'options' => [
|
189 |
+
'h1' => __( 'H1', 'livemesh-el-addons' ),
|
190 |
+
'h2' => __( 'H2', 'livemesh-el-addons' ),
|
191 |
+
'h3' => __( 'H3', 'livemesh-el-addons' ),
|
192 |
+
'h4' => __( 'H4', 'livemesh-el-addons' ),
|
193 |
+
'h5' => __( 'H5', 'livemesh-el-addons' ),
|
194 |
+
'h6' => __( 'H6', 'livemesh-el-addons' ),
|
195 |
+
'div' => __( 'div', 'livemesh-el-addons' ),
|
196 |
+
],
|
197 |
+
'default' => 'h3',
|
198 |
+
] );
|
199 |
+
$this->add_control( 'message_title_color', [
|
200 |
+
'label' => __( 'Color', 'livemesh-el-addons' ),
|
201 |
+
'type' => Controls_Manager::COLOR,
|
202 |
+
'selectors' => [
|
203 |
+
'{{WRAPPER}} .lae-message-box .lae-message-wrap .lae-message-title' => 'color: {{VALUE}};',
|
204 |
+
],
|
205 |
+
] );
|
206 |
+
$this->add_group_control( Group_Control_Typography::get_type(), [
|
207 |
+
'name' => 'message_title_typography',
|
208 |
+
'selector' => '{{WRAPPER}} .lae-message-box .lae-message-wrap .lae-message-title',
|
209 |
+
] );
|
210 |
+
$this->end_controls_section();
|
211 |
+
$this->start_controls_section( 'section_message_text', [
|
212 |
+
'label' => __( 'Message Text', 'livemesh-el-addons' ),
|
213 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
214 |
+
] );
|
215 |
+
$this->add_responsive_control( 'message_text_margin_top', [
|
216 |
+
'label' => __( 'Margin Top', 'livemesh-el-addons' ),
|
217 |
+
'type' => Controls_Manager::SLIDER,
|
218 |
+
'size_units' => [ 'px' ],
|
219 |
+
'range' => [
|
220 |
+
'px' => [
|
221 |
+
'min' => 0,
|
222 |
+
'max' => 100,
|
223 |
+
'step' => 1,
|
224 |
+
],
|
225 |
+
],
|
226 |
+
'default' => [
|
227 |
+
'unit' => 'px',
|
228 |
+
'size' => 10,
|
229 |
+
],
|
230 |
+
'selectors' => [
|
231 |
+
'{{WRAPPER}} .lae-message-box .lae-message-wrap .lae-message-text' => 'margin-top: {{SIZE}}{{UNIT}}',
|
232 |
+
],
|
233 |
+
] );
|
234 |
+
$this->add_control( 'message_text_color', [
|
235 |
+
'label' => __( 'Color', 'livemesh-el-addons' ),
|
236 |
+
'type' => Controls_Manager::COLOR,
|
237 |
+
'selectors' => [
|
238 |
+
'{{WRAPPER}} .lae-message-box .lae-message-wrap .lae-message-text' => 'color: {{VALUE}};',
|
239 |
+
],
|
240 |
+
] );
|
241 |
+
$this->add_group_control( Group_Control_Typography::get_type(), [
|
242 |
+
'name' => 'message_text_typography',
|
243 |
+
'selector' => '{{WRAPPER}} .lae-message-box .lae-message-wrap .lae-message-text',
|
244 |
+
] );
|
245 |
+
$this->end_controls_section();
|
246 |
+
$this->start_controls_section( 'section_message_icon', [
|
247 |
+
'label' => __( 'Message Icon', 'livemesh-el-addons' ),
|
248 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
249 |
+
'condition' => [
|
250 |
+
'icon_type!' => 'none',
|
251 |
+
],
|
252 |
+
] );
|
253 |
+
$this->add_responsive_control( 'message_icon_size', [
|
254 |
+
'label' => __( 'Icon or Icon Image size in pixels', 'livemesh-el-addons' ),
|
255 |
+
'type' => Controls_Manager::SLIDER,
|
256 |
+
'size_units' => [ 'px', '%', 'em' ],
|
257 |
+
'range' => [
|
258 |
+
'px' => [
|
259 |
+
'min' => 10,
|
260 |
+
'min' => 10,
|
261 |
+
'max' => 300,
|
262 |
+
],
|
263 |
+
],
|
264 |
+
'selectors' => [
|
265 |
+
'{{WRAPPER}} .lae-message-box .lae-image-wrapper img' => 'width: {{SIZE}}{{UNIT}};',
|
266 |
+
'{{WRAPPER}} .lae-message-box .lae-icon-wrapper i' => 'font-size: {{SIZE}}{{UNIT}};',
|
267 |
+
],
|
268 |
+
] );
|
269 |
+
$this->add_control( 'message_icon_color', [
|
270 |
+
'label' => __( 'Icon Custom Color', 'livemesh-el-addons' ),
|
271 |
+
'type' => Controls_Manager::COLOR,
|
272 |
+
'condition' => [
|
273 |
+
'icon_type' => 'icon',
|
274 |
+
],
|
275 |
+
'selectors' => [
|
276 |
+
'{{WRAPPER}} .lae-message-box .lae-icon-wrapper i' => 'color: {{VALUE}};',
|
277 |
+
],
|
278 |
+
] );
|
279 |
+
$this->add_responsive_control( 'message_icon_margin', [
|
280 |
+
'label' => __( 'Margin', 'livemesh-el-addons' ),
|
281 |
+
'type' => Controls_Manager::DIMENSIONS,
|
282 |
+
'size_units' => [ 'px', '%', 'em' ],
|
283 |
+
'default' => [
|
284 |
+
'top' => '',
|
285 |
+
'right' => '20',
|
286 |
+
'bottom' => '0',
|
287 |
+
'left' => '0',
|
288 |
+
'unit' => 'px',
|
289 |
+
'isLinked' => false,
|
290 |
+
],
|
291 |
+
'selectors' => [
|
292 |
+
'{{WRAPPER}} .lae-message-box .lae-image-wrapper' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
293 |
+
'{{WRAPPER}} .lae-message-box .lae-icon-wrapper' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
294 |
+
],
|
295 |
+
] );
|
296 |
+
$this->add_control( 'message_icon_alignment', [
|
297 |
+
'type' => Controls_Manager::SELECT,
|
298 |
+
'label' => __( 'Choose Alignment', 'livemesh-el-addons' ),
|
299 |
+
'default' => 'start',
|
300 |
+
'options' => [
|
301 |
+
'start' => __( 'Top', 'livemesh-el-addons' ),
|
302 |
+
'end' => __( 'Bottom', 'livemesh-el-addons' ),
|
303 |
+
'center' => __( 'Center', 'livemesh-el-addons' ),
|
304 |
+
],
|
305 |
+
'selectors' => [
|
306 |
+
'{{WRAPPER}} .lae-message-box .lae-message-icon' => 'align-self: {{VALUE}};',
|
307 |
+
],
|
308 |
+
] );
|
309 |
+
$this->end_controls_section();
|
310 |
+
$this->start_controls_section( 'section_close_icon', [
|
311 |
+
'label' => __( 'Close Icon', 'livemesh-el-addons' ),
|
312 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
313 |
+
] );
|
314 |
+
$this->add_responsive_control( 'close_icon_size', [
|
315 |
+
'label' => __( 'Icon or Icon Image size in pixels', 'livemesh-el-addons' ),
|
316 |
+
'type' => Controls_Manager::SLIDER,
|
317 |
+
'size_units' => [ 'px', '%', 'em' ],
|
318 |
+
'range' => [
|
319 |
+
'px' => [
|
320 |
+
'min' => 10,
|
321 |
+
'max' => 300,
|
322 |
+
],
|
323 |
+
],
|
324 |
+
'selectors' => [
|
325 |
+
'{{WRAPPER}} .lae-message-box .lae-close-icon i' => 'font-size: {{SIZE}}{{UNIT}};',
|
326 |
+
],
|
327 |
+
] );
|
328 |
+
$this->add_control( 'close_icon_color', [
|
329 |
+
'label' => __( 'Icon Custom Color', 'livemesh-el-addons' ),
|
330 |
+
'type' => Controls_Manager::COLOR,
|
331 |
+
'selectors' => [
|
332 |
+
'{{WRAPPER}} .lae-message-box .lae-close-icon i' => 'color: {{VALUE}};',
|
333 |
+
],
|
334 |
+
] );
|
335 |
+
$this->end_controls_section();
|
336 |
+
}
|
337 |
+
|
338 |
+
protected function render()
|
339 |
+
{
|
340 |
+
$settings = $this->get_settings_for_display();
|
341 |
+
$settings = apply_filters( 'lae_message_box_' . $this->get_id() . '_settings', $settings );
|
342 |
+
$args['settings'] = $settings;
|
343 |
+
$args['widget_instance'] = $this;
|
344 |
+
lae_get_template_part( 'addons/message-box/content', $args );
|
345 |
+
}
|
346 |
+
|
347 |
+
protected function content_template()
|
348 |
+
{
|
349 |
+
}
|
350 |
+
|
351 |
+
}
|
plugin.php
CHANGED
@@ -45,7 +45,7 @@ if ( !class_exists( 'Livemesh_Elementor_Addons' ) ) {
|
|
45 |
public function __clone()
|
46 |
{
|
47 |
// Cloning instances of the class is forbidden
|
48 |
-
_doing_it_wrong( __FUNCTION__, __( 'Cheatin’ huh?', 'livemesh-el-addons' ), '6.
|
49 |
}
|
50 |
|
51 |
/**
|
@@ -55,7 +55,7 @@ if ( !class_exists( 'Livemesh_Elementor_Addons' ) ) {
|
|
55 |
public function __wakeup()
|
56 |
{
|
57 |
// Unserializing instances of the class is forbidden
|
58 |
-
_doing_it_wrong( __FUNCTION__, __( 'Cheatin’ huh?', 'livemesh-el-addons' ), '6.
|
59 |
}
|
60 |
|
61 |
private function setup_debug_constants()
|
@@ -176,6 +176,7 @@ if ( !class_exists( 'Livemesh_Elementor_Addons' ) ) {
|
|
176 |
'posts_gridbox_slider',
|
177 |
'pricing_table',
|
178 |
'services',
|
|
|
179 |
'stats_bars',
|
180 |
'team_members',
|
181 |
'testimonials',
|
@@ -335,6 +336,13 @@ if ( !class_exists( 'Livemesh_Elementor_Addons' ) ) {
|
|
335 |
LAE_VERSION,
|
336 |
true
|
337 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
338 |
wp_register_script(
|
339 |
'lae-testimonials-scripts',
|
340 |
LAE_PLUGIN_URL . 'assets/js/widgets/testimonials' . $suffix . '.js',
|
@@ -517,6 +525,12 @@ if ( !class_exists( 'Livemesh_Elementor_Addons' ) ) {
|
|
517 |
array( 'lae-frontend-styles' ),
|
518 |
LAE_VERSION
|
519 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
520 |
wp_register_style(
|
521 |
'lae-stats-bars-styles',
|
522 |
LAE_PLUGIN_URL . 'assets/css/widgets/stats-bars.css',
|
@@ -613,6 +627,13 @@ if ( !class_exists( 'Livemesh_Elementor_Addons' ) ) {
|
|
613 |
$widgets_manager->register_widget_type( new \LivemeshAddons\Widgets\LAE_Services_Widget() );
|
614 |
}
|
615 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
616 |
$deactivate_element_heading = lae_get_option( 'lae_deactivate_element_heading', false );
|
617 |
|
618 |
if ( !$deactivate_element_heading ) {
|
45 |
public function __clone()
|
46 |
{
|
47 |
// Cloning instances of the class is forbidden
|
48 |
+
_doing_it_wrong( __FUNCTION__, __( 'Cheatin’ huh?', 'livemesh-el-addons' ), '6.16' );
|
49 |
}
|
50 |
|
51 |
/**
|
55 |
public function __wakeup()
|
56 |
{
|
57 |
// Unserializing instances of the class is forbidden
|
58 |
+
_doing_it_wrong( __FUNCTION__, __( 'Cheatin’ huh?', 'livemesh-el-addons' ), '6.16' );
|
59 |
}
|
60 |
|
61 |
private function setup_debug_constants()
|
176 |
'posts_gridbox_slider',
|
177 |
'pricing_table',
|
178 |
'services',
|
179 |
+
'message_box',
|
180 |
'stats_bars',
|
181 |
'team_members',
|
182 |
'testimonials',
|
336 |
LAE_VERSION,
|
337 |
true
|
338 |
);
|
339 |
+
wp_register_script(
|
340 |
+
'lae-message-box-scripts',
|
341 |
+
LAE_PLUGIN_URL . 'assets/js/widgets/message-box' . $suffix . '.js',
|
342 |
+
array( 'elementor-frontend' ),
|
343 |
+
LAE_VERSION,
|
344 |
+
true
|
345 |
+
);
|
346 |
wp_register_script(
|
347 |
'lae-testimonials-scripts',
|
348 |
LAE_PLUGIN_URL . 'assets/js/widgets/testimonials' . $suffix . '.js',
|
525 |
array( 'lae-frontend-styles' ),
|
526 |
LAE_VERSION
|
527 |
);
|
528 |
+
wp_register_style(
|
529 |
+
'lae-message-box-styles',
|
530 |
+
LAE_PLUGIN_URL . 'assets/css/widgets/message-box.css',
|
531 |
+
array( 'lae-frontend-styles' ),
|
532 |
+
LAE_VERSION
|
533 |
+
);
|
534 |
wp_register_style(
|
535 |
'lae-stats-bars-styles',
|
536 |
LAE_PLUGIN_URL . 'assets/css/widgets/stats-bars.css',
|
627 |
$widgets_manager->register_widget_type( new \LivemeshAddons\Widgets\LAE_Services_Widget() );
|
628 |
}
|
629 |
|
630 |
+
$deactivate_element_message_box = lae_get_option( 'lae_deactivate_element_message_box', false );
|
631 |
+
|
632 |
+
if ( !$deactivate_element_message_box ) {
|
633 |
+
require_once LAE_ADDONS_DIR . 'message-box.php';
|
634 |
+
$widgets_manager->register_widget_type( new \LivemeshAddons\Widgets\LAE_Message_Box_Widget() );
|
635 |
+
}
|
636 |
+
|
637 |
$deactivate_element_heading = lae_get_option( 'lae_deactivate_element_heading', false );
|
638 |
|
639 |
if ( !$deactivate_element_heading ) {
|
readme.txt
CHANGED
@@ -7,7 +7,7 @@ Tags: elementor, elementor addons, elementor extensions, elementor widgets, page
|
|
7 |
Requires at least: 5.0
|
8 |
Tested up to: 5.8
|
9 |
Requires PHP: 5.6
|
10 |
-
Stable Tag: 6.
|
11 |
License: GPLv3
|
12 |
License URI: https://opensource.org/licenses/GPL-3.0
|
13 |
|
@@ -259,6 +259,9 @@ Email us at support[at]livemeshthemes.com and we will be happy to assist you.
|
|
259 |
|
260 |
|
261 |
|
|
|
|
|
|
|
262 |
= 6.15 =
|
263 |
* Tweak - Increased the number of columns allowed in Posts Carousel.
|
264 |
* Added - Compatibility with Elementor 3.5.
|
7 |
Requires at least: 5.0
|
8 |
Tested up to: 5.8
|
9 |
Requires PHP: 5.6
|
10 |
+
Stable Tag: 6.16
|
11 |
License: GPLv3
|
12 |
License URI: https://opensource.org/licenses/GPL-3.0
|
13 |
|
259 |
|
260 |
|
261 |
|
262 |
+
= 6.16 =
|
263 |
+
* New Widget - The Message Box widget
|
264 |
+
|
265 |
= 6.15 =
|
266 |
* Tweak - Increased the number of columns allowed in Posts Carousel.
|
267 |
* Added - Compatibility with Elementor 3.5.
|
templates/addons/message-box/content.php
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Content - Message Box Template
|
4 |
+
*
|
5 |
+
* This template can be overridden by copying it to mytheme/addons-for-elementor/addons/message-box/content.php
|
6 |
+
*
|
7 |
+
*/
|
8 |
+
|
9 |
+
if (!defined('ABSPATH')) {
|
10 |
+
exit; // Exit if accessed directly
|
11 |
+
}
|
12 |
+
|
13 |
+
use Elementor\Icons_Manager;
|
14 |
+
|
15 |
+
?>
|
16 |
+
|
17 |
+
<div class="lae-message-box">
|
18 |
+
<span class="lae-message-icon">
|
19 |
+
<?php if ($settings['icon_type'] == 'icon_image' && !empty($settings['icon_image'])) : ?>
|
20 |
+
<div class="lae-image-wrapper">
|
21 |
+
<?php echo wp_get_attachment_image($settings['icon_image']['id'], 'large', false, array('class' => 'lae-image lae-thumbnail')); ?>
|
22 |
+
</div>
|
23 |
+
<?php elseif ($settings['icon_type'] == 'icon' && (!empty($settings['icon']) || !empty($settings['selected_icon']['value']))) : ?>
|
24 |
+
<div class="lae-icon-wrapper">
|
25 |
+
<?php Icons_Manager::render_icon($settings['selected_icon'], ['aria-hidden' => 'true']); ?>
|
26 |
+
</div>
|
27 |
+
<?php endif; ?>
|
28 |
+
</span>
|
29 |
+
<div class="lae-message-wrap">
|
30 |
+
|
31 |
+
<<?php echo lae_validate_html_tag($settings['message_title_tag']); ?> class="lae-message-title"><?php echo wp_kses_post($settings['message_title']); ?></<?php echo lae_validate_html_tag($settings['message_title_tag']); ?>>
|
32 |
+
|
33 |
+
<p class="lae-message-text"><?php echo do_shortcode(wp_kses_post($settings['message_text'])); ?></p>
|
34 |
+
|
35 |
+
</div>
|
36 |
+
<span class="lae-close-icon">
|
37 |
+
<?php $icon_value = 'fas fa-times'; ?>
|
38 |
+
|
39 |
+
<?php
|
40 |
+
Icons_Manager::render_icon([
|
41 |
+
'library' => 'fa-solid',
|
42 |
+
'value' => $icon_value,
|
43 |
+
], ['aria-hidden' => 'true']);
|
44 |
+
?>
|
45 |
+
</span>
|
46 |
+
</div>
|
47 |
+
|
48 |
+
|