Hide button menu ‘setting’.
-
This plugin is fantastic.
I use the function:
add_filter ('fep_menu_buttons', 'fep_cus_fep_menu_buttons', 99); function fep_cus_fep_menu_buttons ($menu) { ???? unset ($menu ['settings']); ???? return $menu; }
I was wondering if it’s possible to hide the setting button, only if the value of a user field is <11. I tried to write this:
add_filter( 'fep_menu_buttons', function( $menu ){ $user = wp_get_current_user(); if(strlen(get_the_author_meta( $user->ID, 'customfield', true ))<11) unset( $menu['setting'] ); return $menu; }, 99);
It does not work though! I’m not a programmer, can you help me? I would be very grateful. thank you.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Hide button menu ‘setting’.’ is closed to new replies.