diff --git a/README.md b/README.md index 7f6f208d..393a3d49 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Ultimate Member is the #1 user profile & membership plugin for WordPress. The pl | Latest Version |Requires at least|Stable Tag| | :------------: |:------------:|:------------:| -| 2.0.23 | WordPress 4.9 or higher| 2.0.23 | +| 2.0.24 | WordPress 4.9 or higher| 2.0.24 | Features of the plugin include: @@ -48,7 +48,7 @@ GNU Version 2 or Any Later Version Releases ==================== -[Official Release Version: 2.0.23](https://github.com/ultimatemember/ultimatemember/releases/tag/2.0.23). +[Official Release Version: 2.0.24](https://github.com/ultimatemember/ultimatemember/releases/tag/2.0.24). [Official Release Version: 1.3.88](https://github.com/ultimatemember/ultimatemember/releases). diff --git a/assets/js/um-modal.js b/assets/js/um-modal.js index 99c117b2..f1a480c9 100644 --- a/assets/js/um-modal.js +++ b/assets/js/um-modal.js @@ -30,9 +30,10 @@ jQuery(document).ready(function() { um_modal_responsive(); jQuery.ajax({ - url: um_scripts.remove_file, + url: wp.ajax.settings.url, type: 'post', data: { + action: 'um_remove_file', src: src } }); @@ -59,9 +60,10 @@ jQuery(document).ready(function() { um_modal_responsive(); jQuery.ajax({ - url: um_scripts.remove_file, + url: wp.ajax.settings.url, type: 'post', data: { + action: 'um_remove_file', src: src } }); @@ -105,10 +107,11 @@ jQuery(document).ready(function() { jQuery(this).html( jQuery(this).attr('data-processing') ).addClass('disabled'); jQuery.ajax({ - url: um_scripts.resize_image, + url: wp.ajax.settings.url, type: 'POST', dataType: 'json', data: { + action: 'um_resize_image', src : src, coord : coord, user_id : user_id, diff --git a/assets/js/um-profile.js b/assets/js/um-profile.js index 624639cb..cdc5145b 100644 --- a/assets/js/um-profile.js +++ b/assets/js/um-profile.js @@ -43,9 +43,10 @@ jQuery(document).ready(function() { metakey = 'profile_photo'; jQuery.ajax({ - url: um_scripts.delete_profile_photo, + url: wp.ajax.settings.url, type: 'post', data: { + action:'um_delete_profile_photo', metakey: metakey, user_id: user_id } @@ -65,9 +66,10 @@ jQuery(document).ready(function() { metakey = 'cover_photo'; jQuery.ajax({ - url: um_scripts.delete_cover_photo, + url: wp.ajax.settings.url, type: 'post', data: { + action: 'um_delete_cover_photo', metakey: metakey, user_id: user_id }, diff --git a/assets/js/um-scripts.js b/assets/js/um-scripts.js index f3132f48..539411d7 100644 --- a/assets/js/um-scripts.js +++ b/assets/js/um-scripts.js @@ -151,9 +151,10 @@ jQuery(document).ready(function() { parent.find('input[type=hidden]').val('empty_file'); jQuery.ajax({ - url: um_scripts.remove_file, + url: wp.ajax.settings.url, type: 'post', data: { + action: 'um_remove_file', src: src } }); @@ -170,9 +171,10 @@ jQuery(document).ready(function() { parent.find('input[type=hidden]').val('empty_file'); jQuery.ajax({ - url: um_scripts.remove_file, + url: wp.ajax.settings.url, type: 'post', data: { + action: 'um_remove_file', src: src } }); @@ -247,9 +249,10 @@ jQuery(document).ready(function() { var hook = jQuery(this).data('hook'); var container = jQuery(this).parents('.um').find('.um-ajax-items'); jQuery.ajax({ - url: um_scripts.ajax_paginate, + url: wp.ajax.settings.url, type: 'post', data: { + action: 'um_ajax_paginate', hook: hook, args: args }, diff --git a/includes/admin/core/packages/2.0.24/functions.php b/includes/admin/core/packages/2.0.24/functions.php new file mode 100644 index 00000000..b379280a --- /dev/null +++ b/includes/admin/core/packages/2.0.24/functions.php @@ -0,0 +1,10 @@ +files()->remove_dir( UM()->files()->upload_temp ); + + update_option( 'um_last_version_upgrade', '2.0.24' ); + + wp_send_json_success( array( 'message' => __( 'Temporary dir was purged successfully', 'ultimate-member' ) ) ); +} \ No newline at end of file diff --git a/includes/admin/core/packages/2.0.24/hooks.php b/includes/admin/core/packages/2.0.24/hooks.php new file mode 100644 index 00000000..d1820614 --- /dev/null +++ b/includes/admin/core/packages/2.0.24/hooks.php @@ -0,0 +1,5 @@ + 'tempfolder2024', +); \ No newline at end of file diff --git a/includes/admin/core/packages/2.0.24/init.php b/includes/admin/core/packages/2.0.24/init.php new file mode 100644 index 00000000..8d97f6be --- /dev/null +++ b/includes/admin/core/packages/2.0.24/init.php @@ -0,0 +1,29 @@ + + + \ No newline at end of file diff --git a/includes/class-dependencies.php b/includes/class-dependencies.php index 731a4487..4d31beef 100644 --- a/includes/class-dependencies.php +++ b/includes/class-dependencies.php @@ -163,7 +163,7 @@ if ( ! class_exists( 'um\Dependencies' ) ) { } elseif ( empty( $this->ext_required_version[$ext_key] ) || version_compare( $this->ext_required_version[$ext_key], $ext_ver, '>' ) ) { $message = sprintf( __( 'Sorry, but this version of %s does not work with extension "%s" %s version.', 'ultimate-member' ), ultimatemember_plugin_name, $ext_title, $ext_ver ) . '
' . - sprintf( __( 'Please update extension "%s" to the latest version, or install previous versions of %s.', 'ultimate-member' ), $ext_title, ultimatemember_plugin_name ); + sprintf( __( 'Please update extension "%s" to the latest version.', 'ultimate-member' ), $ext_title ); } return $message; diff --git a/includes/core/class-ajax-common.php b/includes/core/class-ajax-common.php index f71f6093..2563d215 100644 --- a/includes/core/class-ajax-common.php +++ b/includes/core/class-ajax-common.php @@ -32,15 +32,14 @@ if ( ! class_exists( 'um\core\AJAX_Common' ) ) { } - - add_action( 'wp_ajax_um_remove_file', array( UM()->files(), 'ajax_remove_file' ) ); add_action( 'wp_ajax_um_delete_profile_photo', array( UM()->profile(), 'ajax_delete_profile_photo' ) ); add_action( 'wp_ajax_um_delete_cover_photo', array( UM()->profile(), 'ajax_delete_cover_photo' ) ); add_action( 'wp_ajax_um_select_options', array( UM()->form(), 'ajax_select_options' ) ); add_action( 'wp_ajax_um_ajax_paginate', array( UM()->query(), 'ajax_paginate' ) ); add_action( 'wp_ajax_um_muted_action', array( UM()->form(), 'ajax_muted_action' ) ); + + add_action( 'wp_ajax_um_remove_file', array( UM()->files(), 'ajax_remove_file' ) ); add_action( 'wp_ajax_nopriv_um_remove_file', array( UM()->files(), 'ajax_remove_file' ) ); - add_action( 'wp_ajax_um_remove_file', array( UM()->files(), 'ajax_remove_file' ) ); add_action( 'wp_ajax_nopriv_um_fileupload', array( UM()->files(), 'ajax_file_upload' ) ); add_action( 'wp_ajax_um_fileupload', array( UM()->files(), 'ajax_file_upload' ) ); diff --git a/includes/core/class-enqueue.php b/includes/core/class-enqueue.php index d2891525..f1a170d6 100644 --- a/includes/core/class-enqueue.php +++ b/includes/core/class-enqueue.php @@ -137,12 +137,7 @@ if ( ! class_exists( 'um\core\Enqueue' ) ) { */ $localize_data = apply_filters( 'um_enqueue_localize_data', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ), - 'remove_file' => UM()->get_ajax_route( 'um\core\Files', 'ajax_remove_file' ), - 'delete_profile_photo' => UM()->get_ajax_route( 'um\core\Profile', 'ajax_delete_profile_photo' ), - 'delete_cover_photo' => UM()->get_ajax_route( 'um\core\Profile', 'ajax_delete_cover_photo' ), - 'resize_image' => UM()->get_ajax_route( 'um\core\Files', 'ajax_resize_image' ), 'muted_action' => UM()->get_ajax_route( 'um\core\Form', 'ajax_muted_action' ), - 'ajax_paginate' => UM()->get_ajax_route( 'um\core\Query', 'ajax_paginate' ), 'ajax_select_options' => UM()->get_ajax_route( 'um\core\Form', 'ajax_select_options' ), ) ); diff --git a/readme.txt b/readme.txt index f30e90c0..0f220f9a 100644 --- a/readme.txt +++ b/readme.txt @@ -6,7 +6,7 @@ Donate link: Tags: community, member, membership, user-profile, user-registration Requires at least: 4.7 Tested up to: 4.9 -Stable tag: 2.0.23 +Stable tag: 2.0.24 License: GNU Version 2 or Any Later Version License URI: http://www.gnu.org/licenses/gpl-3.0.txt @@ -131,6 +131,11 @@ The plugin works with popular caching plugins by automatically excluding Ultimat = Important: UM2.0+ is a significant update to the code base from 1.3.88. Please make sure you take a full-site backup with restore point before updating the plugin = += 2.0.24: August 15, 2018 = + +* Bugfixes: + - Force purge temp files dir + = 2.0.23: August 10, 2018 = * Bugfixes: diff --git a/ultimate-member.php b/ultimate-member.php index c64d7c15..d3340254 100644 --- a/ultimate-member.php +++ b/ultimate-member.php @@ -3,7 +3,7 @@ Plugin Name: Ultimate Member Plugin URI: http://ultimatemember.com/ Description: The easiest way to create powerful online communities and beautiful user profiles with WordPress -Version: 2.0.23 +Version: 2.0.24 Author: Ultimate Member Author URI: http://ultimatemember.com/ Text Domain: ultimate-member