Contact Form 7
bbpress subscribers can edit contact form 7 (3 posts)

  1. whatif6000
    Posted 2 years ago #

    If I use a test bbPress subscirber login the dashboard they are presented with shows the admin settings for Contactform 7 and allows them access to the shortcode.
    Even if this does no damage it appears weird to users.
    I am using the Math Captcha plugin if this helps.
    How can I stop this please?


  2. Takayuki Miyoshi
    Plugin Author

    Posted 2 years ago #

  3. whatif6000
    Posted 2 years ago #

    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*/

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Contact Form 7
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.