| 803 | | $theme_slug = get_option( 'stylesheet' ); |
| 804 | | $mods = get_option( "theme_mods_$theme_slug" ); |
| 805 | | if ( false === $mods ) { |
| 806 | | $theme_name = get_option( 'current_theme' ); |
| 807 | | if ( false === $theme_name ) |
| 808 | | $theme_name = wp_get_theme()->get('Name'); |
| 809 | | $mods = get_option( "mods_$theme_name" ); // Deprecated location. |
| 810 | | if ( is_admin() && false !== $mods ) { |
| 811 | | update_option( "theme_mods_$theme_slug", $mods ); |
| 812 | | delete_option( "mods_$theme_name" ); |
| | 804 | static $_wp_theme_mods = false; |
| | 805 | |
| | 806 | if ( empty( $_wp_theme_mods ) ) { |
| | 807 | $theme_slug = get_option( 'stylesheet' ); |
| | 808 | $_wp_theme_mods = get_option( "theme_mods_$theme_slug" ); |
| | 809 | if ( false === $_wp_theme_mods ) { |
| | 810 | $theme_name = get_option( 'current_theme' ); |
| | 811 | if ( false === $theme_name ) { |
| | 812 | $theme_name = wp_get_theme()->get( 'Name' ); |
| | 813 | } |
| | 814 | $_wp_theme_mods = get_option( "mods_$theme_name" ); // Deprecated location. |
| | 815 | if ( is_admin() && false !== $_wp_theme_mods ) { |
| | 816 | update_option( "theme_mods_$theme_slug", $_wp_theme_mods ); |
| | 817 | delete_option( "mods_$theme_name" ); |
| | 818 | } |