PATH:
home
/
lab2454c
/
nfsin.com
/
wp-content
/
plugins
/
ultimate-member
/
includes
/
admin
/
core
/
packages
/
2.0-beta1
<?php $roles_associations = get_option( 'um_roles_associations' ); /** * Transferring menu restriction data */ $menus = get_posts( array( 'post_type' => 'nav_menu_item', 'meta_query' => array( array( 'key' => 'menu-item-um_nav_roles', 'compare' => 'EXISTS', ) ), 'numberposts' => -1, ) ); foreach ( $menus as $menu ) { $menu_roles = get_post_meta( $menu->ID, 'menu-item-um_nav_roles', true ); if( !is_array( $menu_roles ) ) { $menu_roles = array(); } foreach ( $menu_roles as $i => $role_k ) { if( $role_k != '' && isset( $roles_associations[ $role_k ] ) ) { $menu_roles[ $i ] = $roles_associations[ $role_k ]; } } update_post_meta( $menu->ID, 'menu-item-um_nav_roles', $menu_roles ); }
[-] styles.php
[edit]
[+]
..
[-] settings.php
[edit]
[-] mc_lists.php
[edit]
[-] init.php
[edit]
[-] hooks.php
[edit]
[-] menus.php
[edit]
[-] um_cpt.php
[edit]
[-] .htaccess
[edit]
[-] functions.php
[edit]
[-] social_login.php
[edit]
[-] email_templates.php
[edit]
[-] content_restriction.php
[edit]
[-] user_roles.php
[edit]