mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-19 14:43:49 +09:00
- minified scripts;
- wpcs;
This commit is contained in:
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -1 +1 @@
|
||||
function unselectEmptyOption(e){var u=jQuery(e.currentTarget),e=u.find(":selected");1<e.length&&e.each(function(e,t){""===t.value&&(t.selected=!1,u.trigger("change"))})}jQuery(window).on("load",function(e){new MutationObserver(function(e){e.forEach(function(e){jQuery(e.addedNodes).find(".um.um-directory").each(function(){jQuery(".um-directory input, .um-directory select, .um-directory button").attr("disabled","disabled"),jQuery(".um-directory a").attr("href",""),"function"==typeof jQuery.fn.select2&&(jQuery(".um-s1").each(function(e){var t=jQuery(this);t.select2({allowClear:!0,dropdownParent:t.parent()}).on("change",unselectEmptyOption)}),jQuery(".um-s2").each(function(e){var t=jQuery(this),u={},u=t.parents(".um-custom-shortcode-tab").length?{allowClear:!1}:{allowClear:!1,minimumResultsForSearch:10,dropdownParent:t.parent()};t.select2(u).on("change",unselectEmptyOption)}),jQuery(".um-s3").each(function(e){var t=jQuery(this);t.select2({allowClear:!1,minimumResultsForSearch:-1,dropdownParent:t.parent()}).on("change",unselectEmptyOption)}))}),jQuery(e.addedNodes).find(".um.um-profile").each(function(){jQuery(".um-profile input, .um-profile select, .um-profile button").attr("disabled","disabled"),jQuery(".um-profile a").attr("href","")}),jQuery(e.addedNodes).find(".um.um-account").each(function(){jQuery(".um-account input, .um-account select, .um-account button").attr("disabled","disabled"),jQuery(".um-account a").attr("href","")}),jQuery(e.addedNodes).find(".um.um-password").each(function(){jQuery(".um-password input, .um-password select, .um-password button").attr("disabled","disabled"),jQuery(".um-password a").attr("href","")})})}).observe(document,{attributes:!1,childList:!0,characterData:!1,subtree:!0})});
|
||||
function unselectEmptyOption(e){var u=jQuery(e.currentTarget),e=u.find(":selected");1<e.length&&e.each(function(e,t){""===t.value&&(t.selected=!1,u.trigger("change"))})}jQuery(window).on("load",function(e){new MutationObserver(function(e){e.forEach(function(e){jQuery(e.addedNodes).find(".um.um-directory").each(function(){jQuery(".um-directory button").attr("disabled","disabled"),jQuery(".um-directory a").attr("href",""),"function"==typeof jQuery.fn.select2&&(jQuery(".um-s1").each(function(e){var t=jQuery(this);t.select2({allowClear:!0,dropdownParent:t.parent()}).on("change",unselectEmptyOption)}),jQuery(".um-s2").each(function(e){var t=jQuery(this),u={},u=t.parents(".um-custom-shortcode-tab").length?{allowClear:!1}:{allowClear:!1,minimumResultsForSearch:10,dropdownParent:t.parent()};t.select2(u).on("change",unselectEmptyOption)}),jQuery(".um-s3").each(function(e){var t=jQuery(this);t.select2({allowClear:!1,minimumResultsForSearch:-1,dropdownParent:t.parent()}).on("change",unselectEmptyOption)}))}),jQuery(e.addedNodes).find(".um.um-profile").each(function(){jQuery(".um-profile input, .um-profile select, .um-profile button").attr("disabled","disabled"),jQuery(".um-profile a").attr("href","")}),jQuery(e.addedNodes).find(".um.um-account").each(function(){jQuery(".um-account input, .um-account select, .um-account button").attr("disabled","disabled"),jQuery(".um-account a").attr("href","")}),jQuery(e.addedNodes).find(".um.um-password").each(function(){jQuery(".um-password input, .um-password select, .um-password button").attr("disabled","disabled"),jQuery(".um-password a").attr("href","")})})}).observe(document,{attributes:!1,childList:!0,characterData:!1,subtree:!0})});
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -116,6 +116,8 @@ if ( ! class_exists( 'um\core\Form' ) ) {
|
||||
public function ajax_select_options() {
|
||||
UM()->check_ajax_nonce();
|
||||
|
||||
// phpcs:disable WordPress.Security.NonceVerification
|
||||
|
||||
$arr_options = array();
|
||||
$arr_options['status'] = 'success';
|
||||
$arr_options['post'] = $_POST;
|
||||
@@ -164,9 +166,9 @@ if ( ! class_exists( 'um\core\Form' ) ) {
|
||||
if ( isset( $_POST['form_id'] ) ) {
|
||||
UM()->fields()->set_id = absint( $_POST['form_id'] );
|
||||
}
|
||||
UM()->fields()->set_mode = 'profile';
|
||||
$form_fields = UM()->fields()->get_fields();
|
||||
$arr_options['fields'] = $form_fields;
|
||||
UM()->fields()->set_mode = 'profile';
|
||||
$form_fields = UM()->fields()->get_fields();
|
||||
$arr_options['fields'] = $form_fields;
|
||||
|
||||
if ( isset( $arr_options['post']['members_directory'] ) && 'yes' === $arr_options['post']['members_directory'] ) {
|
||||
global $wpdb;
|
||||
@@ -242,6 +244,7 @@ if ( ! class_exists( 'um\core\Form' ) ) {
|
||||
}
|
||||
}
|
||||
|
||||
// phpcs:enable WordPress.Security.NonceVerification
|
||||
wp_send_json( $arr_options );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user