mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
Merge branch 'master' of https://github.com/ultimatemember/ultimatemember
This commit is contained in:
@@ -305,9 +305,10 @@ if ( ! class_exists( 'um\admin\core\Admin_Builder' ) ) {
|
||||
* Update the builder area
|
||||
*/
|
||||
function update_builder() {
|
||||
UM()->admin()->check_ajax_nonce();
|
||||
|
||||
if ( ! is_user_logged_in() || ! current_user_can( 'manage_options' ) ) {
|
||||
die( 'Please login as administrator' );
|
||||
wp_send_json_error( __( 'Please login as administrator', 'ultimate-member' ) );
|
||||
}
|
||||
|
||||
extract( $_POST );
|
||||
@@ -618,8 +619,11 @@ if ( ! class_exists( 'um\admin\core\Admin_Builder' ) ) {
|
||||
*
|
||||
*/
|
||||
function update_field() {
|
||||
if ( ! is_user_logged_in() || ! current_user_can( 'manage_options' ) )
|
||||
die( __('Please login as administrator','ultimate-member') );
|
||||
UM()->admin()->check_ajax_nonce();
|
||||
|
||||
if ( ! is_user_logged_in() || ! current_user_can( 'manage_options' ) ) {
|
||||
wp_send_json_error( __( 'Please login as administrator', 'ultimate-member' ) );
|
||||
}
|
||||
|
||||
$output['error'] = null;
|
||||
|
||||
@@ -770,12 +774,14 @@ if ( ! class_exists( 'um\admin\core\Admin_Builder' ) ) {
|
||||
*
|
||||
*/
|
||||
function dynamic_modal_content() {
|
||||
$metabox = UM()->metabox();
|
||||
UM()->admin()->check_ajax_nonce();
|
||||
|
||||
if ( ! is_user_logged_in() || ! current_user_can( 'manage_options' ) ) {
|
||||
die( __( 'Please login as administrator', 'ultimate-member' ) );
|
||||
wp_send_json_error( __( 'Please login as administrator', 'ultimate-member' ) );
|
||||
}
|
||||
|
||||
$metabox = UM()->metabox();
|
||||
|
||||
/**
|
||||
* @var $act_id
|
||||
* @var $arg1
|
||||
@@ -1144,12 +1150,14 @@ if ( ! class_exists( 'um\admin\core\Admin_Builder' ) ) {
|
||||
* Retrieves dropdown/multi-select options from a callback function
|
||||
*/
|
||||
function populate_dropdown_options() {
|
||||
$arr_options = array();
|
||||
UM()->admin()->check_ajax_nonce();
|
||||
|
||||
if ( ! current_user_can('manage_options') ) {
|
||||
wp_die( __( 'This is not possible for security reasons.', 'ultimate-member' ) );
|
||||
if ( ! is_user_logged_in() || ! current_user_can( 'manage_options' ) ) {
|
||||
wp_send_json_error( __( 'This is not possible for security reasons.', 'ultimate-member' ) );
|
||||
}
|
||||
|
||||
$arr_options = array();
|
||||
|
||||
$um_callback_func = $_POST['um_option_callback'];
|
||||
if ( empty( $um_callback_func ) ) {
|
||||
$arr_options['status'] = 'empty';
|
||||
@@ -1158,7 +1166,6 @@ if ( ! class_exists( 'um\admin\core\Admin_Builder' ) ) {
|
||||
}
|
||||
|
||||
$arr_options['data'] = array();
|
||||
|
||||
if ( function_exists( $um_callback_func ) ) {
|
||||
$arr_options['data'] = call_user_func( $um_callback_func );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user