WordPress.org

Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r10491 r10150  
    8080 * The 'timestamp' type will return the current timestamp.
    8181 *
    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.
    8484 *
    8585 * @since 1.0.0
    8686 *
    8787 * @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.
    8989 * @return int|string String if $type is 'gmt', int if $type is 'timestamp'.
    9090 */
     
    28052805 */
    28062806function 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;
    28162808}
    28172809
     
    29062898 * @return object The cloned object
    29072899 */
    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;
     2900function wp_clone($object) {
     2901    return version_compare(phpversion(), '5.0') < 0 ? $object : clone($object);
    29142902}
    29152903
Note: See TracChangeset for help on using the changeset viewer.