mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
Merge branch 'master' of https://github.com/ultimatemember/ultimatemember into feature/gdpr
This commit is contained in:
@@ -18,9 +18,15 @@ $menus = get_posts( array(
|
||||
foreach ( $menus as $menu ) {
|
||||
$menu_roles = get_post_meta( $menu->ID, 'menu-item-um_nav_roles', true );
|
||||
|
||||
foreach ( $menu_roles as $i => $role_k ) {
|
||||
$menu_roles[ $i ] = $roles_associations[ $role_k ];
|
||||
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 );
|
||||
}
|
||||
Reference in New Issue
Block a user