Changes from branches/2.7/wp-includes/functions.php at r10491 to trunk/wp-includes/functions.php at r10150
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions.php
r10491 r10150 80 80 * The 'timestamp' type will return the current timestamp. 81 81 * 82 * If $gmt is set to either '1' or 'true', then both types will use GMT time.83 * if $gmt is false, the output is adjusted with the GMT offset in the WordPress option.82 * If the $gmt is set to either '1' or 'true', then both types will use the 83 * GMT offset in the WordPress option to add the GMT offset to the time. 84 84 * 85 85 * @since 1.0.0 86 86 * 87 87 * @param string $type Either 'mysql' or 'timestamp'. 88 * @param int|bool $gmt Optional. Whether to use GMT timezone. Default is false.88 * @param int|bool $gmt Optional. Whether to use $gmt offset. Default is false. 89 89 * @return int|string String if $type is 'gmt', int if $type is 'timestamp'. 90 90 */ … … 2805 2805 */ 2806 2806 function is_ssl() { 2807 if ( isset($_SERVER['HTTPS']) ) { 2808 if ( 'on' == strtolower($_SERVER['HTTPS']) ) 2809 return true; 2810 if ( '1' == $_SERVER['HTTPS'] ) 2811 return true; 2812 } elseif ( isset($_SERVER['SERVER_PORT']) && ( '443' == $_SERVER['SERVER_PORT'] ) ) { 2813 return true; 2814 } 2815 return false; 2807 return ( isset($_SERVER['HTTPS']) && 'on' == strtolower($_SERVER['HTTPS']) ) ? true : false; 2816 2808 } 2817 2809 … … 2906 2898 * @return object The cloned object 2907 2899 */ 2908 function wp_clone( $object ) { 2909 static $can_clone; 2910 if ( !isset( $can_clone ) ) { 2911 $can_clone = version_compare( phpversion(), '5.0', '>=' ); 2912 } 2913 return $can_clone ? clone( $object ) : $object; 2900 function wp_clone($object) { 2901 return version_compare(phpversion(), '5.0') < 0 ? $object : clone($object); 2914 2902 } 2915 2903
Note: See TracChangeset
for help on using the changeset viewer.