wpcf7_is_localhost

The Contact Form 7 wpcf7 is localhost function.

Description

wpcf7_is_localhost(); 

Usage

  1. if ( !function_exists( 'wpcf7_is_localhost' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'contact-form-7/includes/functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = wpcf7_is_localhost(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/includes/functions.php  
  1. function wpcf7_is_localhost() { 
  2. $server_name = strtolower( $_SERVER['SERVER_NAME'] ); 
  3. return in_array( $server_name, array( 'localhost', '127.0.0.1' ) );