Ticket #21053: template.php.patch
File template.php.patch, 894 bytes (added by , 13 years ago) |
---|
-
wp-includes/template.php
303 303 */ 304 304 function get_attachment_template() { 305 305 global $posts; 306 $type = explode('/', $posts[0]->post_mime_type); 307 if ( $template = get_query_template($type[0]) ) 306 307 $type = explode( '/', $posts[0]->post_mime_type ); 308 309 if ( $template = get_query_template( "$type[0]_$type[1]" ) ) 308 310 return $template; 309 elseif ( $template = get_query_template( $type[1]) )311 elseif ( $template = get_query_template( $type[1] ) ) 310 312 return $template; 311 elseif ( $template = get_query_template( "$type[0]_$type[1]") )313 elseif ( $template = get_query_template( $type[0] ) ) 312 314 return $template; 313 315 else 314 return get_query_template( 'attachment');316 return get_query_template( 'attachment' ); 315 317 } 316 318 317 319 /**