WordPress.org

Make WordPress Core

Ticket #23819: 23819.2.diff

File 23819.2.diff, 1.1 KB (added by lancewillett, 9 years ago)
  • wp-content/themes/twentythirteen/inc/back-compat.php

     
    1515        unset( $_GET['activated'] );
    1616        add_action( 'admin_notices', 'twentythirteen_upgrade_notice' );
    1717}
    18 add_action( 'after_switch_theme', 'twentythirteen_switch_theme', 10, 2 );
     18add_action( 'after_switch_theme', 'twentythirteen_compat_switch_theme', 10, 2 );
    1919
     20/**
     21 * Prevent previewing theme with Live Customizer.
     22 */
     23function twentythirteen_compat_customizer() {
     24        if ( version_compare( $GLOBALS['wp_version'], '3.6-alpha', '>=' ) )
     25                return;
     26
     27        wp_redirect( '/wp-admin/themes.php' );
     28}
     29add_action( 'load-customize.php', 'twentythirteen_compat_customizer' );
     30
    2031function twentythirteen_upgrade_notice() {
    2132        $message = sprintf( __( 'Twenty Thirteen requires at least WordPress version 3.6. You are running version %s. Please upgrade and try again.' ), $GLOBALS['wp_version'] );
    2233        printf( '<div class="error"><p>%s</p></div>', $message );