twentyfifteen_switch_theme

Prevent switching to Twenty Fifteen on old versions of WordPress.

Description

twentyfifteen_switch_theme(); 

Switches to the default theme.


Usage

  1. if ( !function_exists( 'twentyfifteen_switch_theme' ) ) { 
  2. require_once '/inc/back-compat.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = twentyfifteen_switch_theme(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/inc/back-compat.php  
  1. function twentyfifteen_switch_theme() { 
  2. switch_theme( WP_DEFAULT_THEME, WP_DEFAULT_THEME ); 
  3. unset( $_GET['activated'] );