Changeset 43571 for trunk/src/wp-includes/functions.php
- Timestamp:
- 08/17/2018 01:50:26 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/functions.php
r43466 r43571 108 108 $req_format = $dateformatstring; 109 109 110 $dateformatstring = preg_replace( "/(?<!\\\\)c/", DATE_W3C, $dateformatstring );111 $dateformatstring = preg_replace( "/(?<!\\\\)r/", DATE_RFC2822, $dateformatstring );110 $dateformatstring = preg_replace( '/(?<!\\\\)c/', DATE_W3C, $dateformatstring ); 111 $dateformatstring = preg_replace( '/(?<!\\\\)r/', DATE_RFC2822, $dateformatstring ); 112 112 113 113 if ( ( ! empty( $wp_locale->month ) ) && ( ! empty( $wp_locale->weekday ) ) ) { … … 1822 1822 if ( wp_is_stream( $path ) ) { 1823 1823 list( $wrapper, $path ) = explode( '://', $path, 2 ); 1824 $wrapper .= '://';1824 $wrapper .= '://'; 1825 1825 } 1826 1826 … … 2293 2293 */ 2294 2294 $upload_bits_error = apply_filters( 2295 'wp_upload_bits', array( 2295 'wp_upload_bits', 2296 array( 2296 2297 'name' => $name, 2297 2298 'bits' => $bits, … … 2343 2344 /** This filter is documented in wp-admin/includes/file.php */ 2344 2345 return apply_filters( 2345 'wp_handle_upload', array( 2346 'wp_handle_upload', 2347 array( 2346 2348 'file' => $new_file, 2347 2349 'url' => $url, 2348 2350 'type' => $wp_filetype['type'], 2349 2351 'error' => false, 2350 ), 'sideload' 2352 ), 2353 'sideload' 2351 2354 ); 2352 2355 } … … 2450 2453 */ 2451 2454 $mime_to_ext = apply_filters( 2452 'getimagesize_mimes_to_exts', array( 2455 'getimagesize_mimes_to_exts', 2456 array( 2453 2457 'image/jpeg' => 'jpg', 2454 2458 'image/png' => 'png', … … 2569 2573 */ 2570 2574 return apply_filters( 2571 'mime_types', array( 2575 'mime_types', 2576 array( 2572 2577 // Image formats. 2573 2578 'jpg|jpeg|jpe' => 'image/jpeg', … … 2695 2700 */ 2696 2701 return apply_filters( 2697 'ext2type', array( 2702 'ext2type', 2703 array( 2698 2704 'image' => array( 'jpg', 'jpeg', 'jpe', 'gif', 'png', 'bmp', 'tif', 'tiff', 'ico' ), 2699 2705 'audio' => array( 'aac', 'ac3', 'aif', 'aiff', 'flac', 'm3a', 'm4a', 'm4b', 'mka', 'mp1', 'mp2', 'mp3', 'ogg', 'oga', 'ram', 'wav', 'wma' ), … … 2927 2933 $dir_attr = "dir='$text_direction'"; 2928 2934 } 2929 ?>2935 ?> 2930 2936 <!DOCTYPE html> 2931 2937 <html xmlns="http://www.w3.org/1999/xhtml" <?php echo $dir_attr; ?>> … … 2933 2939 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 2934 2940 <meta name="viewport" content="width=device-width"> 2935 <?php2936 if ( function_exists( 'wp_no_robots' ) ) {2937 wp_no_robots();2938 }2939 ?>2941 <?php 2942 if ( function_exists( 'wp_no_robots' ) ) { 2943 wp_no_robots(); 2944 } 2945 ?> 2940 2946 <title><?php echo $title; ?></title> 2941 2947 <style type="text/css"> … … 3061 3067 </body> 3062 3068 </html> 3063 <?php3069 <?php 3064 3070 die(); 3065 3071 } … … 3347 3353 if ( wp_doing_ajax() ) { 3348 3354 wp_die( 3349 '', '', array( 3355 '', 3356 '', 3357 array( 3350 3358 'response' => null, 3351 3359 ) … … 3964 3972 $dir_attr = ' dir="rtl"'; 3965 3973 } 3966 ?>3974 ?> 3967 3975 <!DOCTYPE html> 3968 3976 <html xmlns="http://www.w3.org/1999/xhtml"<?php echo $dir_attr; ?>> … … 3976 3984 </body> 3977 3985 </html> 3978 <?php3986 <?php 3979 3987 die(); 3980 3988 } … … 4099 4107 sprintf( 4100 4108 __( 'The called constructor method for %1$s in %2$s is <strong>deprecated</strong> since version %3$s! Use %4$s instead.' ), 4101 $class, $parent_class, $version, '<pre>__construct()</pre>' 4109 $class, 4110 $parent_class, 4111 $version, 4112 '<pre>__construct()</pre>' 4102 4113 ) 4103 4114 ); … … 4107 4118 sprintf( 4108 4119 __( 'The called constructor method for %1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.' ), 4109 $class, $version, '<pre>__construct()</pre>' 4120 $class, 4121 $version, 4122 '<pre>__construct()</pre>' 4110 4123 ) 4111 4124 ); … … 4116 4129 sprintf( 4117 4130 'The called constructor method for %1$s in %2$s is <strong>deprecated</strong> since version %3$s! Use %4$s instead.', 4118 $class, $parent_class, $version, '<pre>__construct()</pre>' 4131 $class, 4132 $parent_class, 4133 $version, 4134 '<pre>__construct()</pre>' 4119 4135 ) 4120 4136 ); … … 4123 4139 sprintf( 4124 4140 'The called constructor method for %1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.', 4125 $class, $version, '<pre>__construct()</pre>' 4141 $class, 4142 $version, 4143 '<pre>__construct()</pre>' 4126 4144 ) 4127 4145 ); … … 5468 5486 $truncate_paths = array( 5469 5487 wp_normalize_path( WP_CONTENT_DIR ), 5470 wp_normalize_path( ABSPATH ) 5488 wp_normalize_path( ABSPATH ), 5471 5489 ); 5472 5490 } … … 5667 5685 'interim-login' => '1', 5668 5686 'wp_lang' => get_user_locale(), 5669 ), $login_url 5687 ), 5688 $login_url 5670 5689 ); 5671 5690 ?> … … 5866 5885 */ 5867 5886 function wp_delete_file_from_directory( $file, $directory ) { 5868 $real_file = realpath( wp_normalize_path( $file ) );5887 $real_file = realpath( wp_normalize_path( $file ) ); 5869 5888 $real_directory = realpath( wp_normalize_path( $directory ) ); 5870 5889 … … 6049 6068 return sprintf( 6050 6069 '%04x%04x-%04x-%04x-%04x-%04x%04x%04x', 6051 mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), 6070 mt_rand( 0, 0xffff ), 6071 mt_rand( 0, 0xffff ), 6052 6072 mt_rand( 0, 0xffff ), 6053 6073 mt_rand( 0, 0x0fff ) | 0x4000, 6054 6074 mt_rand( 0, 0x3fff ) | 0x8000, 6055 mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ) 6075 mt_rand( 0, 0xffff ), 6076 mt_rand( 0, 0xffff ), 6077 mt_rand( 0, 0xffff ) 6056 6078 ); 6057 6079 } … … 6191 6213 6192 6214 wp_mail( 6193 $email_change_email['to'], sprintf( 6215 $email_change_email['to'], 6216 sprintf( 6194 6217 $email_change_email['subject'], 6195 6218 $site_name 6196 ), $email_change_email['message'], $email_change_email['headers'] 6219 ), 6220 $email_change_email['message'], 6221 $email_change_email['headers'] 6197 6222 ); 6198 6223 } … … 6250 6275 if ( function_exists( 'inet_pton' ) && function_exists( 'inet_ntop' ) ) { 6251 6276 $ip_addr = inet_ntop( inet_pton( $ip_addr ) & inet_pton( $netmask ) ); 6252 if ( false === $ip_addr ) {6277 if ( false === $ip_addr ) { 6253 6278 return '::'; 6254 6279 }
Note: See TracChangeset
for help on using the changeset viewer.