Version Description
Download this release
Release Info
Code changes from version 1.3.4 to 1.3.5
admin/include/admin-setting.php
CHANGED
@@ -44,8 +44,8 @@ class HTMega_Admin_Settings {
|
|
44 |
|
45 |
add_submenu_page(
|
46 |
'htmega_addons_option_page',
|
47 |
-
|
48 |
-
|
49 |
'manage_options',
|
50 |
'htmega_addons_options',
|
51 |
array ( $this, 'plugin_page' )
|
44 |
|
45 |
add_submenu_page(
|
46 |
'htmega_addons_option_page',
|
47 |
+
esc_html__( 'Settings', 'htmega-addons' ),
|
48 |
+
esc_html__( 'Settings', 'htmega-addons' ),
|
49 |
'manage_options',
|
50 |
'htmega_addons_options',
|
51 |
array ( $this, 'plugin_page' )
|
htmega_addons_elementor.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* Plugin URI: http://demo.wphash.com/htmega/
|
6 |
* Author: HasThemes
|
7 |
* Author URI: https://hasthemes.com/
|
8 |
-
* Version: 1.3.
|
9 |
* License: GPL2
|
10 |
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
11 |
* Text Domain: htmega-addons
|
@@ -13,7 +13,7 @@
|
|
13 |
*/
|
14 |
|
15 |
if( ! defined( 'ABSPATH' ) ) exit(); // Exit if accessed directly
|
16 |
-
define( 'HTMEGA_VERSION', '1.3.
|
17 |
define( 'HTMEGA_ADDONS_PL_ROOT', __FILE__ );
|
18 |
define( 'HTMEGA_ADDONS_PL_URL', plugins_url( '/', HTMEGA_ADDONS_PL_ROOT ) );
|
19 |
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.3.5
|
9 |
* License: GPL2
|
10 |
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
11 |
* Text Domain: htmega-addons
|
13 |
*/
|
14 |
|
15 |
if( ! defined( 'ABSPATH' ) ) exit(); // Exit if accessed directly
|
16 |
+
define( 'HTMEGA_VERSION', '1.3.5' );
|
17 |
define( 'HTMEGA_ADDONS_PL_ROOT', __FILE__ );
|
18 |
define( 'HTMEGA_ADDONS_PL_URL', plugins_url( '/', HTMEGA_ADDONS_PL_ROOT ) );
|
19 |
define( 'HTMEGA_ADDONS_PL_PATH', plugin_dir_path( HTMEGA_ADDONS_PL_ROOT ) );
|
includes/class.htmega.php
CHANGED
@@ -22,7 +22,7 @@ class HTMega_Addons_Elementor {
|
|
22 |
}
|
23 |
|
24 |
public function i18n() {
|
25 |
-
load_plugin_textdomain( 'htmega-addons' );
|
26 |
}
|
27 |
|
28 |
public function init() {
|
22 |
}
|
23 |
|
24 |
public function i18n() {
|
25 |
+
load_plugin_textdomain( 'htmega-addons', false, dirname( plugin_basename( HTMEGA_ADDONS_PL_ROOT ) ) . '/languages/' );
|
26 |
}
|
27 |
|
28 |
public function init() {
|
includes/helper-function.php
CHANGED
@@ -262,6 +262,7 @@ if( !function_exists('htmega_caldera_forms_options') ){
|
|
262 |
global $user;
|
263 |
if ( empty( $user->ID ) ) {
|
264 |
add_action('elementor/init', 'htmega_ajax_login_init' );
|
|
|
265 |
}
|
266 |
|
267 |
/*
|
@@ -285,11 +286,91 @@ function htmega_ajax_login(){
|
|
285 |
if ( is_wp_error($user_signon) ){
|
286 |
echo json_encode( [ 'loggeauth'=>false, 'message'=> esc_html__('Invalid username or password!', 'htmega-addons') ] );
|
287 |
} else {
|
288 |
-
echo json_encode( [ 'loggeauth'=>true, 'message'=> esc_html__('Login
|
289 |
}
|
290 |
wp_die();
|
291 |
}
|
292 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
293 |
/*
|
294 |
* Redirect 404 page select from plugins options
|
295 |
*/
|
262 |
global $user;
|
263 |
if ( empty( $user->ID ) ) {
|
264 |
add_action('elementor/init', 'htmega_ajax_login_init' );
|
265 |
+
add_action( 'elementor/init', 'htmega_ajax_register_init' );
|
266 |
}
|
267 |
|
268 |
/*
|
286 |
if ( is_wp_error($user_signon) ){
|
287 |
echo json_encode( [ 'loggeauth'=>false, 'message'=> esc_html__('Invalid username or password!', 'htmega-addons') ] );
|
288 |
} else {
|
289 |
+
echo json_encode( [ 'loggeauth'=>true, 'message'=> esc_html__('Login Successfully', 'htmega-addons') ] );
|
290 |
}
|
291 |
wp_die();
|
292 |
}
|
293 |
|
294 |
+
/*
|
295 |
+
* wp_ajax_nopriv Register Function
|
296 |
+
*/
|
297 |
+
function htmega_ajax_register_init() {
|
298 |
+
add_action( 'wp_ajax_nopriv_htmega_ajax_register', 'htmega_ajax_register' );
|
299 |
+
}
|
300 |
+
|
301 |
+
/*
|
302 |
+
* Ajax Register Call back
|
303 |
+
*/
|
304 |
+
function htmega_ajax_register(){
|
305 |
+
|
306 |
+
$user_data = array(
|
307 |
+
'user_login' => !empty( $_POST['reg_name'] ) ? $_POST['reg_name']: "",
|
308 |
+
'user_pass' => !empty( $_POST['reg_password'] ) ? $_POST['reg_password']: "",
|
309 |
+
'user_email' => !empty( $_POST['reg_email'] ) ? $_POST['reg_email']: "",
|
310 |
+
'user_url' => !empty( $_POST['reg_website'] ) ? $_POST['reg_website']: "",
|
311 |
+
'first_name' => !empty( $_POST['reg_fname'] ) ? $_POST['reg_fname']: "",
|
312 |
+
'last_name' => !empty( $_POST['reg_lname'] ) ? $_POST['reg_lname']: "",
|
313 |
+
'nickname' => !empty( $_POST['reg_nickname'] ) ? $_POST['reg_nickname']: "",
|
314 |
+
'description' => !empty( $_POST['reg_bio'] ) ? $_POST['reg_bio']: "",
|
315 |
+
);
|
316 |
+
|
317 |
+
if( htmega_validation_data( $user_data ) !== true ){
|
318 |
+
echo htmega_validation_data( $user_data );
|
319 |
+
}else{
|
320 |
+
$register_user = wp_insert_user( $user_data );
|
321 |
+
if ( is_wp_error( $register_user ) ){
|
322 |
+
echo json_encode( [ 'registerauth' =>false, 'message'=> esc_html__('Something is wrong please check again!', 'htmega-addons') ] );
|
323 |
+
} else {
|
324 |
+
echo json_encode( [ 'registerauth' =>true, 'message'=> esc_html__('Successfully Register', 'htmega-addons') ] );
|
325 |
+
}
|
326 |
+
}
|
327 |
+
wp_die();
|
328 |
+
|
329 |
+
}
|
330 |
+
|
331 |
+
// Register Data Validation
|
332 |
+
function htmega_validation_data( $user_data ){
|
333 |
+
|
334 |
+
if( empty( $user_data['user_login'] ) || empty( $_POST['reg_email'] ) || empty( $_POST['reg_password'] ) ){
|
335 |
+
return json_encode( [ 'registerauth' =>false, 'message'=> esc_html__('Username, Password and E-Mail are required', 'htmega-addons') ] );
|
336 |
+
}
|
337 |
+
if( !empty( $user_data['user_login'] ) ){
|
338 |
+
|
339 |
+
if ( 4 > strlen( $user_data['user_login'] ) ) {
|
340 |
+
return json_encode( [ 'registerauth' =>false, 'message'=> esc_html__('Username too short. At least 4 characters is required', 'htmega-addons') ] );
|
341 |
+
}
|
342 |
+
|
343 |
+
if ( username_exists( $user_data['user_login'] ) ){
|
344 |
+
return json_encode( [ 'registerauth' =>false, 'message'=> esc_html__('Sorry, that username already exists!', 'htmega-addons') ] );
|
345 |
+
}
|
346 |
+
|
347 |
+
if ( !validate_username( $user_data['user_login'] ) ) {
|
348 |
+
return json_encode( [ 'registerauth' =>false, 'message'=> esc_html__('Sorry, the username you entered is not valid', 'htmega-addons') ] );
|
349 |
+
}
|
350 |
+
|
351 |
+
}
|
352 |
+
if( !empty( $user_data['user_pass'] ) ){
|
353 |
+
if ( 5 > strlen( $user_data['user_pass'] ) ) {
|
354 |
+
return json_encode( [ 'registerauth' =>false, 'message'=> esc_html__('Password length must be greater than 5', 'htmega-addons') ] );
|
355 |
+
}
|
356 |
+
}
|
357 |
+
if( !empty( $user_data['user_email'] ) ){
|
358 |
+
if ( !is_email( $user_data['user_email'] ) ) {
|
359 |
+
return json_encode( [ 'registerauth' =>false, 'message'=> esc_html__('Email is not valid', 'htmega-addons') ] );
|
360 |
+
}
|
361 |
+
if ( email_exists( $user_data['user_email'] ) ) {
|
362 |
+
return json_encode( [ 'registerauth' =>false, 'message'=> esc_html__('Email Already in Use', 'htmega-addons') ] );
|
363 |
+
}
|
364 |
+
}
|
365 |
+
if( !empty( $user_data['user_url'] ) ){
|
366 |
+
if ( !filter_var( $user_data['user_url'], FILTER_VALIDATE_URL ) ) {
|
367 |
+
return json_encode( [ 'registerauth' =>false, 'message'=> esc_html__('Website is not a valid URL', 'htmega-addons') ] );
|
368 |
+
}
|
369 |
+
}
|
370 |
+
return true;
|
371 |
+
|
372 |
+
}
|
373 |
+
|
374 |
/*
|
375 |
* Redirect 404 page select from plugins options
|
376 |
*/
|
includes/widgets/htmega_user_login_form.php
CHANGED
@@ -844,11 +844,11 @@ class HTMega_Elementor_Widget_User_Login_Form extends Widget_Base {
|
|
844 |
|
845 |
<?php
|
846 |
|
847 |
-
$this->htmega_login_check( $redirect_url, $id );
|
848 |
|
849 |
}
|
850 |
|
851 |
-
public function htmega_login_check( $redirect_url, $id ) {
|
852 |
|
853 |
?>
|
854 |
|
@@ -861,6 +861,7 @@ class HTMega_Elementor_Widget_User_Login_Form extends Widget_Base {
|
|
861 |
var loadingmessage = '<?php echo esc_html__('Please wait...','htmega-addons'); ?>';
|
862 |
var login_form_id = 'form#htmega_login_form_<?php echo esc_attr( $id ); ?>';
|
863 |
var login_button_id = '#login_form_submit_<?php echo esc_attr( $id ); ?>';
|
|
|
864 |
|
865 |
$( login_button_id ).on('click', function(){
|
866 |
|
@@ -879,7 +880,9 @@ class HTMega_Elementor_Widget_User_Login_Form extends Widget_Base {
|
|
879 |
success: function(msg){
|
880 |
if ( msg.loggeauth == true ){
|
881 |
$('#htmega_message_<?php echo esc_attr( $id ); ?>').html('<div class="htmega_success_msg alert alert-success">'+ msg.message +'</div>').fadeIn();
|
882 |
-
|
|
|
|
|
883 |
}else{
|
884 |
$('#htmega_message_<?php echo esc_attr( $id ); ?>').html('<div class="htmega_invalid_msg alert alert-danger">'+ msg.message +'</div>').fadeIn();
|
885 |
}
|
844 |
|
845 |
<?php
|
846 |
|
847 |
+
$this->htmega_login_check( $settings['redirect_page'], $redirect_url, $id );
|
848 |
|
849 |
}
|
850 |
|
851 |
+
public function htmega_login_check( $reddirectstatus, $redirect_url, $id ) {
|
852 |
|
853 |
?>
|
854 |
|
861 |
var loadingmessage = '<?php echo esc_html__('Please wait...','htmega-addons'); ?>';
|
862 |
var login_form_id = 'form#htmega_login_form_<?php echo esc_attr( $id ); ?>';
|
863 |
var login_button_id = '#login_form_submit_<?php echo esc_attr( $id ); ?>';
|
864 |
+
var redirect = '<?php echo $reddirectstatus; ?>';
|
865 |
|
866 |
$( login_button_id ).on('click', function(){
|
867 |
|
880 |
success: function(msg){
|
881 |
if ( msg.loggeauth == true ){
|
882 |
$('#htmega_message_<?php echo esc_attr( $id ); ?>').html('<div class="htmega_success_msg alert alert-success">'+ msg.message +'</div>').fadeIn();
|
883 |
+
if( redirect === 'yes' ){
|
884 |
+
document.location.href = '<?php echo esc_url( $redirect_url ); ?>';
|
885 |
+
}
|
886 |
}else{
|
887 |
$('#htmega_message_<?php echo esc_attr( $id ); ?>').html('<div class="htmega_invalid_msg alert alert-danger">'+ msg.message +'</div>').fadeIn();
|
888 |
}
|
includes/widgets/htmega_user_register_form.php
CHANGED
@@ -386,6 +386,31 @@ class HTMega_Elementor_Widget_User_Register_Form extends Widget_Base {
|
|
386 |
]
|
387 |
);
|
388 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
389 |
$this->end_controls_section();
|
390 |
|
391 |
// Style tab section
|
@@ -1031,6 +1056,12 @@ class HTMega_Elementor_Widget_User_Register_Form extends Widget_Base {
|
|
1031 |
$current_url = remove_query_arg( 'fake_arg' );
|
1032 |
$id = $this->get_id();
|
1033 |
|
|
|
|
|
|
|
|
|
|
|
|
|
1034 |
$this->add_render_attribute( 'register_area_attr', 'class', 'htmega-register-wrapper' );
|
1035 |
$this->add_render_attribute( 'register_area_attr', 'class', 'htmega-register-style-'.$settings['register_form_style'] );
|
1036 |
|
@@ -1117,6 +1148,14 @@ class HTMega_Elementor_Widget_User_Register_Form extends Widget_Base {
|
|
1117 |
]
|
1118 |
);
|
1119 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1120 |
$this->add_render_attribute(
|
1121 |
'submit_input_attr', [
|
1122 |
'name' => 'reg_submit'.$id,
|
@@ -1127,31 +1166,10 @@ class HTMega_Elementor_Widget_User_Register_Form extends Widget_Base {
|
|
1127 |
);
|
1128 |
?>
|
1129 |
|
|
|
1130 |
<div <?php echo $this->get_render_attribute_string( 'register_area_attr' ); ?>>
|
1131 |
-
<?php
|
1132 |
-
if ( isset( $_REQUEST['reg_submit'.$id] ) ) {
|
1133 |
-
|
1134 |
-
$get_username = isset( $_REQUEST['reg_name'] ) ? $_REQUEST['reg_name'] : NULL;
|
1135 |
-
$get_password = isset( $_REQUEST['reg_password'] ) ? $_REQUEST['reg_password'] : NULL;
|
1136 |
-
$get_email = isset( $_REQUEST['reg_email'] ) ? $_REQUEST['reg_email'] : NULL;
|
1137 |
-
$get_website = isset( $_REQUEST['reg_website'] ) ? $_REQUEST['reg_website'] : NULL;
|
1138 |
-
$get_first_name = isset( $_REQUEST['reg_fname'] ) ? $_REQUEST['reg_fname'] : NULL;
|
1139 |
-
$get_last_name = isset( $_REQUEST['reg_lname'] ) ? $_REQUEST['reg_lname'] : NULL;
|
1140 |
-
$get_nickname = isset( $_REQUEST['reg_nickname'] ) ? $_REQUEST['reg_nickname'] : NULL;
|
1141 |
-
$get_bio = isset( $_REQUEST['reg_bio'] ) ? $_REQUEST['reg_bio'] : NULL;
|
1142 |
-
|
1143 |
-
if ( is_wp_error( $this->htmega_validation( $get_username, $get_password, $get_email, $get_website, $get_first_name, $get_last_name, $get_nickname, $get_bio ) ) ) {
|
1144 |
-
echo '<div class="alert alert-danger">';
|
1145 |
-
echo esc_html__( $this->htmega_validation( $get_username, $get_password, $get_email, $get_website, $get_first_name, $get_last_name, $get_nickname, $get_bio )->get_error_message(),'htmega-addons' );
|
1146 |
-
echo '</div>';
|
1147 |
-
}
|
1148 |
-
else {
|
1149 |
-
$this->htmega_registration( $get_username, $get_password, $get_email, $get_website, $get_first_name, $get_last_name, $get_nickname, $get_bio );
|
1150 |
-
}
|
1151 |
-
}
|
1152 |
-
?>
|
1153 |
<div class="htmega-register-form">
|
1154 |
-
<form
|
1155 |
|
1156 |
<?php if( $settings['register_form_style'] == 2 ): ?>
|
1157 |
<div class="htb-row">
|
@@ -1224,8 +1242,9 @@ class HTMega_Elementor_Widget_User_Register_Form extends Widget_Base {
|
|
1224 |
if( $settings['show_label'] == 'yes' ){
|
1225 |
echo sprintf('<label>%1$s</label>', isset( $settings['bio_label'] ) ? $settings['bio_label'] : 'Biographical Info' );
|
1226 |
}
|
1227 |
-
echo sprintf( '<textarea
|
1228 |
echo '</div>';
|
|
|
1229 |
}
|
1230 |
?>
|
1231 |
<div class="htb-col-lg-12">
|
@@ -1410,7 +1429,8 @@ class HTMega_Elementor_Widget_User_Register_Form extends Widget_Base {
|
|
1410 |
if( $settings['show_label'] == 'yes' ){
|
1411 |
echo sprintf('<label>%1$s</label>', isset( $settings['bio_label'] ) ? $settings['bio_label'] : 'Biographical Info' );
|
1412 |
}
|
1413 |
-
|
|
|
1414 |
}
|
1415 |
|
1416 |
?>
|
@@ -1422,78 +1442,65 @@ class HTMega_Elementor_Widget_User_Register_Form extends Widget_Base {
|
|
1422 |
</div>
|
1423 |
|
1424 |
<?php
|
|
|
1425 |
|
1426 |
}
|
1427 |
|
1428 |
-
public function
|
1429 |
-
|
1430 |
-
|
1431 |
-
|
1432 |
-
|
1433 |
-
|
1434 |
-
|
1435 |
-
|
1436 |
-
|
1437 |
-
|
1438 |
-
|
1439 |
-
|
1440 |
-
|
1441 |
-
|
1442 |
-
|
1443 |
-
|
1444 |
-
|
1445 |
-
|
1446 |
-
|
1447 |
-
|
1448 |
-
|
1449 |
-
|
1450 |
-
|
1451 |
-
|
1452 |
-
|
1453 |
-
|
1454 |
-
|
1455 |
-
|
1456 |
-
|
1457 |
-
|
1458 |
-
|
1459 |
-
|
1460 |
-
|
1461 |
-
|
1462 |
-
|
1463 |
-
|
1464 |
-
|
1465 |
-
|
1466 |
-
|
1467 |
-
|
1468 |
-
|
1469 |
-
|
1470 |
-
|
1471 |
-
|
1472 |
-
|
1473 |
-
|
1474 |
-
|
1475 |
-
|
1476 |
-
|
1477 |
-
|
1478 |
-
|
1479 |
-
|
1480 |
-
|
1481 |
-
|
1482 |
-
return new \WP_Error( 'email_invalid', 'Email is not valid' );
|
1483 |
-
}
|
1484 |
-
|
1485 |
-
if ( email_exists( $email ) ) {
|
1486 |
-
return new \WP_Error( 'email', 'Email Already in use' );
|
1487 |
-
}
|
1488 |
-
}
|
1489 |
-
|
1490 |
-
if ( ! empty( $website ) ) {
|
1491 |
-
if ( ! filter_var( $website, FILTER_VALIDATE_URL ) ) {
|
1492 |
-
return new \WP_Error( 'website', 'Website is not a valid URL' );
|
1493 |
-
}
|
1494 |
-
}
|
1495 |
-
|
1496 |
}
|
1497 |
|
1498 |
-
}
|
1499 |
|
|
386 |
]
|
387 |
);
|
388 |
|
389 |
+
$this->add_control(
|
390 |
+
'redirect_page',
|
391 |
+
[
|
392 |
+
'label' => __( 'Redirect page after register', 'htmega-addons' ),
|
393 |
+
'type' => Controls_Manager::SWITCHER,
|
394 |
+
'default' => 'no',
|
395 |
+
'label_off' => __( 'No', 'htmega-addons' ),
|
396 |
+
'label_on' => __( 'Yes', 'htmega-addons' ),
|
397 |
+
]
|
398 |
+
);
|
399 |
+
|
400 |
+
$this->add_control(
|
401 |
+
'redirect_page_url',
|
402 |
+
[
|
403 |
+
'type' => Controls_Manager::URL,
|
404 |
+
'show_label' => false,
|
405 |
+
'show_external' => false,
|
406 |
+
'separator' => false,
|
407 |
+
'placeholder' => 'http://your-link.com/',
|
408 |
+
'condition' => [
|
409 |
+
'redirect_page' => 'yes',
|
410 |
+
],
|
411 |
+
]
|
412 |
+
);
|
413 |
+
|
414 |
$this->end_controls_section();
|
415 |
|
416 |
// Style tab section
|
1056 |
$current_url = remove_query_arg( 'fake_arg' );
|
1057 |
$id = $this->get_id();
|
1058 |
|
1059 |
+
if ( $settings['redirect_page'] == 'yes' && ! empty( $settings['redirect_page_url']['url'] ) ) {
|
1060 |
+
$redirect_url = $settings['redirect_page_url']['url'];
|
1061 |
+
} else {
|
1062 |
+
$redirect_url = $current_url;
|
1063 |
+
}
|
1064 |
+
|
1065 |
$this->add_render_attribute( 'register_area_attr', 'class', 'htmega-register-wrapper' );
|
1066 |
$this->add_render_attribute( 'register_area_attr', 'class', 'htmega-register-style-'.$settings['register_form_style'] );
|
1067 |
|
1148 |
]
|
1149 |
);
|
1150 |
|
1151 |
+
$this->add_render_attribute(
|
1152 |
+
'bio_textarea_attr', [
|
1153 |
+
'name' => 'reg_bio',
|
1154 |
+
'id' => 'reg_bio'.$id,
|
1155 |
+
'placeholder' => isset( $settings['bio_placeholder_label'] ) ? $settings['bio_placeholder_label'] : 'Biographical Info',
|
1156 |
+
]
|
1157 |
+
);
|
1158 |
+
|
1159 |
$this->add_render_attribute(
|
1160 |
'submit_input_attr', [
|
1161 |
'name' => 'reg_submit'.$id,
|
1166 |
);
|
1167 |
?>
|
1168 |
|
1169 |
+
<div id="htmega_message_<?php echo esc_attr( $id ); ?>" class="htmega_message"> </div>
|
1170 |
<div <?php echo $this->get_render_attribute_string( 'register_area_attr' ); ?>>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1171 |
<div class="htmega-register-form">
|
1172 |
+
<form id="htmega_register_form_<?php echo esc_attr( $id ); ?>" method="post" action="htmegaregisteraction">
|
1173 |
|
1174 |
<?php if( $settings['register_form_style'] == 2 ): ?>
|
1175 |
<div class="htb-row">
|
1242 |
if( $settings['show_label'] == 'yes' ){
|
1243 |
echo sprintf('<label>%1$s</label>', isset( $settings['bio_label'] ) ? $settings['bio_label'] : 'Biographical Info' );
|
1244 |
}
|
1245 |
+
echo sprintf( '<textarea %1$s>%2$s</textarea>', $this->get_render_attribute_string( 'bio_textarea_attr' ), ( isset( $_REQUEST['reg_bio'] ) ? $_REQUEST['reg_bio'] : NULL ) );
|
1246 |
echo '</div>';
|
1247 |
+
|
1248 |
}
|
1249 |
?>
|
1250 |
<div class="htb-col-lg-12">
|
1429 |
if( $settings['show_label'] == 'yes' ){
|
1430 |
echo sprintf('<label>%1$s</label>', isset( $settings['bio_label'] ) ? $settings['bio_label'] : 'Biographical Info' );
|
1431 |
}
|
1432 |
+
|
1433 |
+
echo sprintf( '<textarea %1$s>%2$s</textarea>', $this->get_render_attribute_string( 'bio_textarea_attr' ), ( isset( $_REQUEST['reg_bio'] ) ? $_REQUEST['reg_bio'] : NULL ) );
|
1434 |
}
|
1435 |
|
1436 |
?>
|
1442 |
</div>
|
1443 |
|
1444 |
<?php
|
1445 |
+
$this->htmega_register_request( $id, $settings['redirect_page'], $redirect_url );
|
1446 |
|
1447 |
}
|
1448 |
|
1449 |
+
public function htmega_register_request( $id, $reddirectstatus ,$redirect_url ){
|
1450 |
+
?>
|
1451 |
+
<script type="text/javascript">
|
1452 |
+
jQuery(document).ready(function($) {
|
1453 |
+
"use strict";
|
1454 |
+
|
1455 |
+
var ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>';
|
1456 |
+
var loadingmessage = '<?php echo esc_html__('Please Wait...','htmega-addons'); ?>';
|
1457 |
+
var form_id = 'form#htmega_register_form_<?php echo esc_attr( $id ); ?>';
|
1458 |
+
var button_id = '#reg_submit<?php echo esc_attr( $id ); ?>';
|
1459 |
+
var nonce = '<?php wp_create_nonce( 'htmega_register_nonce' ) ?>';
|
1460 |
+
var redirect = '<?php echo $reddirectstatus; ?>';
|
1461 |
+
|
1462 |
+
$( button_id ).on('click', function(){
|
1463 |
+
|
1464 |
+
$('#htmega_message_<?php echo esc_attr( $id ); ?>').html('<span class="htmega_lodding_msg">'+ loadingmessage +'</span>').fadeIn();
|
1465 |
+
|
1466 |
+
var data = {
|
1467 |
+
action: "htmega_ajax_register",
|
1468 |
+
nonce: nonce,
|
1469 |
+
reg_name: $( form_id + ' #reg_name<?php echo esc_attr( $id ); ?>').val(),
|
1470 |
+
reg_password: $( form_id + ' #reg_password<?php echo esc_attr( $id ); ?>').val(),
|
1471 |
+
reg_email: $( form_id + ' #reg_email<?php echo esc_attr( $id ); ?>').val(),
|
1472 |
+
reg_website: $( form_id + ' #reg_website<?php echo esc_attr( $id ); ?>').val(),
|
1473 |
+
reg_fname: $( form_id + ' #reg_fname<?php echo esc_attr( $id ); ?>').val(),
|
1474 |
+
reg_lname: $( form_id + ' #reg_lname<?php echo esc_attr( $id ); ?>').val(),
|
1475 |
+
reg_nickname: $( form_id + ' #reg_nickname<?php echo esc_attr( $id ); ?>').val(),
|
1476 |
+
reg_bio: $( form_id + ' #reg_bio<?php echo esc_attr( $id ); ?>').val(),
|
1477 |
+
};
|
1478 |
+
|
1479 |
+
$.ajax({
|
1480 |
+
type: 'POST',
|
1481 |
+
dataType: 'json',
|
1482 |
+
url: ajaxurl,
|
1483 |
+
data: data,
|
1484 |
+
success: function( msg ){
|
1485 |
+
if ( msg.registerauth == true ){
|
1486 |
+
$('#htmega_message_<?php echo esc_attr( $id ); ?>').html('<div class="htmega_success_msg alert alert-success">'+ msg.message +'</div>').fadeIn();
|
1487 |
+
if( redirect === 'yes' ){
|
1488 |
+
document.location.href = '<?php echo esc_url( $redirect_url ); ?>';
|
1489 |
+
}
|
1490 |
+
}else{
|
1491 |
+
$('#htmega_message_<?php echo esc_attr( $id ); ?>').html('<div class="htmega_invalid_msg alert alert-danger">'+ msg.message +'</div>').fadeIn();
|
1492 |
+
}
|
1493 |
+
}
|
1494 |
+
});
|
1495 |
+
return false;
|
1496 |
+
|
1497 |
+
});
|
1498 |
+
|
1499 |
+
});
|
1500 |
+
|
1501 |
+
</script>
|
1502 |
+
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1503 |
}
|
1504 |
|
|
|
1505 |
|
1506 |
+
}
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: hasthemes, htplugins, devitemsllc
|
|
3 |
Tags: Elementor, Elementor Addons, Elementor Widgets, elementor page builder, Elementor Blocks
|
4 |
Requires at least: 4.7
|
5 |
Tested up to: 5.3.2
|
6 |
-
Stable tag: 1.3.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -189,6 +189,10 @@ Visit [HasThemes](https://hasthemes.com/) for more details about HTML, Shopify a
|
|
189 |
|
190 |
== Changelog ==
|
191 |
|
|
|
|
|
|
|
|
|
192 |
= Version: 1.3.4 - Date: 2020-01-14 =
|
193 |
* Addons Post load limit added.
|
194 |
* Instagram Device wise column control option added.
|
3 |
Tags: Elementor, Elementor Addons, Elementor Widgets, elementor page builder, Elementor Blocks
|
4 |
Requires at least: 4.7
|
5 |
Tested up to: 5.3.2
|
6 |
+
Stable tag: 1.3.5
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
189 |
|
190 |
== Changelog ==
|
191 |
|
192 |
+
= Version: 1.3.5 - Date: 2020-01-16 =
|
193 |
+
* Ajax Added in User Login Form.
|
194 |
+
* Ajax Added in User Register Form.
|
195 |
+
|
196 |
= Version: 1.3.4 - Date: 2020-01-14 =
|
197 |
* Addons Post load limit added.
|
198 |
* Instagram Device wise column control option added.
|