- hotfix for nav-menu items restriction content options;

This commit is contained in:
nikitozzzzzzz
2018-04-11 21:00:36 +03:00
parent a27fcf7efd
commit 571f212173
4 changed files with 10 additions and 2 deletions
+4
View File
@@ -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
+1 -1
View File
@@ -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 ] ) : '';
}
}
+4
View File
@@ -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() );
+1 -1
View File
@@ -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;