mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-15 20:53:39 +09:00
- added nonce fields;
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
function um_upgrade_usermetaquery1339() {
|
||||
UM()->admin()->check_ajax_nonce();
|
||||
|
||||
include 'usermeta_query.php';
|
||||
|
||||
update_option( 'um_last_version_upgrade', '1.3.39' );
|
||||
|
||||
+3
-2
@@ -5,11 +5,12 @@
|
||||
um_add_upgrade_log( 'Upgrade Usermeta...' );
|
||||
|
||||
jQuery.ajax({
|
||||
url: '<?php echo admin_url( 'admin-ajax.php' ) ?>',
|
||||
url: wp.ajax.settings.url,
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
action: 'um_usermetaquery1339'
|
||||
action: 'um_usermetaquery1339',
|
||||
nonce: um_admin_scripts.nonce
|
||||
},
|
||||
success: function( response ) {
|
||||
if ( typeof response.data != 'undefined' ) {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
function um_upgrade_styles20beta1() {
|
||||
UM()->admin()->check_ajax_nonce();
|
||||
|
||||
um_maybe_unset_time_limit();
|
||||
|
||||
include 'styles.php';
|
||||
@@ -8,6 +10,8 @@ function um_upgrade_styles20beta1() {
|
||||
|
||||
|
||||
function um_upgrade_user_roles20beta1() {
|
||||
UM()->admin()->check_ajax_nonce();
|
||||
|
||||
um_maybe_unset_time_limit();
|
||||
/**
|
||||
* @var $response_roles_data
|
||||
@@ -19,7 +23,10 @@ function um_upgrade_user_roles20beta1() {
|
||||
|
||||
|
||||
function um_upgrade_get_users_per_role20beta1() {
|
||||
UM()->admin()->check_ajax_nonce();
|
||||
|
||||
um_maybe_unset_time_limit();
|
||||
|
||||
if ( ! empty( $_POST['key_in_meta'] ) ) {
|
||||
$args = array(
|
||||
'meta_query' => array(
|
||||
@@ -43,6 +50,8 @@ function um_upgrade_get_users_per_role20beta1() {
|
||||
|
||||
|
||||
function um_upgrade_update_users_per_page20beta1() {
|
||||
UM()->admin()->check_ajax_nonce();
|
||||
|
||||
um_maybe_unset_time_limit();
|
||||
if ( ! empty( $_POST['key_in_meta'] ) && ! empty( $_POST['role_key'] ) && ! empty( $_POST['page'] ) ) {
|
||||
$users_per_page = 100;
|
||||
@@ -85,6 +94,8 @@ function um_upgrade_update_users_per_page20beta1() {
|
||||
|
||||
|
||||
function um_upgrade_content_restriction20beta1() {
|
||||
UM()->admin()->check_ajax_nonce();
|
||||
|
||||
um_maybe_unset_time_limit();
|
||||
|
||||
include 'content_restriction.php';
|
||||
@@ -94,6 +105,8 @@ function um_upgrade_content_restriction20beta1() {
|
||||
|
||||
|
||||
function um_upgrade_settings20beta1() {
|
||||
UM()->admin()->check_ajax_nonce();
|
||||
|
||||
um_maybe_unset_time_limit();
|
||||
|
||||
include 'settings.php';
|
||||
@@ -102,6 +115,8 @@ function um_upgrade_settings20beta1() {
|
||||
|
||||
|
||||
function um_upgrade_menus20beta1() {
|
||||
UM()->admin()->check_ajax_nonce();
|
||||
|
||||
um_maybe_unset_time_limit();
|
||||
|
||||
include 'menus.php';
|
||||
@@ -110,6 +125,8 @@ function um_upgrade_menus20beta1() {
|
||||
|
||||
|
||||
function um_upgrade_mc_lists20beta1() {
|
||||
UM()->admin()->check_ajax_nonce();
|
||||
|
||||
um_maybe_unset_time_limit();
|
||||
|
||||
include 'mc_lists.php';
|
||||
@@ -118,6 +135,8 @@ function um_upgrade_mc_lists20beta1() {
|
||||
|
||||
|
||||
function um_upgrade_social_login20beta1() {
|
||||
UM()->admin()->check_ajax_nonce();
|
||||
|
||||
um_maybe_unset_time_limit();
|
||||
|
||||
include 'social_login.php';
|
||||
@@ -126,6 +145,8 @@ function um_upgrade_social_login20beta1() {
|
||||
|
||||
|
||||
function um_upgrade_cpt20beta1() {
|
||||
UM()->admin()->check_ajax_nonce();
|
||||
|
||||
um_maybe_unset_time_limit();
|
||||
|
||||
include 'um_cpt.php';
|
||||
@@ -134,6 +155,8 @@ function um_upgrade_cpt20beta1() {
|
||||
|
||||
|
||||
function um_upgrade_get_forums20beta1() {
|
||||
UM()->admin()->check_ajax_nonce();
|
||||
|
||||
um_maybe_unset_time_limit();
|
||||
|
||||
remove_all_actions( 'pre_get_posts' );
|
||||
@@ -149,6 +172,8 @@ function um_upgrade_get_forums20beta1() {
|
||||
|
||||
|
||||
function um_upgrade_update_forum_per_page20beta1() {
|
||||
UM()->admin()->check_ajax_nonce();
|
||||
|
||||
um_maybe_unset_time_limit();
|
||||
|
||||
if ( ! empty( $_POST['page'] ) ) {
|
||||
@@ -205,6 +230,8 @@ function um_upgrade_update_forum_per_page20beta1() {
|
||||
|
||||
|
||||
function um_upgrade_get_products20beta1() {
|
||||
UM()->admin()->check_ajax_nonce();
|
||||
|
||||
um_maybe_unset_time_limit();
|
||||
|
||||
$wc_products = get_posts( array(
|
||||
@@ -218,6 +245,8 @@ function um_upgrade_get_products20beta1() {
|
||||
|
||||
|
||||
function um_upgrade_update_products_per_page20beta1() {
|
||||
UM()->admin()->check_ajax_nonce();
|
||||
|
||||
um_maybe_unset_time_limit();
|
||||
|
||||
if ( ! empty( $_POST['page'] ) ) {
|
||||
@@ -296,6 +325,8 @@ function um_upgrade_update_products_per_page20beta1() {
|
||||
|
||||
|
||||
function um_upgrade_email_templates20beta1() {
|
||||
UM()->admin()->check_ajax_nonce();
|
||||
|
||||
um_maybe_unset_time_limit();
|
||||
|
||||
include 'email_templates.php';
|
||||
|
||||
@@ -13,11 +13,12 @@
|
||||
um_add_upgrade_log( '<?php echo esc_js( __( 'Upgrade Styles...', 'ultimate-member' ) ) ?>' );
|
||||
|
||||
jQuery.ajax({
|
||||
url: '<?php echo admin_url( 'admin-ajax.php' ) ?>',
|
||||
url: wp.ajax.settings.url,
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
action: 'um_styles20beta1'
|
||||
action: 'um_styles20beta1',
|
||||
nonce: um_admin_scripts.nonce
|
||||
},
|
||||
success: function( response ) {
|
||||
if ( typeof response.data != 'undefined' ) {
|
||||
@@ -36,11 +37,12 @@
|
||||
function upgrade_roles() {
|
||||
um_add_upgrade_log( '<?php echo esc_js( __( 'Upgrade Roles...', 'ultimate-member' ) ) ?>' );
|
||||
jQuery.ajax({
|
||||
url: '<?php echo admin_url( 'admin-ajax.php' ) ?>',
|
||||
url: wp.ajax.settings.url,
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
action: 'um_user_roles20beta1'
|
||||
action: 'um_user_roles20beta1',
|
||||
nonce: um_admin_scripts.nonce
|
||||
},
|
||||
success: function( response ) {
|
||||
if ( typeof response.data != 'undefined' ) {
|
||||
@@ -70,12 +72,13 @@
|
||||
var role = um_roles_data.shift();
|
||||
um_add_upgrade_log( '<?php echo esc_js( __( 'Getting ', 'ultimate-member' ) ) ?>"' + role.role_key + '"<?php echo esc_js( __( ' users...', 'ultimate-member' ) ) ?>' );
|
||||
jQuery.ajax({
|
||||
url: '<?php echo admin_url( 'admin-ajax.php' ) ?>',
|
||||
url: wp.ajax.settings.url,
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
action: 'um_get_users_per_role20beta1',
|
||||
key_in_meta: role.key_in_meta
|
||||
key_in_meta: role.key_in_meta,
|
||||
nonce: um_admin_scripts.nonce
|
||||
},
|
||||
success: function( response ) {
|
||||
if ( typeof response.data.count != 'undefined' ) {
|
||||
@@ -103,14 +106,15 @@
|
||||
function update_user_per_page( role_key, key_in_meta ) {
|
||||
if ( current_page <= users_pages ) {
|
||||
jQuery.ajax({
|
||||
url: '<?php echo admin_url( 'admin-ajax.php' ) ?>',
|
||||
url: wp.ajax.settings.url,
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
action: 'um_update_users_per_page20beta1',
|
||||
role_key: role_key,
|
||||
key_in_meta: key_in_meta,
|
||||
page: current_page
|
||||
page: current_page,
|
||||
nonce: um_admin_scripts.nonce
|
||||
},
|
||||
success: function( response ) {
|
||||
if ( typeof response.data != 'undefined' ) {
|
||||
@@ -135,11 +139,12 @@
|
||||
um_add_upgrade_log( '<?php echo esc_js( __( 'Upgrade Content Restriction Settings...', 'ultimate-member' ) ) ?>' );
|
||||
|
||||
jQuery.ajax({
|
||||
url: '<?php echo admin_url( 'admin-ajax.php' ) ?>',
|
||||
url: wp.ajax.settings.url,
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
action: 'um_content_restriction20beta1'
|
||||
action: 'um_content_restriction20beta1',
|
||||
nonce: um_admin_scripts.nonce
|
||||
},
|
||||
success: function( response ) {
|
||||
if ( typeof response.data != 'undefined' ) {
|
||||
@@ -160,11 +165,12 @@
|
||||
um_add_upgrade_log( '<?php echo esc_js( __( 'Upgrade Settings...', 'ultimate-member' ) ) ?>' );
|
||||
|
||||
jQuery.ajax({
|
||||
url: '<?php echo admin_url( 'admin-ajax.php' ) ?>',
|
||||
url: wp.ajax.settings.url,
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
action: 'um_settings20beta1'
|
||||
action: 'um_settings20beta1',
|
||||
nonce: um_admin_scripts.nonce
|
||||
},
|
||||
success: function( response ) {
|
||||
if ( typeof response.data != 'undefined' ) {
|
||||
@@ -185,11 +191,12 @@
|
||||
um_add_upgrade_log( '<?php echo esc_js( __( 'Upgrade Menu Items...', 'ultimate-member' ) ) ?>' );
|
||||
|
||||
jQuery.ajax({
|
||||
url: '<?php echo admin_url( 'admin-ajax.php' ) ?>',
|
||||
url: wp.ajax.settings.url,
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
action: 'um_menus20beta1'
|
||||
action: 'um_menus20beta1',
|
||||
nonce: um_admin_scripts.nonce
|
||||
},
|
||||
success: function( response ) {
|
||||
if ( typeof response.data != 'undefined' ) {
|
||||
@@ -210,11 +217,12 @@
|
||||
um_add_upgrade_log( '<?php echo esc_js( __( 'Upgrade Mailchimp Lists...', 'ultimate-member' ) ) ?>' );
|
||||
|
||||
jQuery.ajax({
|
||||
url: '<?php echo admin_url( 'admin-ajax.php' ) ?>',
|
||||
url: wp.ajax.settings.url,
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
action: 'um_mc_lists20beta1'
|
||||
action: 'um_mc_lists20beta1',
|
||||
nonce: um_admin_scripts.nonce
|
||||
},
|
||||
success: function( response ) {
|
||||
if ( typeof response.data != 'undefined' ) {
|
||||
@@ -235,11 +243,12 @@
|
||||
um_add_upgrade_log( '<?php echo esc_js( __( 'Upgrade Social Login Forms...', 'ultimate-member' ) ) ?>' );
|
||||
|
||||
jQuery.ajax({
|
||||
url: '<?php echo admin_url( 'admin-ajax.php' ) ?>',
|
||||
url: wp.ajax.settings.url,
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
action: 'um_social_login20beta1'
|
||||
action: 'um_social_login20beta1',
|
||||
nonce: um_admin_scripts.nonce
|
||||
},
|
||||
success: function( response ) {
|
||||
if ( typeof response.data != 'undefined' ) {
|
||||
@@ -260,11 +269,12 @@
|
||||
um_add_upgrade_log( '<?php echo esc_js( __( 'Upgrade UM Custom Post Types...', 'ultimate-member' ) ) ?>' );
|
||||
|
||||
jQuery.ajax({
|
||||
url: '<?php echo admin_url( 'admin-ajax.php' ) ?>',
|
||||
url: wp.ajax.settings.url,
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
action: 'um_cpt20beta1'
|
||||
action: 'um_cpt20beta1',
|
||||
nonce: um_admin_scripts.nonce
|
||||
},
|
||||
success: function( response ) {
|
||||
if ( typeof response.data != 'undefined' ) {
|
||||
@@ -286,11 +296,12 @@
|
||||
um_add_upgrade_log( '<?php echo esc_js( __( 'Get bbPress Forums count...', 'ultimate-member' ) ) ?>' );
|
||||
current_page = 1;
|
||||
jQuery.ajax({
|
||||
url: '<?php echo admin_url( 'admin-ajax.php' ) ?>',
|
||||
url: wp.ajax.settings.url,
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
action: 'um_get_forums20beta1'
|
||||
action: 'um_get_forums20beta1',
|
||||
nonce: um_admin_scripts.nonce
|
||||
},
|
||||
success: function( response ) {
|
||||
if ( typeof response.data != 'undefined' ) {
|
||||
@@ -313,12 +324,13 @@
|
||||
function update_forums_per_page() {
|
||||
if ( current_page <= forums_pages ) {
|
||||
jQuery.ajax({
|
||||
url: '<?php echo admin_url( 'admin-ajax.php' ) ?>',
|
||||
url: wp.ajax.settings.url,
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
action: 'um_update_forum_per_page20beta1',
|
||||
page: current_page
|
||||
page: current_page,
|
||||
nonce: um_admin_scripts.nonce
|
||||
},
|
||||
success: function( response ) {
|
||||
if ( typeof response.data != 'undefined' ) {
|
||||
@@ -346,11 +358,12 @@
|
||||
current_page = 1;
|
||||
|
||||
jQuery.ajax({
|
||||
url: '<?php echo admin_url( 'admin-ajax.php' ) ?>',
|
||||
url: wp.ajax.settings.url,
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
action: 'um_get_products20beta1'
|
||||
action: 'um_get_products20beta1',
|
||||
nonce: um_admin_scripts.nonce
|
||||
},
|
||||
success: function( response ) {
|
||||
if ( typeof response.data != 'undefined' ) {
|
||||
@@ -373,12 +386,13 @@
|
||||
function update_products_per_page() {
|
||||
if ( current_page <= products_pages ) {
|
||||
jQuery.ajax({
|
||||
url: '<?php echo admin_url( 'admin-ajax.php' ) ?>',
|
||||
url: wp.ajax.settings.url,
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
action: 'um_update_products_per_page20beta1',
|
||||
page: current_page
|
||||
page: current_page,
|
||||
nonce: um_admin_scripts.nonce
|
||||
},
|
||||
success: function( response ) {
|
||||
if ( typeof response.data != 'undefined' ) {
|
||||
@@ -402,11 +416,12 @@
|
||||
function upgrade_email_templates() {
|
||||
um_add_upgrade_log( '<?php echo esc_js( __( 'Upgrade Email Templates...', 'ultimate-member' ) ) ?>' );
|
||||
jQuery.ajax({
|
||||
url: '<?php echo admin_url( 'admin-ajax.php' ) ?>',
|
||||
url: wp.ajax.settings.url,
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
action: 'um_email_templates20beta1'
|
||||
action: 'um_email_templates20beta1',
|
||||
nonce: um_admin_scripts.nonce
|
||||
},
|
||||
success: function( response ) {
|
||||
if ( typeof response.data != 'undefined' ) {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
function um_upgrade_styles2010() {
|
||||
UM()->admin()->check_ajax_nonce();
|
||||
|
||||
um_maybe_unset_time_limit();
|
||||
|
||||
include 'styles.php';
|
||||
@@ -8,6 +10,8 @@ function um_upgrade_styles2010() {
|
||||
|
||||
|
||||
function um_upgrade_cache2010() {
|
||||
UM()->admin()->check_ajax_nonce();
|
||||
|
||||
um_maybe_unset_time_limit();
|
||||
|
||||
UM()->user()->remove_cache_all_users();
|
||||
|
||||
+6
-4
@@ -6,11 +6,12 @@
|
||||
um_add_upgrade_log( '<?php echo esc_js( __( 'Upgrade Styles...', 'ultimate-member' ) ) ?>' );
|
||||
|
||||
jQuery.ajax({
|
||||
url: '<?php echo admin_url( 'admin-ajax.php' ) ?>',
|
||||
url: wp.ajax.settings.url,
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
action: 'um_styles2010'
|
||||
action: 'um_styles2010',
|
||||
nonce: um_admin_scripts.nonce
|
||||
},
|
||||
success: function( response ) {
|
||||
if ( typeof response.data != 'undefined' ) {
|
||||
@@ -30,11 +31,12 @@
|
||||
function um_clear_cache2010() {
|
||||
um_add_upgrade_log( '<?php echo esc_js( __( 'Clear Users Cache...', 'ultimate-member' ) ) ?>' );
|
||||
jQuery.ajax({
|
||||
url: '<?php echo admin_url( 'admin-ajax.php' ) ?>',
|
||||
url: wp.ajax.settings.url,
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
action: 'um_cache2010'
|
||||
action: 'um_cache2010',
|
||||
nonce: um_admin_scripts.nonce
|
||||
},
|
||||
success: function( response ) {
|
||||
if ( typeof response.data != 'undefined' ) {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
function um_upgrade_tempfolder2024() {
|
||||
UM()->admin()->check_ajax_nonce();
|
||||
|
||||
um_maybe_unset_time_limit();
|
||||
|
||||
UM()->files()->remove_dir( UM()->files()->upload_temp );
|
||||
|
||||
+3
-2
@@ -6,11 +6,12 @@
|
||||
um_add_upgrade_log( '<?php echo esc_js( __( 'Purge temp files dir...', 'ultimate-member' ) ) ?>' );
|
||||
|
||||
jQuery.ajax({
|
||||
url: '<?php echo admin_url( 'admin-ajax.php' ) ?>',
|
||||
url: wp.ajax.settings.url,
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
action: 'um_tempfolder2024'
|
||||
action: 'um_tempfolder2024',
|
||||
nonce: um_admin_scripts.nonce
|
||||
},
|
||||
success: function( response ) {
|
||||
if ( typeof response.data != 'undefined' ) {
|
||||
|
||||
Reference in New Issue
Block a user