Replies: 0
Not sure when this came up or how it came up but it did. I have this error popping up a few times:
PHP Notice: Undefined variable: role in /wp-content/plugins/editor-menu-and-widget-access/admin/menus.php on line 13
If for whatever reason ( in theory every user should have roles ) this conditional is false:
if ( ! empty( $user->roles ) && is_array( $user->roles ) )
It throws an error. One solution to this would be to just declare $role at above the conditional at the top of the function as $role = false
since it’s checking against specific roles. Just a thought, otherwise is a great plugin!