English (United Kingdom)
Knowledge Base  >  VikUpdater  >  Developers  >  Themes  >  Prepare Update Data

apply_filters( 'vikupdater_prepare_update_theme_data', object $update, object $manifest, array $options )

Filter used to set up the update data that will be used by WordPress.


Description

The information used here will be saved within the transient used by WordPress to check whether there is an update available for a specific theme.


Parameters

$update

(object)  The object holding the theme update details, compatible with the WordPress requirements.

$manifest

(object)  The theme manifest (JSON-decoded) fetched through the API call made on the theme "check" URL.

$options

(array)  A configuration array, taken from the associative array specified during the subscription of the theme.


Example

function your_theme_vikupdater_prepare_update_data( $update, $manifest, $options ) {
    // make sure we are observing our theme
    if ( 'your-theme' === $update->theme ) {
        // do stuff here...
    }

    return $update;
}

add_filter( 'vikupdater_prepare_update_theme_data', 'your_theme_vikupdater_prepare_update_data', 10, 3 );

Changelog

Version Description
2.0 Introduced.
Last Update: 2023-11-21
Helpful?