remove_theme_mods

Remove theme modifications option for current theme.

Description

remove_theme_mods(); 

Usage

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

Defined (1)

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

/wp-includes/theme.php  
  1. function remove_theme_mods() { 
  2. delete_option( 'theme_mods_' . get_option( 'stylesheet' ) ); 
  3.  
  4. // Old style. 
  5. $theme_name = get_option( 'current_theme' ); 
  6. if ( false === $theme_name ) 
  7. $theme_name = wp_get_theme()->get('Name'); 
  8. delete_option( 'mods_' . $theme_name );