WordPress.org

Make WordPress Core

Ticket #37352: 37352.patch

File 37352.patch, 3.3 KB (added by sebastian.pisula, 3 years ago)
  • wp-admin/includes/class-wp-themes-list-table.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    6565                        }
    6666                }
    6767
    68                 unset( $themes[ get_option( 'stylesheet' ) ] );
     68                unset( $themes[ get_stylesheet() ] );
    6969                WP_Theme::sort_by_name( $themes );
    7070
    7171                $per_page = 36;
  • wp-admin/network/themes.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    102102                                exit;
    103103                        }
    104104
    105                         $themes = array_diff( $themes, array( get_option( 'stylesheet' ), get_option( 'template' ) ) );
     105                        $themes = array_diff( $themes, array( get_stylesheet(), get_template() ) );
    106106
    107107                        if ( empty( $themes ) ) {
    108108                                wp_safe_redirect( add_query_arg( 'error', 'main', $referer ) );
  • wp-admin/includes/class-wp-ms-themes-list-table.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    462462                        );
    463463                }
    464464
    465                 if ( ! $allowed && current_user_can( 'delete_themes' ) && ! $this->is_site_themes && $stylesheet != get_option( 'stylesheet' ) && $stylesheet != get_option( 'template' ) ) {
     465                if ( ! $allowed && current_user_can( 'delete_themes' ) && ! $this->is_site_themes && $stylesheet != get_stylesheet() && $stylesheet != get_template() ) {
    466466                        $url = add_query_arg( array(
    467467                                'action'       => 'delete-selected',
    468468                                'checked[]'    => $theme_key,
  • wp-includes/update.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    370370        $themes = $checked = $request = array();
    371371
    372372        // Put slug of current theme into request.
    373         $request['active'] = get_option( 'stylesheet' );
     373        $request['active'] = get_stylesheet();
    374374
     375        /** @var WP_Theme $theme */
    375376        foreach ( $installed_themes as $theme ) {
    376377                $checked[ $theme->get_stylesheet() ] = $theme->get('Version');
    377378
  • wp-admin/includes/schema.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    922922        }
    923923
    924924        // Set up site tables.
    925         $template = get_option( 'template' );
    926         $stylesheet = get_option( 'stylesheet' );
     925        $template = get_template();
     926        $stylesheet = get_stylesheet();
    927927        $allowed_themes = array( $stylesheet => true );
    928928
    929929        if ( $template != $stylesheet ) {