IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
|
| 568 | 568 | add_filter( 'pre_option_current_theme', array( $this, 'current_theme' ) ); |
| 569 | 569 | |
| 570 | 570 | // @link: https://core.trac.wordpress.org/ticket/20027 |
| 571 | | add_filter( 'pre_option_stylesheet', array( $this, 'get_stylesheet' ) ); |
| 572 | | add_filter( 'pre_option_template', array( $this, 'get_template' ) ); |
| | 571 | add_filter( 'stylesheet', array( $this, 'get_stylesheet' ) ); |
| | 572 | add_filter( 'template', array( $this, 'get_template' ) ); |
| 573 | 573 | |
| 574 | 574 | // Handle custom theme roots. |
| 575 | 575 | add_filter( 'pre_option_stylesheet_root', array( $this, 'get_stylesheet_root' ) ); |
| … |
… |
|
| 606 | 606 | remove_filter( 'pre_option_current_theme', array( $this, 'current_theme' ) ); |
| 607 | 607 | |
| 608 | 608 | // @link: https://core.trac.wordpress.org/ticket/20027 |
| 609 | | remove_filter( 'pre_option_stylesheet', array( $this, 'get_stylesheet' ) ); |
| 610 | | remove_filter( 'pre_option_template', array( $this, 'get_template' ) ); |
| | 609 | remove_filter( 'stylesheet', array( $this, 'get_stylesheet' ) ); |
| | 610 | remove_filter( 'template', array( $this, 'get_template' ) ); |
| 611 | 611 | |
| 612 | 612 | // Handle custom theme roots. |
| 613 | 613 | remove_filter( 'pre_option_stylesheet_root', array( $this, 'get_stylesheet_root' ) ); |
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
|
| 921 | 921 | } |
| 922 | 922 | |
| 923 | 923 | // Set up site tables. |
| 924 | | $template = get_option( 'template' ); |
| 925 | | $stylesheet = get_option( 'stylesheet' ); |
| | 924 | $template = get_template(); |
| | 925 | $stylesheet = get_stylesheet(); |
| 926 | 926 | $allowed_themes = array( $stylesheet => true ); |
| 927 | 927 | |
| 928 | 928 | if ( $template != $stylesheet ) { |
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
|
| 65 | 65 | } |
| 66 | 66 | } |
| 67 | 67 | |
| 68 | | unset( $themes[ get_option( 'stylesheet' ) ] ); |
| | 68 | unset( $themes[ get_stylesheet() ] ); |
| 69 | 69 | WP_Theme::sort_by_name( $themes ); |
| 70 | 70 | |
| 71 | 71 | $per_page = 36; |
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
|
| 823 | 823 | * @return array|void Theme modifications. |
| 824 | 824 | */ |
| 825 | 825 | function get_theme_mods() { |
| 826 | | $theme_slug = get_option( 'stylesheet' ); |
| | 826 | $theme_slug = get_stylesheet(); |
| 827 | 827 | $mods = get_option( "theme_mods_$theme_slug" ); |
| 828 | 828 | if ( false === $mods ) { |
| 829 | 829 | $theme_name = get_option( 'current_theme' ); |
| … |
… |
|
| 904 | 904 | */ |
| 905 | 905 | $mods[ $name ] = apply_filters( "pre_set_theme_mod_{$name}", $value, $old_value ); |
| 906 | 906 | |
| 907 | | $theme = get_option( 'stylesheet' ); |
| | 907 | $theme = get_stylesheet(); |
| 908 | 908 | update_option( "theme_mods_$theme", $mods ); |
| 909 | 909 | } |
| 910 | 910 | |
| … |
… |
|
| 930 | 930 | remove_theme_mods(); |
| 931 | 931 | return; |
| 932 | 932 | } |
| 933 | | $theme = get_option( 'stylesheet' ); |
| | 933 | $theme = get_stylesheet(); |
| 934 | 934 | update_option( "theme_mods_$theme", $mods ); |
| 935 | 935 | } |
| 936 | 936 | |
| … |
… |
|
| 940 | 940 | * @since 2.1.0 |
| 941 | 941 | */ |
| 942 | 942 | function remove_theme_mods() { |
| 943 | | delete_option( 'theme_mods_' . get_option( 'stylesheet' ) ); |
| | 943 | delete_option( 'theme_mods_' . get_stylesheet() ); |
| 944 | 944 | |
| 945 | 945 | // Old style. |
| 946 | 946 | $theme_name = get_option( 'current_theme' ); |
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
|
| 384 | 384 | $themes = $checked = $request = array(); |
| 385 | 385 | |
| 386 | 386 | // Put slug of current theme into request. |
| 387 | | $request['active'] = get_option( 'stylesheet' ); |
| | 387 | $request['active'] = get_stylesheet(); |
| 388 | 388 | |
| 389 | 389 | foreach ( $installed_themes as $theme ) { |
| 390 | 390 | $checked[ $theme->get_stylesheet() ] = $theme->get('Version'); |
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
|
| 99 | 99 | exit; |
| 100 | 100 | } |
| 101 | 101 | |
| 102 | | $themes = array_diff( $themes, array( get_option( 'stylesheet' ), get_option( 'template' ) ) ); |
| | 102 | $themes = array_diff( $themes, array( get_stylesheet(), get_template() ) ); |
| 103 | 103 | |
| 104 | 104 | if ( empty( $themes ) ) { |
| 105 | 105 | wp_safe_redirect( add_query_arg( 'error', 'main', $referer ) ); |
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
|
| 463 | 463 | ); |
| 464 | 464 | } |
| 465 | 465 | |
| 466 | | if ( ! $allowed && current_user_can( 'delete_themes' ) && ! $this->is_site_themes && $stylesheet != get_option( 'stylesheet' ) && $stylesheet != get_option( 'template' ) ) { |
| | 466 | if ( ! $allowed && current_user_can( 'delete_themes' ) && ! $this->is_site_themes && $stylesheet != get_stylesheet() && $stylesheet != get_template() ) { |
| 467 | 467 | $url = add_query_arg( array( |
| 468 | 468 | 'action' => 'delete-selected', |
| 469 | 469 | 'checked[]' => $theme_key, |