mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-11 18:56:10 +09:00
Fixed the "Allowed roles" setting in the member directory
This commit is contained in:
@@ -1,8 +1,19 @@
|
|||||||
<?php
|
<?php
|
||||||
|
/**
|
||||||
|
* Metabox "Privacy Options" on wp-admin > Ultimate Member > Member Directories > Edit.
|
||||||
|
*
|
||||||
|
* @package um\admin\templates
|
||||||
|
*
|
||||||
|
* @var array $box
|
||||||
|
* @var WP_Post $object
|
||||||
|
*/
|
||||||
|
|
||||||
if ( ! defined( 'ABSPATH' ) ) {
|
if ( ! defined( 'ABSPATH' ) ) {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$_um_privacy_roles_value = get_post_meta( $object->ID, '_um_privacy_roles', true );
|
||||||
|
|
||||||
$fields = array(
|
$fields = array(
|
||||||
array(
|
array(
|
||||||
'id' => '_um_privacy',
|
'id' => '_um_privacy',
|
||||||
@@ -26,7 +37,7 @@ $fields = array(
|
|||||||
'options' => UM()->roles()->get_roles(),
|
'options' => UM()->roles()->get_roles(),
|
||||||
'placeholder' => __( 'Choose user roles...', 'ultimate-member' ),
|
'placeholder' => __( 'Choose user roles...', 'ultimate-member' ),
|
||||||
'conditional' => array( '_um_privacy', '=', '3' ),
|
'conditional' => array( '_um_privacy', '=', '3' ),
|
||||||
'value' => UM()->query()->get_meta_value( '_um_privacy_roles', null, 'na' ),
|
'value' => empty( $_um_privacy_roles_value ) ? array() : (array) $_um_privacy_roles_value,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user