WordPress.org

Ready to get started?Download WordPress

Forums

WP Maintenance Mode
WP Maintenance Mode + contact form 7 (or any form) (4 posts)

  1. rootix
    Member
    Posted 2 years ago #

    My contact unit tag is : wpcf7-f125-t1-o1
    Contact form 7 works if i modify this lines (i think wp maintenance mode settings should include a list of POST variables authorized) :

    if ( ( !$this->check_role() )
    					&& !strstr($_SERVER['PHP_SELF'], 'wp-login.php' )
    					&& !strstr($_SERVER['PHP_SELF'], 'async-upload.php')
    					&& !strstr($_SERVER['PHP_SELF'], '/plugins/')
    					&& !$this->check_exclude()
    				 ) {
    				$rolestatus = 'norights';
    				nocache_headers();
    				if (($_SERVER["REQUEST_METHOD"]!='POST') or ($_POST["_wpcf7_unit_tag"]!="wpcf7-f125-t1-o1")) {
    					header("HTTP/1.0 503 Service Unavailable");
    					header("Retry-After: $backtime");
    					include('site.php');
    					exit();
    				} else return;
    			}

    http://wordpress.org/extend/plugins/wp-maintenance-mode/

  2. Frank
    Member
    Plugin Author

    Posted 2 years ago #

    where is the key; i dont know about this and i see not an solution to include this for all users in the plugin to use CF7 with WP M M.
    Maybe you have more informations.

  3. rootix
    Member
    Posted 2 years ago #

    Perhaps a setup to add couple of variables, for example as the exclude list (wp-admin,...) :

    _wpcf7_unit_tag / wpcf7-f125-t1-o1
    ... / ...

    The example for CF7 can be documented to show what variable to add or how to find them.

  4. VansDrums
    Member
    Posted 2 years ago #

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic