Ticket #23819: 23819.2.diff
File 23819.2.diff, 1.1 KB (added by , 10 years ago) |
---|
-
wp-content/themes/twentythirteen/inc/back-compat.php
15 15 unset( $_GET['activated'] ); 16 16 add_action( 'admin_notices', 'twentythirteen_upgrade_notice' ); 17 17 } 18 add_action( 'after_switch_theme', 'twentythirteen_ switch_theme', 10, 2 );18 add_action( 'after_switch_theme', 'twentythirteen_compat_switch_theme', 10, 2 ); 19 19 20 /** 21 * Prevent previewing theme with Live Customizer. 22 */ 23 function twentythirteen_compat_customizer() { 24 if ( version_compare( $GLOBALS['wp_version'], '3.6-alpha', '>=' ) ) 25 return; 26 27 wp_redirect( '/wp-admin/themes.php' ); 28 } 29 add_action( 'load-customize.php', 'twentythirteen_compat_customizer' ); 30 20 31 function twentythirteen_upgrade_notice() { 21 32 $message = sprintf( __( 'Twenty Thirteen requires at least WordPress version 3.6. You are running version %s. Please upgrade and try again.' ), $GLOBALS['wp_version'] ); 22 33 printf( '<div class="error"><p>%s</p></div>', $message );