Changeset 20088 for trunk/wp-includes/functions.php
- Timestamp:
- 03/02/2012 09:07:31 PM (14 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/functions.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions.php
r20063 r20088 3373 3373 fclose( $fp ); 3374 3374 3375 if ( $context != '' ) { 3376 $extra_headers = apply_filters( "extra_{$context}_headers", array() ); 3377 3378 $extra_headers = array_flip( $extra_headers ); 3379 foreach( $extra_headers as $key=>$value ) { 3380 $extra_headers[$key] = $key; 3381 } 3375 if ( $context && $extra_headers = apply_filters( "extra_{$context}_headers", array() ) ) { 3376 $extra_headers = array_combine( $extra_headers, $extra_headers ); // keys equal values 3382 3377 $all_headers = array_merge( $extra_headers, (array) $default_headers ); 3383 3378 } else { … … 3386 3381 3387 3382 foreach ( $all_headers as $field => $regex ) { 3388 preg_match( '/^[ \t\/*#@]*' . preg_quote( $regex, '/' ) . ':(.*)$/mi', $file_data, ${$field}); 3389 if ( !empty( ${$field} ) ) 3390 ${$field} = _cleanup_header_comment( ${$field}[1] ); 3383 if ( preg_match( '/^[ \t\/*#@]*' . preg_quote( $regex, '/' ) . ':(.*)$/mi', $file_data, $match ) && $match[1] ) 3384 $all_headers[ $field ] = _cleanup_header_comment( $match[1] ); 3391 3385 else 3392 ${$field} = ''; 3393 } 3394 3395 $file_data = compact( array_keys( $all_headers ) ); 3396 3397 return $file_data; 3386 $all_headers[ $field ] = ''; 3387 } 3388 3389 return $all_headers; 3398 3390 } 3399 3391
Note: See TracChangeset
for help on using the changeset viewer.