Changeset 20040 for trunk/wp-includes/theme.php
- Timestamp:
- 02/29/2012 08:07:22 PM (14 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/theme.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/theme.php
r20033 r20040 355 355 } 356 356 return $theme_roots; 357 }358 359 /**360 * Retrieve current theme display name.361 *362 * If the 'current_theme' option has already been set, then it will be returned363 * instead. If it is not set, then each theme will be iterated over until both364 * the current stylesheet and current template name.365 *366 * @since 1.5.0367 *368 * @return string369 */370 function get_current_theme() {371 if ( $theme = get_option( 'current_theme' ) )372 return $theme;373 374 return wp_get_theme()->get('Name');375 357 } 376 358 … … 792 774 $theme_slug = get_option( 'stylesheet' ); 793 775 if ( false === ( $mods = get_option( "theme_mods_$theme_slug" ) ) ) { 794 $theme_name = get_current_theme(); 776 $theme_name = get_option( 'current_theme' ); 777 if ( false === $theme_name ) 778 $theme_name = wp_get_theme()->get('Name'); 795 779 $mods = get_option( "mods_$theme_name" ); // Deprecated location. 796 780 if ( is_admin() && false !== $mods ) { … … 879 863 function remove_theme_mods() { 880 864 delete_option( 'theme_mods_' . get_option( 'stylesheet' ) ); 881 delete_option( 'mods_' . get_current_theme() ); 865 866 // Old style. 867 $theme_name = get_option( 'current_theme' ); 868 if ( false === $theme_name ) 869 $theme_name = wp_get_theme()->get('Name'); 870 delete_option( 'mods_' . $theme_name ); 882 871 } 883 872
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)