mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
- using slashes in the callback function setting of the dropdown fields;
This commit is contained in:
@@ -132,13 +132,14 @@ if ( ! class_exists( 'um\core\Form' ) ) {
|
||||
}
|
||||
|
||||
$allowed_callbacks = UM()->options()->get( 'allowed_choice_callbacks' );
|
||||
|
||||
if ( empty( $allowed_callbacks ) ) {
|
||||
$arr_options['status'] = 'error';
|
||||
$arr_options['message'] = __( 'This is not possible for security reasons.', 'ultimate-member' );
|
||||
wp_send_json( $arr_options );
|
||||
}
|
||||
|
||||
$allowed_callbacks = array_map( 'rtrim', explode( "\n", $allowed_callbacks ) );
|
||||
$allowed_callbacks = array_map( 'rtrim', explode( "\n", wp_unslash( $allowed_callbacks ) ) );
|
||||
|
||||
if ( ! in_array( $ajax_source_func, $allowed_callbacks, true ) ) {
|
||||
$arr_options['status'] = 'error';
|
||||
|
||||
Reference in New Issue
Block a user