Ticket #35889: twenty-thirteen.patch
File twenty-thirteen.patch, 2.2 KB (added by , 9 years ago) |
---|
-
wp-content/themes/twentythirteen/inc/back-compat.php
34 34 * @since Twenty Thirteen 1.0 35 35 */ 36 36 function twentythirteen_upgrade_notice() { 37 $message = sprintf( __( 'Twenty Thirteen requires at least WordPress version 3.6. You are running version %s. Please upgrade and try again.', 'twentythirteen' ), $GLOBALS['wp_version'] ); 38 printf( '<div class="error"><p>%s</p></div>', $message ); 37 printf( '<div class="error"><p>%s</p></div>', twentythirteen_minimum_required_version_message() ); 39 38 } 40 39 41 40 /** … … 44 43 * @since Twenty Thirteen 1.0 45 44 */ 46 45 function twentythirteen_customize() { 47 wp_die( sprintf( __( 'Twenty Thirteen requires at least WordPress version 3.6. You are running version %s. Please upgrade and try again.', 'twentythirteen' ), $GLOBALS['wp_version']), '', array(46 wp_die( twentythirteen_minimum_required_version_message(), '', array( 48 47 'back_link' => true, 49 48 ) ); 50 49 } … … 51 50 add_action( 'load-customize.php', 'twentythirteen_customize' ); 52 51 53 52 /** 54 * Prevent the Theme Preview from being loaded on WordPress versions prior to 3. 4.53 * Prevent the Theme Preview from being loaded on WordPress versions prior to 3.6. 55 54 * 56 55 * @since Twenty Thirteen 1.0 57 56 */ 58 57 function twentythirteen_preview() { 59 58 if ( isset( $_GET['preview'] ) ) { 60 wp_die( sprintf( __( 'Twenty Thirteen requires at least WordPress version 3.6. You are running version %s. Please upgrade and try again.', 'twentythirteen' ), $GLOBALS['wp_version']) );59 wp_die( twentythirteen_minimum_required_version_message() ); 61 60 } 62 61 } 63 62 add_action( 'template_redirect', 'twentythirteen_preview' ); 63 64 /** 65 * Minimum required WordPress version message. 66 * 67 * @since Twenty Thirteen 1.9 68 */ 69 function twentythirteen_minimum_required_version_message() { 70 $message = sprintf( 71 /* translators: %s: WordPress version */ 72 __( 'Twenty Thirteen requires at least WordPress version 3.6. You are running version %s. Please upgrade and try again.', 'twentyfourteen' ), 73 $GLOBALS['wp_version'] 74 ); 75 return $message; 76 }