WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/29/2015 06:35:40 PM (5 years ago)
Author:
ocean90
Message:

Themes: Remove legacy theme preview.

The pre-3.4 theme previewer doesn't work when using a static front page.
We kept the old theme preview for no-JS and some browsers that were less capable. But since browsers are doing a better job today we don't need to continue fixing/shipping this legacy code. Bye!

fixes #33178.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/theme.php

    r32965 r33492  
    480480                'activate' => current_user_can( 'switch_themes' ) ? wp_nonce_url( admin_url( 'themes.php?action=activate&stylesheet=' . $encoded_slug ), 'switch-theme_' . $slug ) : null,
    481481                'customize' => ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) ? wp_customize_url( $slug ) : null,
    482                 'preview'   => add_query_arg( array(
    483                     'preview'        => 1,
    484                     'template'       => urlencode( $theme->get_template() ),
    485                     'stylesheet'     => urlencode( $slug ),
    486                     'preview_iframe' => true,
    487                     'TB_iframe'      => true,
    488                 ), home_url( '/' ) ),
    489482                'delete'   => current_user_can( 'delete_themes' ) ? wp_nonce_url( admin_url( 'themes.php?action=delete&stylesheet=' . $encoded_slug ), 'delete-theme_' . $slug ) : null,
    490483            ),
Note: See TracChangeset for help on using the changeset viewer.