get_current_theme

Retrieve current theme name.

Description

(string) get_current_theme(); 

Returns (string)


Usage

  1. if ( !function_exists( 'get_current_theme' ) ) { 
  2. require_once ABSPATH . WPINC . '/deprecated.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = get_current_theme(); 
  7.  

Defined (1)

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

/wp-includes/deprecated.php  
  1. function get_current_theme() { 
  2. _deprecated_function( __FUNCTION__, '3.4.0', 'wp_get_theme()' ); 
  3.  
  4. if ( $theme = get_option( 'current_theme' ) ) 
  5. return $theme; 
  6.  
  7. return wp_get_theme()->get('Name');