Il tuo carrello è vuoto!
Check URL - Extra Query
apply_filters( 'vikupdater_check_theme_extra_query', array $args, array $options )
Filter used to apply an extra query to the URL needed to check the latest package of a theme.
Description
It is possible to use this hook to extend at runtime the query string of the URL needed to download the JSON manifest of the requested theme.
Parameters
- $args
-
(array) An associative array holding the extra parameters to add to the query string of the "check" URL.
- $options
-
(array) A configuration array, taken from the associative array specified during the subscription of the theme.
Example
The example below explains how to receive (at server level) a parameter indicating the accepted stability (RC, nightly, stable and so on).
function your_theme_vikupdater_check_extra_query( $args, $options ) {
// make sure we are observing our theme
if ( 'your-theme' === $options['slug'] ) {
// include within the URL: `&stability={stability}`
$args['stability'] = get_option('yourtheme_update_stability', 'stable');
}
return $args;
}
add_filter( 'vikupdater_check_theme_extra_query', 'your_theme_vikupdater_check_extra_query', 10, 2 );
Changelog
Version | Description |
---|---|
2.0 | Introduced. |
Ultimo aggiornamento: 2023-11-21
Utile?