Version Description
Download this release
Release Info
Code changes from version 1.5.9 to 1.6.1
- assets/css/htmega-elementor-editor.css +3 -0
- assets/js/htmega-widgets-active.js +4 -0
- htmega_addons_elementor.php +4 -4
- includes/class.htmega.php +5 -1
- includes/recommended-plugins/assets/js/plugins_install_manager.js +156 -0
- includes/recommended-plugins/class.recommended-plugins.php +418 -0
- includes/recommended-plugins/recommended-plugins.php +86 -0
- includes/widgets/htmega_carousel.php +3 -0
- includes/widgets/htmega_cuctom_event.php +1 -1
- includes/widgets/htmega_instagram.php +3 -0
- includes/widgets/htmega_panel_slider.php +3 -0
- includes/widgets/htmega_post_carousel.php +3 -0
- includes/widgets/htmega_post_slider.php +2 -0
- includes/widgets/htmega_slider_thumb_gallery.php +2 -0
- includes/widgets/htmega_twitter_feed.php +3 -0
- includes/widgets/htmega_user_login_form.php +6 -1
- readme.txt +7 -0
assets/css/htmega-elementor-editor.css
CHANGED
@@ -8,4 +8,7 @@
|
|
8 |
position: absolute;
|
9 |
right: 5px;
|
10 |
top: 5px;
|
|
|
|
|
|
|
11 |
}
|
8 |
position: absolute;
|
9 |
right: 5px;
|
10 |
top: 5px;
|
11 |
+
}
|
12 |
+
.elementor-control-redirect_page_url .elementor-control-url-more{
|
13 |
+
display: none;
|
14 |
}
|
assets/js/htmega-widgets-active.js
CHANGED
@@ -141,6 +141,7 @@
|
|
141 |
slidesToScroll: scroll_columns,
|
142 |
centerMode: center_mode,
|
143 |
centerPadding: center_padding,
|
|
|
144 |
responsive: [
|
145 |
{
|
146 |
breakpoint: tablet_width,
|
@@ -174,6 +175,7 @@
|
|
174 |
slidesToScroll: scroll_columns,
|
175 |
centerMode: center_mode,
|
176 |
centerPadding: center_padding,
|
|
|
177 |
responsive: [
|
178 |
{
|
179 |
breakpoint: tablet_width,
|
@@ -266,6 +268,7 @@
|
|
266 |
slidesToScroll: scroll_columns,
|
267 |
centerMode: center_mode,
|
268 |
centerPadding: center_padding,
|
|
|
269 |
responsive: [
|
270 |
{
|
271 |
breakpoint: tablet_width,
|
@@ -293,6 +296,7 @@
|
|
293 |
autoplaySpeed: navautoplay_speed,
|
294 |
centerMode: navcenter_mode,
|
295 |
centerPadding: navcenter_padding,
|
|
|
296 |
responsive: [
|
297 |
{
|
298 |
breakpoint: navtablet_width,
|
141 |
slidesToScroll: scroll_columns,
|
142 |
centerMode: center_mode,
|
143 |
centerPadding: center_padding,
|
144 |
+
rtl: elementorFrontendConfig.is_rtl,
|
145 |
responsive: [
|
146 |
{
|
147 |
breakpoint: tablet_width,
|
175 |
slidesToScroll: scroll_columns,
|
176 |
centerMode: center_mode,
|
177 |
centerPadding: center_padding,
|
178 |
+
rtl: elementorFrontendConfig.is_rtl,
|
179 |
responsive: [
|
180 |
{
|
181 |
breakpoint: tablet_width,
|
268 |
slidesToScroll: scroll_columns,
|
269 |
centerMode: center_mode,
|
270 |
centerPadding: center_padding,
|
271 |
+
rtl: elementorFrontendConfig.is_rtl,
|
272 |
responsive: [
|
273 |
{
|
274 |
breakpoint: tablet_width,
|
296 |
autoplaySpeed: navautoplay_speed,
|
297 |
centerMode: navcenter_mode,
|
298 |
centerPadding: navcenter_padding,
|
299 |
+
rtl: elementorFrontendConfig.is_rtl,
|
300 |
responsive: [
|
301 |
{
|
302 |
breakpoint: navtablet_width,
|
htmega_addons_elementor.php
CHANGED
@@ -5,17 +5,17 @@
|
|
5 |
* Plugin URI: http://demo.wphash.com/htmega/
|
6 |
* Author: HasThemes
|
7 |
* Author URI: https://hasthemes.com/
|
8 |
-
* Version: 1.
|
9 |
* License: GPL2
|
10 |
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
11 |
* Text Domain: htmega-addons
|
12 |
* Domain Path: /languages
|
13 |
-
* Elementor tested up to: 3.
|
14 |
-
* Elementor Pro tested up to: 3.
|
15 |
*/
|
16 |
|
17 |
if( ! defined( 'ABSPATH' ) ) exit(); // Exit if accessed directly
|
18 |
-
define( 'HTMEGA_VERSION', '1.
|
19 |
define( 'HTMEGA_ADDONS_PL_ROOT', __FILE__ );
|
20 |
define( 'HTMEGA_ADDONS_PL_URL', plugins_url( '/', HTMEGA_ADDONS_PL_ROOT ) );
|
21 |
define( 'HTMEGA_ADDONS_PL_PATH', plugin_dir_path( HTMEGA_ADDONS_PL_ROOT ) );
|
5 |
* Plugin URI: http://demo.wphash.com/htmega/
|
6 |
* Author: HasThemes
|
7 |
* Author URI: https://hasthemes.com/
|
8 |
+
* Version: 1.6.1
|
9 |
* License: GPL2
|
10 |
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
11 |
* Text Domain: htmega-addons
|
12 |
* Domain Path: /languages
|
13 |
+
* Elementor tested up to: 3.3.0
|
14 |
+
* Elementor Pro tested up to: 3.3.1
|
15 |
*/
|
16 |
|
17 |
if( ! defined( 'ABSPATH' ) ) exit(); // Exit if accessed directly
|
18 |
+
define( 'HTMEGA_VERSION', '1.6.1' );
|
19 |
define( 'HTMEGA_ADDONS_PL_ROOT', __FILE__ );
|
20 |
define( 'HTMEGA_ADDONS_PL_URL', plugins_url( '/', HTMEGA_ADDONS_PL_ROOT ) );
|
21 |
define( 'HTMEGA_ADDONS_PL_PATH', plugin_dir_path( HTMEGA_ADDONS_PL_ROOT ) );
|
includes/class.htmega.php
CHANGED
@@ -203,7 +203,7 @@ final class HTMega_Addons_Elementor {
|
|
203 |
if ( get_option( 'htmega_do_activation_redirect', false ) ) {
|
204 |
delete_option('htmega_do_activation_redirect');
|
205 |
if( !isset( $_GET['activate-multi'] ) ){
|
206 |
-
wp_redirect( admin_url("admin.php?page=
|
207 |
}
|
208 |
}
|
209 |
}
|
@@ -226,6 +226,10 @@ final class HTMega_Addons_Elementor {
|
|
226 |
if( htmega_get_option( 'postduplicator', 'htmega_advance_element_tabs', 'off' ) === 'on' ){
|
227 |
require_once ( HTMEGA_ADDONS_PL_PATH . 'includes/class.post-duplicator.php' );
|
228 |
}
|
|
|
|
|
|
|
|
|
229 |
|
230 |
}
|
231 |
|
203 |
if ( get_option( 'htmega_do_activation_redirect', false ) ) {
|
204 |
delete_option('htmega_do_activation_redirect');
|
205 |
if( !isset( $_GET['activate-multi'] ) ){
|
206 |
+
wp_redirect( admin_url("admin.php?page=htmega-addons_extensions") );
|
207 |
}
|
208 |
}
|
209 |
}
|
226 |
if( htmega_get_option( 'postduplicator', 'htmega_advance_element_tabs', 'off' ) === 'on' ){
|
227 |
require_once ( HTMEGA_ADDONS_PL_PATH . 'includes/class.post-duplicator.php' );
|
228 |
}
|
229 |
+
|
230 |
+
// Recommended plugins
|
231 |
+
require_once ( HTMEGA_ADDONS_PL_PATH . 'includes/recommended-plugins/class.recommended-plugins.php' );
|
232 |
+
require_once ( HTMEGA_ADDONS_PL_PATH . 'includes/recommended-plugins/recommended-plugins.php' );
|
233 |
|
234 |
}
|
235 |
|
includes/recommended-plugins/assets/js/plugins_install_manager.js
ADDED
@@ -0,0 +1,156 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Plugins Install manager JS
|
3 |
+
*/
|
4 |
+
;( function ( $ ) {
|
5 |
+
'use strict';
|
6 |
+
|
7 |
+
// Tab Menu
|
8 |
+
$(".htrp-admin-tabs").on('click', 'a', function(e){
|
9 |
+
e.preventDefault();
|
10 |
+
var $this = $(this),
|
11 |
+
$target = $this.attr('href');
|
12 |
+
|
13 |
+
$this.addClass('htrp-active').parent().siblings().children('a').removeClass('htrp-active');
|
14 |
+
$( '.htrp-admin-tab-pane'+ $target ).addClass('htrp-active').siblings().removeClass('htrp-active');
|
15 |
+
});
|
16 |
+
|
17 |
+
/*
|
18 |
+
* Plugin Installation Manager
|
19 |
+
*/
|
20 |
+
var PluginInstallManager = {
|
21 |
+
|
22 |
+
init: function(){
|
23 |
+
$( document ).on('click','.install-now', PluginInstallManager.installNow );
|
24 |
+
$( document ).on('click','.activate-now', PluginInstallManager.activatePlugin);
|
25 |
+
$( document ).on('wp-plugin-install-success', PluginInstallManager.installingSuccess);
|
26 |
+
$( document ).on('wp-plugin-install-error', PluginInstallManager.installingError);
|
27 |
+
$( document ).on('wp-plugin-installing', PluginInstallManager.installingProcess);
|
28 |
+
},
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Installation Error.
|
32 |
+
*/
|
33 |
+
installingError: function( e, response ) {
|
34 |
+
e.preventDefault();
|
35 |
+
var $card = $( '.htrp-plugin-' + response.slug );
|
36 |
+
$button = $card.find( '.button' );
|
37 |
+
$button.removeClass( 'button-primary' ).addClass( 'disabled' ).html( wp.updates.l10n.installFailedShort );
|
38 |
+
},
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Installing Process
|
42 |
+
*/
|
43 |
+
installingProcess: function(e, args){
|
44 |
+
e.preventDefault();
|
45 |
+
var $card = $( '.htrp-plugin-' + args.slug ),
|
46 |
+
$button = $card.find( '.button' );
|
47 |
+
$button.text( htrp_params.buttontxt.installing ).addClass( 'updating-message' );
|
48 |
+
},
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Plugin Install Now
|
52 |
+
*/
|
53 |
+
installNow: function(e){
|
54 |
+
e.preventDefault();
|
55 |
+
|
56 |
+
var $button = $( e.target ),
|
57 |
+
$plugindata = $button.data('pluginopt');
|
58 |
+
|
59 |
+
if ( $button.hasClass( 'updating-message' ) || $button.hasClass( 'button-disabled' ) ) {
|
60 |
+
return;
|
61 |
+
}
|
62 |
+
if ( wp.updates.shouldRequestFilesystemCredentials && ! wp.updates.ajaxLocked ) {
|
63 |
+
wp.updates.requestFilesystemCredentials( e );
|
64 |
+
$( document ).on( 'credential-modal-cancel', function() {
|
65 |
+
var $message = $( '.install-now.updating-message' );
|
66 |
+
$message.removeClass( 'updating-message' ).text( wp.updates.l10n.installNow );
|
67 |
+
wp.a11y.speak( wp.updates.l10n.updateCancel, 'polite' );
|
68 |
+
});
|
69 |
+
}
|
70 |
+
wp.updates.installPlugin( {
|
71 |
+
slug: $plugindata['slug']
|
72 |
+
});
|
73 |
+
|
74 |
+
},
|
75 |
+
|
76 |
+
/**
|
77 |
+
* After Plugin Install success
|
78 |
+
*/
|
79 |
+
installingSuccess: function( e, response ) {
|
80 |
+
var $message = $( '.htrp-plugin-' + response.slug ).find( '.button' );
|
81 |
+
|
82 |
+
var $plugindata = $message.data('pluginopt');
|
83 |
+
|
84 |
+
$message.removeClass( 'install-now installed button-disabled updated-message' )
|
85 |
+
.addClass( 'updating-message' )
|
86 |
+
.html( htrp_params.buttontxt.activating );
|
87 |
+
|
88 |
+
setTimeout( function() {
|
89 |
+
$.ajax( {
|
90 |
+
url: htrp_params.ajaxurl,
|
91 |
+
type: 'POST',
|
92 |
+
data: {
|
93 |
+
action : htrp_params.text_domain+'_ajax_plugin_activation',
|
94 |
+
location : $plugindata['location'],
|
95 |
+
},
|
96 |
+
} ).done( function( result ) {
|
97 |
+
if ( result.success ) {
|
98 |
+
$message.removeClass( 'button-primary install-now activate-now updating-message' )
|
99 |
+
.attr( 'disabled', 'disabled' )
|
100 |
+
.addClass( 'disabled' )
|
101 |
+
.text( htrp_params.buttontxt.active );
|
102 |
+
|
103 |
+
} else {
|
104 |
+
$message.removeClass( 'updating-message' );
|
105 |
+
}
|
106 |
+
|
107 |
+
});
|
108 |
+
|
109 |
+
}, 1200 );
|
110 |
+
|
111 |
+
},
|
112 |
+
|
113 |
+
/**
|
114 |
+
* Plugin Activate
|
115 |
+
*/
|
116 |
+
activatePlugin: function( e, response ) {
|
117 |
+
e.preventDefault();
|
118 |
+
|
119 |
+
var $button = $( e.target ),
|
120 |
+
$plugindata = $button.data('pluginopt');
|
121 |
+
|
122 |
+
if ( $button.hasClass( 'updating-message' ) || $button.hasClass( 'button-disabled' ) ) {
|
123 |
+
return;
|
124 |
+
}
|
125 |
+
|
126 |
+
$button.addClass( 'updating-message button-primary' ).html( htrp_params.buttontxt.activating );
|
127 |
+
|
128 |
+
$.ajax( {
|
129 |
+
url: htrp_params.ajaxurl,
|
130 |
+
type: 'POST',
|
131 |
+
data: {
|
132 |
+
action : htrp_params.text_domain+'_ajax_plugin_activation',
|
133 |
+
location : $plugindata['location'],
|
134 |
+
},
|
135 |
+
}).done( function( response ) {
|
136 |
+
if ( response.success ) {
|
137 |
+
$button.removeClass( 'button-primary install-now activate-now updating-message' )
|
138 |
+
.attr( 'disabled', 'disabled' )
|
139 |
+
.addClass( 'disabled' )
|
140 |
+
.text( htrp_params.buttontxt.active );
|
141 |
+
}
|
142 |
+
});
|
143 |
+
|
144 |
+
},
|
145 |
+
|
146 |
+
|
147 |
+
};
|
148 |
+
|
149 |
+
/**
|
150 |
+
* Initialize PluginInstallManager
|
151 |
+
*/
|
152 |
+
$( document ).ready( function() {
|
153 |
+
PluginInstallManager.init();
|
154 |
+
});
|
155 |
+
|
156 |
+
} )( jQuery );
|
includes/recommended-plugins/class.recommended-plugins.php
ADDED
@@ -0,0 +1,418 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Hasthemes\HTMega_Builder;
|
3 |
+
|
4 |
+
/**
|
5 |
+
* Recommended Plugins handlers class
|
6 |
+
* @version 1.0.2
|
7 |
+
*/
|
8 |
+
class HTRP_Recommended_Plugins {
|
9 |
+
|
10 |
+
/**
|
11 |
+
* [$_instance]
|
12 |
+
* @var null
|
13 |
+
*/
|
14 |
+
private static $_instance = null;
|
15 |
+
|
16 |
+
/**
|
17 |
+
* [$plugins_allowedtags] allow tag
|
18 |
+
* @var array
|
19 |
+
*/
|
20 |
+
public $plugins_allowedtags = array(
|
21 |
+
'a' => array(
|
22 |
+
'href' => array(),
|
23 |
+
'title' => array(),
|
24 |
+
'target' => array(),
|
25 |
+
),
|
26 |
+
'abbr' => array( 'title' => array() ),
|
27 |
+
'acronym' => array( 'title' => array() ),
|
28 |
+
'code' => array(),
|
29 |
+
'pre' => array(),
|
30 |
+
'em' => array(),
|
31 |
+
'strong' => array(),
|
32 |
+
'ul' => array(),
|
33 |
+
'ol' => array(),
|
34 |
+
'li' => array(),
|
35 |
+
'p' => array(),
|
36 |
+
'br' => array(),
|
37 |
+
);
|
38 |
+
|
39 |
+
/**
|
40 |
+
* Veriable Initialize
|
41 |
+
*/
|
42 |
+
public $text_domain = '';
|
43 |
+
public $parent_menu_slug = '';
|
44 |
+
public $menu_label = '';
|
45 |
+
public $menu_page_slug = '';
|
46 |
+
public $menu_capability = '';
|
47 |
+
public $priority = '';
|
48 |
+
public $hook_suffix = '';
|
49 |
+
public $assets_url = '';
|
50 |
+
public $tab_list = [];
|
51 |
+
|
52 |
+
/**
|
53 |
+
* [instance] Initializes a singleton instance
|
54 |
+
* @return [Recommended_Plugins]
|
55 |
+
*/
|
56 |
+
public static function instance( $args = [] ) {
|
57 |
+
if ( is_null( self::$_instance ) ) {
|
58 |
+
self::$_instance = new self( $args );
|
59 |
+
}
|
60 |
+
return self::$_instance;
|
61 |
+
}
|
62 |
+
|
63 |
+
/**
|
64 |
+
* [__construct] Class construct
|
65 |
+
*/
|
66 |
+
function __construct( $args ) {
|
67 |
+
|
68 |
+
// Initialize properties
|
69 |
+
$this->text_domain = !empty( $args['text_domain'] ) ? $args['text_domain'] : 'htrp';
|
70 |
+
$this->parent_menu_slug = !empty( $args['parent_menu_slug'] ) ? $args['parent_menu_slug'] : 'plugins.php';
|
71 |
+
$this->menu_label = !empty( $args['menu_label'] ) ? $args['menu_label'] : esc_html__( 'Recommendations', $this->text_domain );
|
72 |
+
$this->menu_capability = !empty( $args['menu_capability'] ) ? $args['menu_capability'] : 'manage_options';
|
73 |
+
$this->menu_page_slug = !empty( $args['menu_page_slug'] ) ? $args['menu_page_slug'] : $this->text_domain . '_extensions';
|
74 |
+
$this->priority = !empty( $args['priority'] ) ? $args['priority'] : 100;
|
75 |
+
$this->hook_suffix = !empty( $args['hook_suffix'] ) ? $args['hook_suffix'] : '';
|
76 |
+
$this->assets_url = !empty( $args['assets_url'] ) ? $args['assets_url'] : plugins_url( 'assets', __FILE__ );
|
77 |
+
$this->tab_list = !empty( $args['tab_list'] ) ? $args['assets_url'] : [];
|
78 |
+
|
79 |
+
|
80 |
+
add_action( 'admin_menu', [ $this, 'admin_menu' ], $this->priority );
|
81 |
+
add_action( 'admin_enqueue_scripts', [ $this, 'enqueue_assets' ] );
|
82 |
+
|
83 |
+
// Ajax Action
|
84 |
+
add_action( 'wp_ajax_'.$this->text_domain.'_ajax_plugin_activation', [ $this, 'plugin_activation' ] );
|
85 |
+
|
86 |
+
}
|
87 |
+
|
88 |
+
/**
|
89 |
+
* [admin_menu] Add Recommended Menu
|
90 |
+
* @return [void]
|
91 |
+
*/
|
92 |
+
public function admin_menu(){
|
93 |
+
add_submenu_page(
|
94 |
+
$this->parent_menu_slug,
|
95 |
+
$this->menu_label,
|
96 |
+
$this->menu_label,
|
97 |
+
$this->menu_capability,
|
98 |
+
$this->menu_page_slug,
|
99 |
+
[ $this, 'render_html' ]
|
100 |
+
);
|
101 |
+
}
|
102 |
+
|
103 |
+
/**
|
104 |
+
* [enqueue_assets]
|
105 |
+
* @param [string] $hook_suffix Current page hook
|
106 |
+
* @return [void]
|
107 |
+
*/
|
108 |
+
public function enqueue_assets( $hook_suffix ) {
|
109 |
+
if( $this->hook_suffix ){
|
110 |
+
if( $this->hook_suffix == $hook_suffix ){
|
111 |
+
add_thickbox();
|
112 |
+
wp_enqueue_script( 'htrp-plugin-install-manager', $this->assets_url . '/js/plugins_install_manager.js', array('jquery','wp-util', 'updates'), '1.0.0', true );
|
113 |
+
}
|
114 |
+
} else {
|
115 |
+
add_thickbox();
|
116 |
+
wp_enqueue_script( 'htrp-plugin-install-manager', $this->assets_url . '/js/plugins_install_manager.js', array('jquery','wp-util', 'updates'), '1.0.0', true );
|
117 |
+
}
|
118 |
+
|
119 |
+
$localize_vars['ajaxurl'] = admin_url('admin-ajax.php');
|
120 |
+
$localize_vars['text_domain'] = sanitize_title_with_dashes( $this->text_domain );
|
121 |
+
$localize_vars['buttontxt'] = array(
|
122 |
+
'buynow' => esc_html__( 'Buy Now', $this->text_domain ),
|
123 |
+
'preview' => esc_html__( 'Preview', $this->text_domain ),
|
124 |
+
'installing' => esc_html__( 'Installing..', $this->text_domain ),
|
125 |
+
'activating' => esc_html__( 'Activating..', $this->text_domain ),
|
126 |
+
'active' => esc_html__( 'Activated', $this->text_domain ),
|
127 |
+
);
|
128 |
+
wp_localize_script( 'htrp-plugin-install-manager', 'htrp_params', $localize_vars );
|
129 |
+
|
130 |
+
}
|
131 |
+
|
132 |
+
/**
|
133 |
+
* [add_new_tab]
|
134 |
+
* @param [void] set tab content
|
135 |
+
*/
|
136 |
+
public function add_new_tab( $tab_list ){
|
137 |
+
$this->tab_list[] = $tab_list;
|
138 |
+
}
|
139 |
+
|
140 |
+
/**
|
141 |
+
* [render_html]
|
142 |
+
* @return [void] Render HTML
|
143 |
+
*/
|
144 |
+
public function render_html(){
|
145 |
+
if ( ! function_exists('plugins_api') ){ include_once( ABSPATH . 'wp-admin/includes/plugin-install.php' ); }
|
146 |
+
|
147 |
+
$htplugins_plugin_list = $this->get_plugins();
|
148 |
+
$palscode_plugin_list = $this->get_plugins( 'moveaddons' );
|
149 |
+
|
150 |
+
$plugin_list = array_merge( $htplugins_plugin_list, $palscode_plugin_list );
|
151 |
+
|
152 |
+
$prepare_plugin = array();
|
153 |
+
foreach ( $plugin_list as $plugin_key => $plugin ) {
|
154 |
+
$prepare_plugin[$plugin['slug']] = $plugin;
|
155 |
+
}
|
156 |
+
|
157 |
+
?>
|
158 |
+
<div class="wrap">
|
159 |
+
<h2><?php echo get_admin_page_title(); ?></h2>
|
160 |
+
<style>
|
161 |
+
.htrp-admin-tab-pane{
|
162 |
+
display: none;
|
163 |
+
}
|
164 |
+
.htrp-admin-tab-pane.htrp-active{
|
165 |
+
display: block;
|
166 |
+
}
|
167 |
+
.htrp-extension-admin-tab-area .filter-links li>a:focus, .htrp-extension-admin-tab-area .filter-links li>a:hover {
|
168 |
+
color: inherit;
|
169 |
+
box-shadow: none;
|
170 |
+
}
|
171 |
+
.filter-links .htrp-active{
|
172 |
+
box-shadow: none;
|
173 |
+
border-bottom: 4px solid #646970;
|
174 |
+
color: #1d2327;
|
175 |
+
}
|
176 |
+
.downloaded-count{
|
177 |
+
display: block;
|
178 |
+
margin-top:5px;
|
179 |
+
}
|
180 |
+
</style>
|
181 |
+
|
182 |
+
<div class="htrp-extension-admin-tab-area wp-filter">
|
183 |
+
<ul class="htrp-admin-tabs filter-links">
|
184 |
+
<?php
|
185 |
+
foreach( $this->tab_list as $tab ){
|
186 |
+
$active_class = isset( $tab['active'] ) && $tab['active'] ? 'htrp-active' : '';
|
187 |
+
?>
|
188 |
+
<li>
|
189 |
+
<a href="#<?php echo esc_attr( sanitize_title_with_dashes( $tab['title'] ) ) ?>" class="<?php echo esc_attr( $active_class ) ?>"><?php echo esc_html( $tab['title'] ) ?></a>
|
190 |
+
</li>
|
191 |
+
<?php
|
192 |
+
}
|
193 |
+
?>
|
194 |
+
</ul>
|
195 |
+
</div>
|
196 |
+
|
197 |
+
<?php
|
198 |
+
$plugins_type = '';
|
199 |
+
foreach( $this->tab_list as $tab ):
|
200 |
+
|
201 |
+
$active_class = isset( $tab['active'] ) && $tab['active'] ? 'htrp-active' : '';
|
202 |
+
$plugins = $tab['plugins'];
|
203 |
+
|
204 |
+
echo '<div id="'.esc_attr( sanitize_title_with_dashes( $tab['title'] ) ).'" class="htrp-admin-tab-pane '.esc_attr( $active_class ).'">';
|
205 |
+
foreach( $plugins as $plugin ):
|
206 |
+
|
207 |
+
$data = array(
|
208 |
+
'slug' => isset( $plugin['slug'] ) ? $plugin['slug'] : '',
|
209 |
+
'location' => isset( $plugin['location'] ) ? $plugin['slug'].'/'.$plugin['location'] : '',
|
210 |
+
'name' => isset( $plugin['name'] ) ? $plugin['name'] : '',
|
211 |
+
);
|
212 |
+
$title = wp_kses( $plugin['name'], $this->plugins_allowedtags );
|
213 |
+
|
214 |
+
if( array_key_exists( $plugin['slug'], $prepare_plugin ) ){
|
215 |
+
$plugins_type = 'free';
|
216 |
+
$image_url = $this->plugin_icon( $plugins_type, $prepare_plugin[$data['slug']]['icons'] );
|
217 |
+
$description = strip_tags( $prepare_plugin[$data['slug']]['description'] );
|
218 |
+
$author_name = wp_kses( $prepare_plugin[$data['slug']]['author'], $this->plugins_allowedtags );
|
219 |
+
$details_link = self_admin_url('plugin-install.php?tab=plugin-information&plugin=' . $plugin['slug'] .'&TB_iframe=true&width=772&height=577');
|
220 |
+
$target = '_self';
|
221 |
+
$modal_class = 'class="thickbox open-plugin-details-modal"';
|
222 |
+
|
223 |
+
}else{
|
224 |
+
$plugins_type = 'pro';
|
225 |
+
$image_url = $this->plugin_icon( $plugins_type, $plugin['slug'] );
|
226 |
+
$description = $plugin['description'];
|
227 |
+
$author_name = esc_html__( 'HasTheme', $this->text_domain );
|
228 |
+
$author_link = $plugin['author_link'];
|
229 |
+
$details_link = $plugin['link'];
|
230 |
+
$button_text = esc_html__('Buy Now', $this->text_domain );
|
231 |
+
$button_classes = 'button button-primary';
|
232 |
+
$target = '_blank';
|
233 |
+
$modal_class = '';
|
234 |
+
}
|
235 |
+
|
236 |
+
if ( ! is_wp_error( $data ) ):
|
237 |
+
|
238 |
+
// Installed but Inactive.
|
239 |
+
if ( file_exists( WP_PLUGIN_DIR . '/' . $data['location'] ) && is_plugin_inactive( $data['location'] ) ) {
|
240 |
+
|
241 |
+
$button_classes = 'button activate-now button-primary';
|
242 |
+
$button_text = esc_html__( 'Activate', $this->text_domain );
|
243 |
+
|
244 |
+
// Not Installed.
|
245 |
+
} elseif ( ! file_exists( WP_PLUGIN_DIR . '/' . $data['location'] ) ) {
|
246 |
+
|
247 |
+
$button_classes = 'button install-now';
|
248 |
+
$button_text = esc_html__( 'Install Now', $this->text_domain );
|
249 |
+
|
250 |
+
// Active.
|
251 |
+
} else {
|
252 |
+
$button_classes = 'button disabled';
|
253 |
+
$button_text = esc_html__( 'Activated', $this->text_domain );
|
254 |
+
}
|
255 |
+
|
256 |
+
?>
|
257 |
+
<div class="plugin-card htrp-plugin-<?php echo sanitize_html_class( $plugin['slug'] ); ?>">
|
258 |
+
<div class="plugin-card-top">
|
259 |
+
<div class="name column-name" style="margin-right: 0;">
|
260 |
+
<h3>
|
261 |
+
<a href="<?php echo esc_url( $details_link ) ?>" target="<?php echo esc_attr( $target ) ?>" <?php echo $modal_class; ?>>
|
262 |
+
<?php echo esc_html( $title ) ?>
|
263 |
+
<img src="<?php echo esc_url( $image_url ) ?>" class="plugin-icon" alt="<?php echo esc_attr( $title ) ?>">
|
264 |
+
</a>
|
265 |
+
</h3>
|
266 |
+
</div>
|
267 |
+
<div class="desc column-description" style="margin-right: 0;">
|
268 |
+
<p><?php echo wp_trim_words( $description, 23, '....'); ?></p>
|
269 |
+
<p class="authors">
|
270 |
+
<cite><?php echo esc_html__( 'By ', $this->text_domain ); ?>
|
271 |
+
<?php if( $plugins_type == 'free' ): ?>
|
272 |
+
<?php echo $author_name; ?>
|
273 |
+
<?php else: ?>
|
274 |
+
<a href="<?php echo esc_url( $author_link ); ?>" target="_blank" ><?php echo $author_name; ?></a>
|
275 |
+
<?php endif; ?>
|
276 |
+
</cite>
|
277 |
+
</p>
|
278 |
+
</div>
|
279 |
+
</div>
|
280 |
+
<div class="plugin-card-bottom">
|
281 |
+
<div class="column-updated">
|
282 |
+
<?php
|
283 |
+
if (! file_exists( WP_PLUGIN_DIR . '/' . $data['location'] ) && $plugins_type == 'pro' ) {
|
284 |
+
echo '<a class="button button-primary" href="'.esc_url( $details_link ).'" target="'.esc_attr( $target ).'">'.esc_html__( 'Buy Now', $this->text_domain ).'</a>';
|
285 |
+
}else{
|
286 |
+
?>
|
287 |
+
<button class="<?php echo $button_classes; ?>" data-pluginopt='<?php echo wp_json_encode( $data ); ?>'><?php echo $button_text; ?></button>
|
288 |
+
|
289 |
+
<?php } ?>
|
290 |
+
</div>
|
291 |
+
<div class="column-downloaded">
|
292 |
+
<a href="<?php echo esc_url( $details_link ) ?>" target="<?php echo esc_attr( $target ) ?>" <?php echo $modal_class; ?>><?php echo esc_html__('More Details', $this->text_domain) ?></a>
|
293 |
+
<span class="downloaded-count">
|
294 |
+
<?php
|
295 |
+
if( $plugins_type == 'free' ){
|
296 |
+
/* translators: %s: Number of installations. */
|
297 |
+
printf( __( '%s Active Installations' ), $this->active_install_count( $prepare_plugin[$data['slug']]['active_installs'] ) );
|
298 |
+
}
|
299 |
+
?>
|
300 |
+
</span>
|
301 |
+
</div>
|
302 |
+
</div>
|
303 |
+
</div>
|
304 |
+
<?php
|
305 |
+
endif;
|
306 |
+
endforeach;
|
307 |
+
echo '</div>';
|
308 |
+
|
309 |
+
endforeach;
|
310 |
+
?>
|
311 |
+
|
312 |
+
</div>
|
313 |
+
<?php
|
314 |
+
|
315 |
+
}
|
316 |
+
|
317 |
+
/**
|
318 |
+
* [get_plugins] Get plugin from wp.org API
|
319 |
+
* @param string $username wo.org username
|
320 |
+
* @return [array] plugin list
|
321 |
+
*/
|
322 |
+
public function get_plugins( $username = 'htplugins' ){
|
323 |
+
$transient_var = 'htrp_htplugins_list_'.$username;
|
324 |
+
$org_plugins_list = get_transient( $transient_var );
|
325 |
+
|
326 |
+
if ( false === $org_plugins_list ) {
|
327 |
+
$plugins_list_by_author = plugins_api( 'query_plugins', array( 'author' => $username, 'per_page' => 100 ) );
|
328 |
+
set_transient( $transient_var, $plugins_list_by_author->plugins, 1 * WEEK_IN_SECONDS );
|
329 |
+
$org_plugins_list = $plugins_list_by_author->plugins;
|
330 |
+
}
|
331 |
+
|
332 |
+
return $org_plugins_list;
|
333 |
+
}
|
334 |
+
|
335 |
+
/**
|
336 |
+
* [plugin_icon] Generate plugin icon
|
337 |
+
* @param string $type plugin type
|
338 |
+
* @param [array|string] $icon
|
339 |
+
* @return [URL] icon URL
|
340 |
+
*/
|
341 |
+
public function plugin_icon( $type, $icon ){
|
342 |
+
if( $type === 'free' ){
|
343 |
+
if ( ! empty( $icon['svg'] ) ) {
|
344 |
+
$plugin_icon_url = $icon['svg'];
|
345 |
+
} elseif ( ! empty( $icon['2x'] ) ) {
|
346 |
+
$plugin_icon_url = $icon['2x'];
|
347 |
+
} elseif ( ! empty( $icon['1x'] ) ) {
|
348 |
+
$plugin_icon_url = $icon['1x'];
|
349 |
+
} else {
|
350 |
+
$plugin_icon_url = $icon['default'];
|
351 |
+
}
|
352 |
+
}else{
|
353 |
+
$plugin_icon_url = $this->assets_url .'/images/extensions/'.$icon.'.png';
|
354 |
+
}
|
355 |
+
|
356 |
+
return $plugin_icon_url;
|
357 |
+
|
358 |
+
}
|
359 |
+
|
360 |
+
/**
|
361 |
+
* [active_install_count] Manage Active install count
|
362 |
+
* @param [int] $active_installs
|
363 |
+
* @return [string]
|
364 |
+
*/
|
365 |
+
public function active_install_count( $active_installs ){
|
366 |
+
|
367 |
+
if ( $active_installs >= 1000000 ) {
|
368 |
+
$active_installs_millions = floor( $active_installs / 1000000 );
|
369 |
+
$active_installs_text = sprintf(
|
370 |
+
/* translators: %s: Number of millions. */
|
371 |
+
_nx( '%s+ Million', '%s+ Million', $active_installs_millions, 'Active plugin installations' ),
|
372 |
+
number_format_i18n( $active_installs_millions )
|
373 |
+
);
|
374 |
+
} elseif ( 0 === $active_installs ) {
|
375 |
+
$active_installs_text = _x( 'Less Than 10', 'Active plugin installations' );
|
376 |
+
} else {
|
377 |
+
$active_installs_text = number_format_i18n( $active_installs ) . '+';
|
378 |
+
}
|
379 |
+
return $active_installs_text;
|
380 |
+
|
381 |
+
}
|
382 |
+
|
383 |
+
/**
|
384 |
+
* [plugin_activation] Plugin activation ajax callable function
|
385 |
+
* @return [JSON]
|
386 |
+
*/
|
387 |
+
public function plugin_activation() {
|
388 |
+
|
389 |
+
if ( ! current_user_can( 'install_plugins' ) || ! isset( $_POST['location'] ) || ! $_POST['location'] ) {
|
390 |
+
wp_send_json_error(
|
391 |
+
array(
|
392 |
+
'success' => false,
|
393 |
+
'message' => esc_html__( 'Plugin Not Found', $this->text_domain ),
|
394 |
+
)
|
395 |
+
);
|
396 |
+
}
|
397 |
+
|
398 |
+
$plugin_location = ( isset( $_POST['location'] ) ) ? esc_attr( $_POST['location'] ) : '';
|
399 |
+
$activate = activate_plugin( $plugin_location, '', false, true );
|
400 |
+
|
401 |
+
if ( is_wp_error( $activate ) ) {
|
402 |
+
wp_send_json_error(
|
403 |
+
array(
|
404 |
+
'success' => false,
|
405 |
+
'message' => $activate->get_error_message(),
|
406 |
+
)
|
407 |
+
);
|
408 |
+
}
|
409 |
+
|
410 |
+
wp_send_json_success(
|
411 |
+
array(
|
412 |
+
'success' => true,
|
413 |
+
'message' => esc_html__( 'Plugin Successfully Activated', $this->text_domain ),
|
414 |
+
)
|
415 |
+
);
|
416 |
+
|
417 |
+
}
|
418 |
+
}
|
includes/recommended-plugins/recommended-plugins.php
ADDED
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Constructor Parameters
|
4 |
+
*
|
5 |
+
* @param string $text_domain your plugin text domain.
|
6 |
+
* @param string $parent_menu_slug the menu slug name where the "Recommendations" submenu will appear.
|
7 |
+
* @param string $submenu_label To change the submenu name.
|
8 |
+
* @param string $submenu_page_name an unique page name for the submenu.
|
9 |
+
* @param int $priority Submenu priority adjust.
|
10 |
+
* @param string $hook_suffix use it to load this library assets only to the recommedded plugins page. Not into the whol admin area.
|
11 |
+
*
|
12 |
+
*/
|
13 |
+
|
14 |
+
if( class_exists('Hasthemes\HTMega_Builder\HTRP_Recommended_Plugins') ){
|
15 |
+
$recommendations = new Hasthemes\HTMega_Builder\HTRP_Recommended_Plugins(
|
16 |
+
array(
|
17 |
+
'text_domain' => 'htmega-addons',
|
18 |
+
'parent_menu_slug' => 'htmega_addons_option_page',
|
19 |
+
'menu_capability' => 'manage_options',
|
20 |
+
'menu_page_slug' => '',
|
21 |
+
'priority' => 300,
|
22 |
+
'assets_url' => '',
|
23 |
+
'hook_suffix' => '',
|
24 |
+
)
|
25 |
+
);
|
26 |
+
|
27 |
+
$recommendations->add_new_tab(array(
|
28 |
+
'title' => esc_html__( 'Recommended Plugins', 'htmega-addons' ),
|
29 |
+
'plugins_type' => 'free',
|
30 |
+
'active' => true,
|
31 |
+
'plugins' => array(
|
32 |
+
array(
|
33 |
+
'slug' => 'move-addons',
|
34 |
+
'location' => 'move-addons.php',
|
35 |
+
'name' => esc_html__( 'Move Addons for Elementor', 'htmega-addons' )
|
36 |
+
),
|
37 |
+
array(
|
38 |
+
'slug' => 'woolentor-addons',
|
39 |
+
'location' => 'woolentor_addons_elementor.php',
|
40 |
+
'name' => esc_html__( 'WooLentor – WooCommerce Elementor Addons + Builder', 'htmega-addons' )
|
41 |
+
),
|
42 |
+
array(
|
43 |
+
'slug' => 'hashbar-wp-notification-bar',
|
44 |
+
'location' => 'init.php',
|
45 |
+
'name' => esc_html__( 'Notification Bar for WordPress', 'htmega-addons' )
|
46 |
+
),
|
47 |
+
)
|
48 |
+
));
|
49 |
+
|
50 |
+
$recommendations->add_new_tab(array(
|
51 |
+
'title' => esc_html__( 'Other Plugins', 'htmega-addons' ),
|
52 |
+
'plugins_type' => 'free',
|
53 |
+
'plugins' => array(
|
54 |
+
array(
|
55 |
+
'slug' => 'extensions-for-cf7',
|
56 |
+
'location' => 'extensions-for-cf7.php',
|
57 |
+
'name' => esc_html__( 'Contact form 7 Extensions', 'htmega-addons' )
|
58 |
+
),
|
59 |
+
array(
|
60 |
+
'slug' => 'ht-easy-google-analytics',
|
61 |
+
'location' => 'ht-easy-google-analytics.php',
|
62 |
+
'name' => esc_html__( 'HT Easy GA4 ( Google Analytics 4 )', 'htmega-addons' )
|
63 |
+
),
|
64 |
+
array(
|
65 |
+
'slug' => 'wp-plugin-manager',
|
66 |
+
'location' => 'plugin-main.php',
|
67 |
+
'name' => esc_html__( 'WP Plugin Manager', 'htmega-addons' )
|
68 |
+
),
|
69 |
+
array(
|
70 |
+
'slug' => 'ht-contactform',
|
71 |
+
'location' => 'contact-form-widget-elementor.php',
|
72 |
+
'name' => esc_html__( 'HT Contact Form 7', 'htmega-addons' )
|
73 |
+
),
|
74 |
+
array(
|
75 |
+
'slug' => 'ht-wpform',
|
76 |
+
'location' => 'wpform-widget-elementor.php',
|
77 |
+
'name' => esc_html__( 'HT WPForms', 'htmega-addons' )
|
78 |
+
),
|
79 |
+
array(
|
80 |
+
'slug' => 'wishsuite',
|
81 |
+
'location' => 'wishsuite.php',
|
82 |
+
'name' => esc_html__( 'WishSuite', 'htmega-addons' )
|
83 |
+
),
|
84 |
+
)
|
85 |
+
));
|
86 |
+
}
|
includes/widgets/htmega_carousel.php
CHANGED
@@ -794,6 +794,9 @@ class HTMega_Elementor_Widget_Carousel extends Widget_Base {
|
|
794 |
// Carousel Attribute
|
795 |
$this->add_render_attribute( 'htmega_carosul_attr', 'class', 'ht-custom-carousel' );
|
796 |
if( $settings['slider_on'] == 'yes' ){
|
|
|
|
|
|
|
797 |
$this->add_render_attribute( 'htmega_carosul_attr', 'class', 'htmega-carousel-activation htmega-carousel-style-'.$settings['image_carosul_style'] );
|
798 |
|
799 |
$slider_settings = [
|
794 |
// Carousel Attribute
|
795 |
$this->add_render_attribute( 'htmega_carosul_attr', 'class', 'ht-custom-carousel' );
|
796 |
if( $settings['slider_on'] == 'yes' ){
|
797 |
+
$direction = is_rtl() ? 'rtl' : 'ltr';
|
798 |
+
$this->add_render_attribute( 'htmega_carosul_attr', 'dir', $direction );
|
799 |
+
|
800 |
$this->add_render_attribute( 'htmega_carosul_attr', 'class', 'htmega-carousel-activation htmega-carousel-style-'.$settings['image_carosul_style'] );
|
801 |
|
802 |
$slider_settings = [
|
includes/widgets/htmega_cuctom_event.php
CHANGED
@@ -517,7 +517,7 @@ class HTMega_Elementor_Widget_Custom_Event extends Widget_Base {
|
|
517 |
<ul class="event-time">
|
518 |
<?php
|
519 |
if( !empty( $settings['event_time'] ) ){
|
520 |
-
echo '<li><i class="fa fa-clock-o"></i>'.date_format( $eventdate,"
|
521 |
}
|
522 |
if( !empty( $settings['event_location'] ) ){
|
523 |
echo '<li><i class="fa fa-map-marker""></i>'.esc_html__( $settings['event_location'], 'htmega-addons' ).'</li>';
|
517 |
<ul class="event-time">
|
518 |
<?php
|
519 |
if( !empty( $settings['event_time'] ) ){
|
520 |
+
echo '<li><i class="fa fa-clock-o"></i>'.date_format( $eventdate,"h:i a" ).'</li>';
|
521 |
}
|
522 |
if( !empty( $settings['event_location'] ) ){
|
523 |
echo '<li><i class="fa fa-map-marker""></i>'.esc_html__( $settings['event_location'], 'htmega-addons' ).'</li>';
|
includes/widgets/htmega_instagram.php
CHANGED
@@ -1324,6 +1324,9 @@ class HTMega_Elementor_Widget_Instagram extends Widget_Base {
|
|
1324 |
// Instagram Attribute
|
1325 |
$this->add_render_attribute( 'instagram_attr', 'class', 'htmega-instagram-list' );
|
1326 |
if( $settings['slider_on'] == 'yes' ){
|
|
|
|
|
|
|
1327 |
$this->add_render_attribute( 'instagram_attr', 'class', 'htmega-carousel-activation' );
|
1328 |
|
1329 |
$slider_settings = [
|
1324 |
// Instagram Attribute
|
1325 |
$this->add_render_attribute( 'instagram_attr', 'class', 'htmega-instagram-list' );
|
1326 |
if( $settings['slider_on'] == 'yes' ){
|
1327 |
+
$direction = is_rtl() ? 'rtl' : 'ltr';
|
1328 |
+
$this->add_render_attribute( 'instagram_attr', 'dir', $direction );
|
1329 |
+
|
1330 |
$this->add_render_attribute( 'instagram_attr', 'class', 'htmega-carousel-activation' );
|
1331 |
|
1332 |
$slider_settings = [
|
includes/widgets/htmega_panel_slider.php
CHANGED
@@ -1015,6 +1015,9 @@ class HTMega_Elementor_Widget_Panel_Slider extends Widget_Base {
|
|
1015 |
// Slider options
|
1016 |
if( $settings['slider_on'] == 'yes' ){
|
1017 |
|
|
|
|
|
|
|
1018 |
$this->add_render_attribute( 'htmega_panel_slider_attr', 'class', 'panel-slider-wrapper htmega-carousel-activation' );
|
1019 |
|
1020 |
$slider_settings = [
|
1015 |
// Slider options
|
1016 |
if( $settings['slider_on'] == 'yes' ){
|
1017 |
|
1018 |
+
$direction = is_rtl() ? 'rtl' : 'ltr';
|
1019 |
+
$this->add_render_attribute( 'htmega_panel_slider_attr', 'dir', $direction );
|
1020 |
+
|
1021 |
$this->add_render_attribute( 'htmega_panel_slider_attr', 'class', 'panel-slider-wrapper htmega-carousel-activation' );
|
1022 |
|
1023 |
$slider_settings = [
|
includes/widgets/htmega_post_carousel.php
CHANGED
@@ -1589,6 +1589,9 @@ class HTMega_Elementor_Widget_Post_Carousel extends Widget_Base {
|
|
1589 |
// Slider options
|
1590 |
if( $settings['slider_on'] == 'yes' ){
|
1591 |
|
|
|
|
|
|
|
1592 |
$this->add_render_attribute( 'htmega_post_slider_attr', 'class', 'htmega-carousel-activation' );
|
1593 |
|
1594 |
$slider_settings = [
|
1589 |
// Slider options
|
1590 |
if( $settings['slider_on'] == 'yes' ){
|
1591 |
|
1592 |
+
$direction = is_rtl() ? 'rtl' : 'ltr';
|
1593 |
+
$this->add_render_attribute( 'htmega_post_slider_attr', 'dir', $direction );
|
1594 |
+
|
1595 |
$this->add_render_attribute( 'htmega_post_slider_attr', 'class', 'htmega-carousel-activation' );
|
1596 |
|
1597 |
$slider_settings = [
|
includes/widgets/htmega_post_slider.php
CHANGED
@@ -1569,6 +1569,8 @@ class HTMega_Elementor_Widget_Post_Slider extends Widget_Base {
|
|
1569 |
// Slider options
|
1570 |
if( $settings['slider_on'] == 'yes' ){
|
1571 |
|
|
|
|
|
1572 |
$this->add_render_attribute( 'htmega_post_slider_attr', 'class', 'htmega-carousel-activation htmega-arrow-'.$settings['post_slider_arrow_style'] );
|
1573 |
|
1574 |
$slider_settings = [
|
1569 |
// Slider options
|
1570 |
if( $settings['slider_on'] == 'yes' ){
|
1571 |
|
1572 |
+
$direction = is_rtl() ? 'rtl' : 'ltr';
|
1573 |
+
$this->add_render_attribute( 'htmega_post_slider_attr', 'dir', $direction );
|
1574 |
$this->add_render_attribute( 'htmega_post_slider_attr', 'class', 'htmega-carousel-activation htmega-arrow-'.$settings['post_slider_arrow_style'] );
|
1575 |
|
1576 |
$slider_settings = [
|
includes/widgets/htmega_slider_thumb_gallery.php
CHANGED
@@ -1090,6 +1090,8 @@ class HTMega_Elementor_Widget_Slider_Thumb_Gallery extends Widget_Base {
|
|
1090 |
$this->add_render_attribute( 'htmega_thumbnail_sliderarea_attr', 'class', 'htmega-sliderarea htmega-thumbnails-style-'.$settings['sliderthumbnails_style'] );
|
1091 |
|
1092 |
// Slider options
|
|
|
|
|
1093 |
$this->add_render_attribute( 'htmega_thumbnails_slider_attr', 'class', 'htmega-thumbgallery-for htmega-arrow-'.$settings['sliderthumbnails_style'] );
|
1094 |
|
1095 |
$slider_settings = [
|
1090 |
$this->add_render_attribute( 'htmega_thumbnail_sliderarea_attr', 'class', 'htmega-sliderarea htmega-thumbnails-style-'.$settings['sliderthumbnails_style'] );
|
1091 |
|
1092 |
// Slider options
|
1093 |
+
$direction = is_rtl() ? 'rtl' : 'ltr';
|
1094 |
+
$this->add_render_attribute( 'htmega_thumbnails_slider_attr', 'dir', $direction );
|
1095 |
$this->add_render_attribute( 'htmega_thumbnails_slider_attr', 'class', 'htmega-thumbgallery-for htmega-arrow-'.$settings['sliderthumbnails_style'] );
|
1096 |
|
1097 |
$slider_settings = [
|
includes/widgets/htmega_twitter_feed.php
CHANGED
@@ -1276,6 +1276,9 @@ class HTMega_Elementor_Widget_Twitter_Feed extends Widget_Base {
|
|
1276 |
|
1277 |
|
1278 |
if( $settings['slider_on'] == 'yes' ){
|
|
|
|
|
|
|
1279 |
$this->add_render_attribute( 'htmega_twitter_attr', 'class', 'htmega-carousel-activation' );
|
1280 |
$slider_settings = [
|
1281 |
'arrows' => ('yes' === $settings['slarrows']),
|
1276 |
|
1277 |
|
1278 |
if( $settings['slider_on'] == 'yes' ){
|
1279 |
+
$direction = is_rtl() ? 'rtl' : 'ltr';
|
1280 |
+
$this->add_render_attribute( 'htmega_twitter_attr', 'dir', $direction );
|
1281 |
+
|
1282 |
$this->add_render_attribute( 'htmega_twitter_attr', 'class', 'htmega-carousel-activation' );
|
1283 |
$slider_settings = [
|
1284 |
'arrows' => ('yes' === $settings['slarrows']),
|
includes/widgets/htmega_user_login_form.php
CHANGED
@@ -946,7 +946,12 @@ class HTMega_Elementor_Widget_User_Login_Form extends Widget_Base {
|
|
946 |
if ( msg.loggeauth == true ){
|
947 |
$('#htmega_message_<?php echo esc_attr( $id ); ?>').html('<div class="htmega_success_msg alert alert-success">'+ msg.message +'</div>').fadeIn();
|
948 |
if( redirect === 'yes' ){
|
949 |
-
document.location.href
|
|
|
|
|
|
|
|
|
|
|
950 |
}
|
951 |
}else{
|
952 |
$('#htmega_message_<?php echo esc_attr( $id ); ?>').html('<div class="htmega_invalid_msg alert alert-danger">'+ msg.message +'</div>').fadeIn();
|
946 |
if ( msg.loggeauth == true ){
|
947 |
$('#htmega_message_<?php echo esc_attr( $id ); ?>').html('<div class="htmega_success_msg alert alert-success">'+ msg.message +'</div>').fadeIn();
|
948 |
if( redirect === 'yes' ){
|
949 |
+
if(document.location.href == '<?php echo esc_url( $redirect_url ); ?>'){
|
950 |
+
window.location.reload();
|
951 |
+
window.location.reload();
|
952 |
+
} else {
|
953 |
+
document.location.href = '<?php echo esc_url( $redirect_url ); ?>';
|
954 |
+
}
|
955 |
}
|
956 |
}else{
|
957 |
$('#htmega_message_<?php echo esc_attr( $id ); ?>').html('<div class="htmega_invalid_msg alert alert-danger">'+ msg.message +'</div>').fadeIn();
|
readme.txt
CHANGED
@@ -170,6 +170,13 @@ Feel free to [Contact us](https://htplugins.com/contact-us/)
|
|
170 |
Visit [HasThemes](https://hasthemes.com/) for more details about HTML, Shopify and WordPress products and services.
|
171 |
|
172 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
173 |
|
174 |
= Version: 1.5.9 - Date: 2021-05-26 =
|
175 |
* Solved Header already sent issue.
|
170 |
Visit [HasThemes](https://hasthemes.com/) for more details about HTML, Shopify and WordPress products and services.
|
171 |
|
172 |
== Changelog ==
|
173 |
+
= Version: 1.6.1 - Date: 2021-07-17 =
|
174 |
+
* Added recommended plugin
|
175 |
+
* Added RTL support for all slick carousel
|
176 |
+
|
177 |
+
= Version: 1.6.0 - Date: 2021-06-27 =
|
178 |
+
* Fixed custom event addon date
|
179 |
+
* User login form addon reload page for same page
|
180 |
|
181 |
= Version: 1.5.9 - Date: 2021-05-26 =
|
182 |
* Solved Header already sent issue.
|