is_localhost

The WooCommerce Upload My File is localhost function.

Description

is_localhost(); 

Usage

  1. if ( !function_exists( 'is_localhost' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce-upload-my-file/inc/umf-funct.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = is_localhost(); 
  7.  

Defined (1)

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

/inc/umf-funct.php  
  1. function is_localhost() { 
  2. $whitelist = array( '127.0.0.1', '::1' ); 
  3. if( in_array( $_SERVER['REMOTE_ADDR'], $whitelist) ) 
  4. return true;