mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-19 14:43:49 +09:00
Merge branch 'release/2.0.24'
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
function um_upgrade_tempfolder2024() {
|
||||
um_maybe_unset_time_limit();
|
||||
|
||||
UM()->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' ) ) );
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
'tempfolder2024' => 'tempfolder2024',
|
||||
);
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
<?php ?>
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery( document ).ready( function() {
|
||||
//upgrade styles
|
||||
um_add_upgrade_log( '<?php echo esc_js( __( 'Purge temp files dir...', 'ultimate-member' ) ) ?>' );
|
||||
|
||||
jQuery.ajax({
|
||||
url: '<?php echo admin_url( 'admin-ajax.php' ) ?>',
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
action: 'um_tempfolder2024'
|
||||
},
|
||||
success: function( response ) {
|
||||
if ( typeof response.data != 'undefined' ) {
|
||||
um_add_upgrade_log( response.data.message );
|
||||
//switch to the next package
|
||||
um_run_upgrade();
|
||||
} else {
|
||||
um_wrong_ajax();
|
||||
}
|
||||
},
|
||||
error: function() {
|
||||
um_something_wrong();
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -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 <strong>%s</strong> does not work with extension <strong>"%s" %s</strong> version.', 'ultimate-member' ), ultimatemember_plugin_name, $ext_title, $ext_ver ) .
|
||||
'<br />' .
|
||||
sprintf( __( 'Please update extension <strong>"%s"</strong> to the latest version, or install previous versions of <strong>%s</strong>.', 'ultimate-member' ), $ext_title, ultimatemember_plugin_name );
|
||||
sprintf( __( 'Please update extension <strong>"%s"</strong> to the latest version.', 'ultimate-member' ), $ext_title );
|
||||
}
|
||||
|
||||
return $message;
|
||||
|
||||
@@ -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' ) );
|
||||
|
||||
@@ -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' ),
|
||||
) );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user