Ticket #18027: 18027.diff
File 18027.diff, 2.3 KB (added by , 14 years ago) |
---|
-
wp-includes/theme.php
1935 1935 // any type is accepted 1936 1936 if ( true === $_wp_theme_features[$feature] ) // Registered for all types 1937 1937 return true; 1938 $content_type = $args[0]; 1939 if ( in_array($content_type, $_wp_theme_features[$feature][0]) ) 1938 $content_type = $args[0]; 1939 // accept array( 'types' => array( 'post', 'page' ) ), array( 'types' => 'post' ), and 1940 // array( 'types' => true ), with a fallback to original array( 'post', 'page' ). 1941 if ( isset( $_wp_theme_features[ $feature ][0]['types'] ) ) 1942 $content_types = $_wp_theme_features[ $feature ][0]['types']; 1943 elseif ( isset( $_wp_theme_features[ $feature ][0][0] ) ) 1944 $content_types = $_wp_theme_features[ $feature ][0]; 1945 else 1940 1946 return true; 1941 else 1942 return false; 1947 if ( true === $content_types ) 1948 return true; 1949 return in_array( $content_type, (array) $content_types ); 1943 1950 break; 1944 1951 } 1945 1952 -
wp-content/themes/twentyeleven/functions.php
107 107 add_custom_background(); 108 108 109 109 // This theme uses Featured Images (also known as post thumbnails) for per-post/per-page Custom Header images 110 add_theme_support( 'post-thumbnails' );110 add_theme_support( 'post-thumbnails', array( 'usage' => __( 'Usage for Twenty Eleven goes here.', 'twentyeleven' ) ) ); 111 111 112 112 // The next four constants set how Twenty Eleven supports custom headers. 113 113 -
wp-admin/includes/meta-boxes.php
913 913 */ 914 914 function post_thumbnail_meta_box() { 915 915 global $post; 916 $theme_support = (array) get_theme_support( 'post-thumbnails' ); 917 if ( isset( $theme_support[0]['usage'] ) ) 918 echo '<p>' . $theme_support[0]['usage'] . '</p>'; 916 919 $thumbnail_id = get_post_meta( $post->ID, '_thumbnail_id', true ); 917 920 echo _wp_post_thumbnail_html( $thumbnail_id ); 918 921 }