Title: Theme Updater
Last modified: August 31, 2023

---

# Theme Updater

 *  [ace0930](https://wordpress.org/support/users/ace0930/)
 * (@ace0930)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/theme-updater-2/)
 * I have read this [post](https://make.wordpress.org/core/2020/07/30/recommended-usage-of-the-updates-api-to-support-the-auto-updates-ui-for-plugins-and-themes-in-wordpress-5-5/),
   and researching relevant articles. I have seen that some have this:
 *     ```wp-block-code
       if (empty($transient->checked)) {
          return $transient;
       }
       ```
   
    1. Is this necessary although I don’t know what it does and why I need it ( the
       logic ).
    2. Do the below is all I need for a theme?
 *     ```wp-block-code
       $theme = array(
          'theme' => 'sun',
          'new_version' => '2.0.0',
          'url' => 'https://sun.com/updater.php',
          'package' => 'https://sun.com/releases.php',
          'requires' => '6.0',
          'requires_php' => '8.0.0'
       );
       ```
   
 * Thank you so much in advanced!

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Justin Tadlock](https://wordpress.org/support/users/greenshady/)
 * (@greenshady)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/theme-updater-2/#post-17019283)
 * It’s not exactly clear what you’re trying to accomplish.
 * But if you’re making a request to the DotOrg API, you should always store the
   data in a transient that’s stored for X amount of time. This is so that you’re
   not making a request to the server on each page load (this is the case for any
   third-party API).
 * You can learn more about working with the Transients API here: [https://developer.wordpress.org/apis/transients/](https://developer.wordpress.org/apis/transients/)
 *  Thread Starter [ace0930](https://wordpress.org/support/users/ace0930/)
 * (@ace0930)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/theme-updater-2/#post-17019641)
 * [@greenshady](https://wordpress.org/support/users/greenshady/) Hi, I’m trying
   to use the hook `pre_set_site_transient_update_themes` to receive update ( for
   theme ) from my own API. I’m following the turtorial [here](https://make.wordpress.org/core/2020/07/30/recommended-usage-of-the-updates-api-to-support-the-auto-updates-ui-for-plugins-and-themes-in-wordpress-5-5/),
   but I saw others articles has this line of code `if (empty($transient->checked)){
   return $transient; }` which I’m not sure what it does and if I need it. Thank
   you!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Theme Updater’ is closed to new replies.

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 2 replies
 * 2 participants
 * Last reply from: [ace0930](https://wordpress.org/support/users/ace0930/)
 * Last activity: [2 years, 10 months ago](https://wordpress.org/support/topic/theme-updater-2/#post-17019641)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
