WordPress.org

Make WordPress Core

Ticket #16970: 16970.diff

File 16970.diff, 1.2 KB (added by kawauso, 7 years ago)

No need for function_exists checks anymore

  • wp-includes/deprecated.php

     
    26022602        return true;
    26032603}
    26042604
     2605/**
     2606 * Check for PHP timezone support
     2607 *
     2608 * @since 2.9.0
     2609 * @deprecated 3.2
     2610 *
     2611 * @return bool
     2612 */
     2613function wp_timezone_supported() {
     2614        _deprecated_function( __FUNCTION__, '3.2' );
     2615
     2616        return apply_filters( 'timezone_support', true );
     2617}
     2618
  • wp-includes/functions.php

     
    40444044}
    40454045
    40464046/**
    4047  * Check for PHP timezone support
    4048  *
    4049  * @since 2.9.0
    4050  *
    4051  * @return bool
    4052  */
    4053 function wp_timezone_supported() {
    4054         $support = false;
    4055         if (
    4056                 function_exists( 'date_create' ) &&
    4057                 function_exists( 'date_default_timezone_set' ) &&
    4058                 function_exists( 'timezone_identifiers_list' ) &&
    4059                 function_exists( 'timezone_open' ) &&
    4060                 function_exists( 'timezone_offset_get' )
    4061         ) {
    4062                 $support = true;
    4063         }
    4064         return apply_filters( 'timezone_support', $support );
    4065 }
    4066 
    4067 /**
    40684047 * {@internal Missing Short Description}}
    40694048 *
    40704049 * @since 2.9.0