Changeset 952302
- Timestamp:
- 07/21/2014 05:29:28 PM (12 years ago)
- Location:
- vaultpress/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (1 diff)
-
vaultpress.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
vaultpress/trunk/readme.txt
r950961 r952302 54 54 = 1.6.3 = 55 55 * Bugfix: Make sure existing empty key and secret options are always strings. This fixes an error when run with HHVM. 56 * Bugfix: Detect if the plugin has been installed on localhost and show an error. 56 57 57 58 = 1.6.2 = -
vaultpress/trunk/vaultpress.php
r950959 r952302 337 337 338 338 function ui() { 339 if ( $this->is_localhost() ) { 340 $this->update_option( 'connection', time() ); 341 $this->update_option( 'connection_error_code', 'error_localhost' ); 342 $this->update_option( 'connection_error_message', 'Hostnames such as localhost or 127.0.0.1 can not be reached by vaultpress.com and will not work with the service. Sites must be publicly accessible in order to work with VaultPress.' ); 343 $this->error_notice(); 344 return; 345 } 346 339 347 if ( !empty( $_GET['error'] ) ) { 340 348 $this->error_notice(); … … 1661 1669 } 1662 1670 1671 function is_localhost() { 1672 $site_url = $this->site_url(); 1673 if ( empty( $site_url ) ) 1674 return false; 1675 $parts = parse_url( $site_url() ); 1676 if ( !empty( $parts['host'] ) && in_array( $parts['host'], array( 'localhost', '127.0.0.1' ) ) ) 1677 return true; 1678 return false; 1679 } 1680 1663 1681 function contact_service( $action, $args = array() ) { 1664 1682 if ( 'test' != $action && 'register' != $action && !$this->check_connection() )
Note: See TracChangeset
for help on using the changeset viewer.