mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
- hotfix for nav-menu items restriction content options;
This commit is contained in:
@@ -924,6 +924,10 @@ if ( ! class_exists( 'um\core\Access' ) ) {
|
||||
if ( empty( $menu_items ) )
|
||||
return $menu_items;
|
||||
|
||||
if ( current_user_can( 'administrator' ) ) {
|
||||
return $menu_items;
|
||||
}
|
||||
|
||||
$filtered_items = array();
|
||||
|
||||
//other filter
|
||||
|
||||
@@ -161,7 +161,7 @@ if ( ! class_exists( 'um\core\Shortcodes' ) ) {
|
||||
|
||||
if ( ! empty( $role ) && ! empty( $role["status"] ) ) {
|
||||
$message_key = $role["status"] . '_message';
|
||||
$this->custom_message = ! empty( $role[ $message_key ] ) ? $role[ $message_key ] : '';
|
||||
$this->custom_message = ! empty( $role[ $message_key ] ) ? stripslashes( $role[ $message_key ] ) : '';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -36,6 +36,10 @@ if ( ! is_admin() ) {
|
||||
*/
|
||||
function um_conditional_nav_menu( $items, $menu, $args ) {
|
||||
|
||||
if ( current_user_can( 'administrator' ) ) {
|
||||
return $items;
|
||||
}
|
||||
|
||||
$hide_children_of = array();
|
||||
|
||||
um_fetch_user( get_current_user_id() );
|
||||
|
||||
@@ -152,7 +152,7 @@ if ( ! class_exists( 'UM_Menu_Item_Custom_Fields_Editor' ) ) {
|
||||
<p class="description description-wide um-nav-roles" <# if( data.restriction_data.um_nav_public == '2' ){ #>style="display: block;"<# } #>>
|
||||
<?php _e( "Select the member roles that can see this link", 'ultimate-member' ) ?><br/>
|
||||
|
||||
<?php $options = UM()->roles()->get_roles();
|
||||
<?php $options = UM()->roles()->get_roles( false, array( 'administrator' ) );
|
||||
$i = 0;
|
||||
$html = '';
|
||||
$columns = 2;
|
||||
|
||||
Reference in New Issue
Block a user