Ticket #20313: get_theme_data-subdirs-fix.diff
File get_theme_data-subdirs-fix.diff, 761 bytes (added by , 12 years ago) |
---|
-
wp-includes/deprecated.php
3071 3071 */ 3072 3072 function get_theme_data( $theme_file ) { 3073 3073 _deprecated_function( __FUNCTION__, 3.4, 'wp_get_theme()' ); 3074 $theme = new WP_Theme( basename( dirname( $theme_file ) ), dirname( dirname( $theme_file ) ) ); 3074 $theme_root = trailingslashit( get_theme_root( $theme_file ) ); 3075 $theme_slug = str_replace( $theme_root, '', dirname( $theme_file ) ); 3076 $theme = new WP_Theme( $theme_slug, $theme_root ); 3075 3077 3076 3078 $theme_data = array( 3077 3079 'Name' => $theme->get('Name'), … … 3088 3090 ); 3089 3091 3090 3092 return $theme_data; 3091 } 3092 No newline at end of file 3093 }