Skip to content

Commit

Permalink
Version bump to 2.1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
iamprazol committed Dec 16, 2021
1 parent 270376d commit 28b9212
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 35 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
= 2.1.0.1 - 16/12/2021
* Dev - Added filter hook for success message after email confirmation.
* Tweak - Upgrade to pro notice.

= 2.1.0 - 13/12/2021
* Dev - User Regsitration Pro addon compatibility.
Expand Down
2 changes: 1 addition & 1 deletion assets/js/frontend/user-registration.js
Original file line number Diff line number Diff line change
Expand Up @@ -1384,7 +1384,7 @@

/**
* Reinitialize the form again after page is fully loaded,
* in order to support third party popup plugins like elementor.
* in order to support third party popup plugins.
*
* @since 1.9.0
*/
Expand Down
2 changes: 1 addition & 1 deletion includes/class-ur-email-confirmation.php
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ public function ur_enqueue_script() {

// Successful registration message.
public function custom_registration_message() {
return ur_print_notice( __( 'User successfully registered. Login to continue.', 'user-registration' ) );
return ur_print_notice( apply_filters("user_registration_success_message_after_email_confirmation", __('User successfully registered. Login to continue.', 'user-registration' ) ) );
}

// Token mismatch message.
Expand Down
45 changes: 26 additions & 19 deletions includes/class-ur-plugin-updater.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public function admin_init() {

// Check to make sure we've RP extensions and plugin update capability.
$extensions = $this->get_plugins_with_header( self::VERSION_TESTED_HEADER );
if ( ! empty( $extensions ) && current_user_can( 'update_plugins' ) ) {
if ( ( ! empty( $extensions ) || file_exists( WP_PLUGIN_DIR. '/user-registration-pro/user-registration.php' ) ) && current_user_can( 'update_plugins' ) ) {
$this->plugin_requests();
add_action( "in_admin_header", array( $this, "user_registration_upgrade_to_pro_notice" ) );
$this->plugin_license_view();
Expand Down Expand Up @@ -548,7 +548,7 @@ public function user_registration_failed_extension_install() {
/**
* Display upgrade to PRO notice.
*
* @since 3.0.0
* @since 2.1.0
*/
public function user_registration_upgrade_to_pro_notice() {

Expand All @@ -565,37 +565,41 @@ public function user_registration_upgrade_to_pro_notice() {

if ( $license_key ) {
$content .= sprintf( __( '<strong>If you have active premium license of User Registration</strong>, please click button below to install and activate <strong>User Registration Pro</strong>. Going forward <strong>User Registration Pro</strong> is necessary for smooth running of premium addons of User Registration that you are currently using.', 'user-registration') );
$link = '<button class="button button-primary" type="text" name="download_user_registration_pro" value="download_user_registration_pro"><span class="dashicons dashicons-external"></span>' . __( 'Install and Activate User Registration Pro', 'user-registration' ) . '</button>';
$link .= '<button class="button button-primary" type="text" name="download_user_registration_pro" value="download_user_registration_pro"><span class="dashicons dashicons-external"></span>' . __( 'Install and Activate User Registration Pro', 'user-registration' ) . '</button>';
} else {
$content .= sprintf( '<strong>%1$s</strong>, %2$s', __( 'If you do not have active premium license of User Registration', 'user-registration' ), __( 'please purchase premium license. Going forward active premium license will be vital for smooth running of premium addons of User Registration that you are currently using.', 'user-registration' ) );
$link = '<a class="button button-primary" href="' . esc_url_raw( 'https://wpeverest.com/wordpress-plugins/user-registration/pricing/?utm_source=user-dashboard&utm_medium=notice-3.0.0&utm_campaign=user-registration-pro-3.0.0') . '" target="_blank"><span class="dashicons dashicons-external"></span>' . __( 'Purchase Premium License', 'user-registration' ) . '</a>';
$content .= sprintf( '<p class="extra-pad"><strong>%1$s</strong>, %2$s</p>', __( 'If you already have an active license key.', 'user-registration' ), __( 'please activate the key.', 'user-registration' ) );
$content .= sprintf( '<p class="extra-pad"><strong>%1$s</strong>, %2$s</p>', __( 'If you do not have active premium license of User Registration', 'user-registration' ), __( 'please purchase premium license. Going forward active premium license will be vital for smooth running of premium addons of User Registration that you are currently using.', 'user-registration' ) );
$link .= '<li><a class="button button-primary" href="' . esc_url_raw( 'https://wpeverest.com/wordpress-plugins/user-registration/pricing/?utm_source=user-dashboard&utm_medium=notice-3.0.0&utm_campaign=user-registration-pro-3.0.0') . '" target="_blank"><span class="dashicons dashicons-external"></span>' . __( 'Purchase Premium License', 'user-registration' ) . '</a></li>';
$link .= '<li><a class="button button-secondary" href="' . esc_url( admin_url( 'admin.php?page=user-registration-settings&tab=license' ) ) . '" target="_blank"><span class="dashicons dashicons-external"></span>' . __( 'Activate License Key', 'user-registration' ) . '</a></li>';
}

// If Pro is active do not show upgrade to pro notice but show update addons notice if not upto date.
if ( is_plugin_active( 'user-registration-pro/user-registration.php' ) ) {
$updated_addons_list = array(
'user-registration-advanced-fields/user-registration-advanced-fields.php' => array( 'version' => '1.4.7', 'notice_slug' => 'user_registration_advanced_fields_admin_notice' ),
'user-registration-conditional-logic/user-registration-conditional-logic.php' => array( 'version' => '1.3.0', 'notice_slug' => 'user_registration_conditional_logic_admin_notice' ),
'user-registration-content-restriction/user-registration-content-restriction.php' => array( 'version' => '1.1.5', 'notice_slug' => 'user_registration_content_restriction_admin_notice' ),
'user-registration-customize-my-account/user-registration-customize-my-account.php' => array( 'version' => '1.1.3', 'notice_slug' => 'user_registration_customize_my_account_admin_notice' ),
'user-registration-email-templates/user-registration-email-templates.php' => array( 'version' => '1.0.4', 'notice_slug' => 'user_registration_email_templates_admin_notice' ),
'user-registration-file-upload/user-registration-file-upload.php' => array( 'version' => '1.2.4', 'notice_slug' => 'user_registration_file_upload_admin_notice' ),
'user-registration-frontend-listing/user-registration-frontend-listing.php' => array( 'version' => '1.0.3', 'notice_slug' => 'ur_frontend_listing_admin_notice' ),
'user-registration-mailchimp/user-registration-mailchimp.php' => array( 'version' => '1.3.0', 'notice_slug' => 'urmc_admin_notices' ),
'user-registration-pdf-form-submission/user-registration-pdf-form-submission.php' => array( 'version' => '1.0.8', 'notice_slug' => 'user_registration_pdf_admin_notice' ),
'user-registration-social-connect/user-registration-social-connect.php' => array( 'version' => '1.3.7', 'notice_slug' => 'user_registration_social_connect_admin_notice' ),
'user-registration-woocommerce/user-registration-woocommerce.php' => array( 'version' => '1.2.7', 'notice_slug' => 'user_registration_woocommerce_admin_notice' ),
'user-registration-advanced-fields/user-registration-advanced-fields.php' => array( 'title' => 'User Registration Advanced Fields', 'version' => '1.4.7', 'notice_slug' => 'user_registration_advanced_fields_admin_notice' ),
'user-registration-conditional-logic/user-registration-conditional-logic.php' => array( 'title' => 'User Registration Conditional Logic', 'version' => '1.3.0', 'notice_slug' => 'user_registration_conditional_logic_admin_notice' ),
'user-registration-content-restriction/user-registration-content-restriction.php' => array( 'title' => 'User Registration Content Restriction', 'version' => '1.1.5', 'notice_slug' => 'user_registration_content_restriction_admin_notice' ),
'user-registration-customize-my-account/user-registration-customize-my-account.php' => array( 'title' => 'User Registration Customize My Account', 'version' => '1.1.4', 'notice_slug' => 'user_registration_customize_my_account_admin_notice' ),
'user-registration-email-templates/user-registration-email-templates.php' => array( 'title' => 'User Registration Email Templates', 'version' => '1.0.4', 'notice_slug' => 'user_registration_email_templates_admin_notice' ),
'user-registration-file-upload/user-registration-file-upload.php' => array( 'title' => 'User Registration File Upload', 'version' => '1.2.4', 'notice_slug' => 'user_registration_file_upload_admin_notice' ),
'user-registration-frontend-listing/user-registration-frontend-listing.php' => array( 'title' => 'User Registration Frontend Listing', 'version' => '1.0.3', 'notice_slug' => 'ur_frontend_listing_admin_notice' ),
'user-registration-mailchimp/user-registration-mailchimp.php' => array( 'title' => 'User Registration MailChimp', 'version' => '1.3.0', 'notice_slug' => 'urmc_admin_notices' ),
'user-registration-pdf-form-submission/user-registration-pdf-form-submission.php' => array( 'title' => 'User Registration PDF Form Submission', 'version' => '1.0.8', 'notice_slug' => 'user_registration_pdf_admin_notice' ),
'user-registration-social-connect/user-registration-social-connect.php' => array( 'title' => 'User Registration Social Connect', 'version' => '1.3.7', 'notice_slug' => 'user_registration_social_connect_admin_notice' ),
'user-registration-woocommerce/user-registration-woocommerce.php' => array( 'title' => 'User Registration WooCommerce', 'version' => '1.2.7', 'notice_slug' => 'user_registration_woocommerce_admin_notice' ),
);

$plugins = get_plugins();
$show_notice = false;

// Remove user registration required notice in outdated version of addon when pro is installed.
global $wp_filter;
$update_addon_content = '<p>Please update all the listed addons to the latest version.</p><ol style="margin-top:0px; font-size:12px;">';
foreach ( $updated_addons_list as $addon_file => $addon_detail) {
if( is_plugin_active( $addon_file ) && $plugins[ $addon_file ]['Version'] < $addon_detail['version'] ) {
$show_notice = true;

$update_addon_content .= '<li>' . $addon_detail['title'] . ' <strong>v( ' . $addon_detail['version'] . ' )</strong></li>';
if ( ! empty( $wp_filter[ 'admin_notices' ]->callbacks ) && is_array( $wp_filter[ 'admin_notices' ]->callbacks ) ) {
foreach ( $wp_filter[ 'admin_notices' ]->callbacks as $priority => $hooks ) {
if( ! empty( $wp_filter[ 'admin_notices' ]->callbacks[ $priority ][ $addon_detail['notice_slug'] ] ) ) {
Expand All @@ -606,6 +610,8 @@ public function user_registration_upgrade_to_pro_notice() {
}
}

$update_addon_content .= '</ol>';

// Display update addons notice.
if( $show_notice ) {
?>
Expand All @@ -616,6 +622,7 @@ public function user_registration_upgrade_to_pro_notice() {
<div class="user-registration-notice-text">
<h3 class="ur-error extra-pad"><?php _e( '<strong> Update all addons of User Registration!!</strong>', 'user-registration' ); ?></h3>
<p class="extra-pad"><?php echo sprintf( __( 'It seems some of the <strong>User Registration</strong> Addons are outdated. Please update the outdated addons to the latest version for the <strong>User Registration Pro</strong> plugin to work correctly.<br>', 'user-registration' ) ); ?></p>
<?php echo wp_kses_post( sprintf( __( '%1$s', 'user-registration' ), $update_addon_content ) );?>
<ul class="user-registration-notice-ul">
<li><a href="<?php echo esc_url_raw( 'https://wpeverest.com/wordpress-plugins/user-registration/support/' ) ?>" class="button button-secondary notice-have-query" target="_blank"><span class="dashicons dashicons-testimonial"></span><?php _e( 'I have a query', 'user-registration' ); ?></a></li>
</ul>
Expand All @@ -633,9 +640,9 @@ public function user_registration_upgrade_to_pro_notice() {
<div class="user-registration-notice-text">
<h3 class="ur-error extra-pad"><?php _e( '<strong> Upgrade To PRO!!</strong>', 'user-registration' ); ?></h3>
<p class="extra-pad"><?php _e( 'It seems you are using some premium addons of User Registration plugin. <br>', 'user-registration' ); ?></p>
<p class="extra-pad"><?php echo wp_kses_post( $content ); ?></p>
<ul class="user-registration-notice-ul">
<li><?php echo $license_key ? '<form method="post">' . wp_kses_post( $link ) . '</form>' : wp_kses_post( $link ); ?></li>
<?php echo $license_key ? '<p class="extra-pad">' . wp_kses_post( $content ) .'</p>' : wp_kses_post( $content ); ?>
<ul class="user-registration-notice-ul">
<?php echo $license_key ? '<li><form method="post">' . wp_kses_post( $link ) . '</form></li>' : wp_kses_post( $link ); ?>
<li><a href="<?php echo esc_url_raw( 'https://wpeverest.com/wordpress-plugins/user-registration/support/' ) ?>" class="button button-secondary notice-have-query" target="_blank"><span class="dashicons dashicons-testimonial" ></span><?php _e( 'I have a query', 'user-registration' ); ?></a></li>
</ul>
</div>
Expand Down
35 changes: 24 additions & 11 deletions languages/user-registration.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
# This file is distributed under the same license as the User Registration plugin.
msgid ""
msgstr ""
"Project-Id-Version: User Registration 2.1.0\n"
"Project-Id-Version: User Registration 2.1.0.1\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/user-registration\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"POT-Creation-Date: 2021-12-15T06:38:36+00:00\n"
"POT-Creation-Date: 2021-12-16T08:14:04+00:00\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"X-Generator: WP-CLI 2.5.0\n"
"X-Domain: user-registration\n"
Expand Down Expand Up @@ -702,8 +702,8 @@ msgstr ""

#: includes/admin/class-ur-admin.php:183
#: includes/admin/class-ur-admin.php:231
#: includes/class-ur-plugin-updater.php:620
#: includes/class-ur-plugin-updater.php:639
#: includes/class-ur-plugin-updater.php:627
#: includes/class-ur-plugin-updater.php:646
msgid "I have a query"
msgstr ""

Expand Down Expand Up @@ -2526,6 +2526,7 @@ msgstr ""

#: includes/class-ur-plugin-updater.php:534
#: includes/class-ur-plugin-updater.php:540
#: includes/class-ur-plugin-updater.php:625
#: templates/myaccount/dashboard.php:61
msgid "%1$s"
msgstr ""
Expand All @@ -2539,34 +2540,46 @@ msgid "Install and Activate User Registration Pro"
msgstr ""

#: includes/class-ur-plugin-updater.php:570
msgid "If you do not have active premium license of User Registration"
msgid "If you already have an active license key."
msgstr ""

#: includes/class-ur-plugin-updater.php:570
msgid "please purchase premium license. Going forward active premium license will be vital for smooth running of premium addons of User Registration that you are currently using."
msgid "please activate the key."
msgstr ""

#: includes/class-ur-plugin-updater.php:571
msgid "If you do not have active premium license of User Registration"
msgstr ""

#: includes/class-ur-plugin-updater.php:571
msgid "please purchase premium license. Going forward active premium license will be vital for smooth running of premium addons of User Registration that you are currently using."
msgstr ""

#: includes/class-ur-plugin-updater.php:572
msgid "Purchase Premium License"
msgstr ""

#: includes/class-ur-plugin-updater.php:617
#: includes/class-ur-plugin-updater.php:573
msgid "Activate License Key"
msgstr ""

#: includes/class-ur-plugin-updater.php:623
msgid "<strong> Update all addons of User Registration!!</strong>"
msgstr ""

#: includes/class-ur-plugin-updater.php:618
#: includes/class-ur-plugin-updater.php:624
msgid "It seems some of the <strong>User Registration</strong> Addons are outdated. Please update the outdated addons to the latest version for the <strong>User Registration Pro</strong> plugin to work correctly.<br>"
msgstr ""

#: includes/class-ur-plugin-updater.php:634
#: includes/class-ur-plugin-updater.php:641
msgid "<strong> Upgrade To PRO!!</strong>"
msgstr ""

#: includes/class-ur-plugin-updater.php:635
#: includes/class-ur-plugin-updater.php:642
msgid "It seems you are using some premium addons of User Registration plugin. <br>"
msgstr ""

#: includes/class-ur-plugin-updater.php:653
#: includes/class-ur-plugin-updater.php:660
msgid "User Registration Pro has been installed successfully."
msgstr ""

Expand Down
5 changes: 4 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Tags: user registration, registration, user profile, registration form, login fo
Requires at least: 4.0
Requires PHP: 5.3
Tested up to: 5.8.2
Stable tag: 2.1.0
Stable tag: 2.1.0.1
License: GPLv3
License URI: http://www.gnu.org/licenses/gpl-3.0.html

Expand Down Expand Up @@ -274,6 +274,9 @@ Yes, the plugin has a shortcode for the login form.
16. User Account Page - Vertical Layout

== Changelog ==
= 2.1.0.1 - 16/12/2021
* Dev - Added filter hook for success message after email confirmation.
* Tweak - Upgrade to pro notice.

= 2.1.0 - 13/12/2021
* Dev - User Regsitration Pro addon compatibility.
Expand Down
4 changes: 2 additions & 2 deletions user-registration.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: User Registration
* Plugin URI: https://wpeverest.com/plugins/user-registration
* Description: Drag and Drop user registration form and login form builder.
* Version: 2.1.0
* Version: 2.1.0.1
* Author: WPEverest
* Author URI: https://wpeverest.com
* Text Domain: user-registration
Expand Down Expand Up @@ -31,7 +31,7 @@ final class UserRegistration {
*
* @var string
*/
public $version = '2.1.0';
public $version = '2.1.0.1';

/**
* Session instance.
Expand Down

0 comments on commit 28b9212

Please sign in to comment.