mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-15 12:43:33 +09:00
- fixed Ultimate Member wrapper's visibility on add/edit user page;
This commit is contained in:
@@ -9,8 +9,14 @@ jQuery( document ).ready( function() {
|
||||
if ( jQuery.inArray( jQuery(this).val().substr(3), um_roles ) !== -1 ) {
|
||||
jQuery( '#um_role_selector_wrapper' ).hide();
|
||||
jQuery( '#um-role' ).val('');
|
||||
|
||||
var hide = wp.hooks.applyFilters( 'um_user_screen_block_hiding', true );
|
||||
if ( hide ) {
|
||||
jQuery( '#um_user_screen_block' ).hide();
|
||||
}
|
||||
} else {
|
||||
jQuery( '#um_role_selector_wrapper' ).show();
|
||||
jQuery( '#um_user_screen_block' ).show();
|
||||
}
|
||||
}).trigger('change');
|
||||
|
||||
@@ -22,8 +28,14 @@ jQuery( document ).ready( function() {
|
||||
if ( jQuery.inArray( jQuery(this).val().substr(3), um_roles ) !== -1 ) {
|
||||
jQuery( '#um_role_existing_selector_wrapper' ).hide();
|
||||
jQuery( '#um-role' ).val('');
|
||||
|
||||
var hide = wp.hooks.applyFilters( 'um_user_screen_block_hiding', true );
|
||||
if ( hide ) {
|
||||
jQuery( '#um_user_screen_block' ).hide();
|
||||
}
|
||||
} else {
|
||||
jQuery( '#um_role_existing_selector_wrapper' ).show();
|
||||
jQuery( '#um_user_screen_block' ).show();
|
||||
}
|
||||
}).trigger('change');
|
||||
|
||||
|
||||
@@ -1213,7 +1213,7 @@ if ( ! class_exists( 'um\admin\core\Admin_Metabox' ) ) {
|
||||
|
||||
if ( $this->in_edit == true ) { // we're editing a field
|
||||
$real_attr = substr( $attribute, 1 );
|
||||
$this->edit_mode_value = (isset( $this->edit_array[ $real_attr ] ) ) ? $this->edit_array[ $real_attr ] : null;
|
||||
$this->edit_mode_value = (isset( $this->edit_array[ $real_attr ] ) ) ? $this->edit_array[ $real_attr ] : null;
|
||||
}
|
||||
|
||||
switch ( $attribute ) {
|
||||
|
||||
@@ -219,6 +219,8 @@ if ( ! class_exists( 'um\core\Member_Directory_Meta' ) ) {
|
||||
*/
|
||||
$skip_default = apply_filters( "um_query_args_{$field}__filter_meta", false, $this, $field, $value, $filter_type, $is_default );
|
||||
|
||||
$skip_default = apply_filters( 'um_query_args_filter_global_meta', $skip_default, $this, $field, $value, $filter_type, $is_default );
|
||||
|
||||
if ( ! $skip_default ) {
|
||||
|
||||
switch ( $filter_type ) {
|
||||
|
||||
@@ -1528,6 +1528,8 @@ if ( ! class_exists( 'um\core\Member_Directory' ) ) {
|
||||
*/
|
||||
$field_query = apply_filters( "um_query_args_{$field}__filter", false, $field, $value, $filter_type );
|
||||
|
||||
$field_query = apply_filters( 'um_query_args_filter_global', $field_query, $field, $value, $filter_type );
|
||||
|
||||
if ( ! $field_query ) {
|
||||
|
||||
switch ( $filter_type ) {
|
||||
|
||||
@@ -709,7 +709,7 @@ if ( ! class_exists( 'um\core\User' ) ) {
|
||||
if ( ! empty( $section_content ) && ! ( is_multisite() && is_network_admin() ) ) {
|
||||
|
||||
if ( $userdata !== 'add-new-user' && $userdata !== 'add-existing-user' ) { ?>
|
||||
<h3><?php esc_html_e( 'Ultimate Member', 'ultimate-member' ); ?></h3>
|
||||
<h3 id="um_user_screen_block"><?php esc_html_e( 'Ultimate Member', 'ultimate-member' ); ?></h3>
|
||||
<?php }
|
||||
|
||||
echo $section_content;
|
||||
|
||||
Reference in New Issue
Block a user