wp_update_theme

This was once used to kick-off the Theme Updater.

Description

wp_update_theme( $theme, (string) $feedback = '' ); 

Deprecated in favor of instantiating a Theme_Upgrader instance directly, and calling the upgrade method. Unused since 2.8.0.

Parameters (2)

0. $theme
The theme.
1. $feedback — Optional. (string) => ''
The feedback.

Usage

  1. if ( !function_exists( 'wp_update_theme' ) ) { 
  2. require_once ABSPATH . '/wp-admin/includes/deprecated.php'; 
  3.  
  4. // The theme. 
  5. $theme = null; 
  6.  
  7. // The feedback. 
  8. $feedback = ''; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = wp_update_theme($theme, $feedback); 
  12.  

Defined (1)

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

/wp-admin/includes/deprecated.php  
  1. function wp_update_theme($theme, $feedback = '') { 
  2. _deprecated_function( __FUNCTION__, '3.7.0', 'new Theme_Upgrader();' ); 
  3.  
  4. if ( !empty($feedback) ) 
  5.  
  6. include( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' ); 
  7. $upgrader = new Theme_Upgrader(); 
  8. return $upgrader->upgrade($theme);