Quantcast
Channel: WordPress.org Forums » [Contact Form 7] Support
Viewing all articles
Browse latest Browse all 49500

whatif6000 on "[Plugin: Contact Form 7] bbpress subscribers can edit contact form 7"

$
0
0

Thank you
I did find on a forum somewhere this code below for functions.php.
It worked fine for me and is of course better to stop being overwritten in updates.

/* start remove contact 7 form from user menu*/
function remove_contact_menu () {
global $menu;
	$restricted = array(__('Contact'));
	end ($menu);
	while (prev($menu)){
		$value = explode(' ',$menu[key($menu)][0]);
		if(in_array($value[0] != NULL?$value[0]:"" , $restricted)){unset($menu[key($menu)]);}
	}
}
add_action('admin_menu', 'remove_contact_menu');
if(!current_user_can('level_10')) {
	add_action('admin_menu', 'remove_contact_menu');
}
/* end remove contact 7 form from user menu*/

Viewing all articles
Browse latest Browse all 49500

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>