public bypass_theme_api_call ( false | object | array $override, string $action, object $args ) : boolean | ||
$override | false | object | array | Whether to override the WordPress.org Themes API. Default false. |
$action | string | Requested action. Likely values are 'theme_information', 'feature_list', or 'query_themes'. |
$args | object | Arguments used to query for installer pages from the Themes API. |
return | boolean | True if enabled, otherwise the existng value. |
public function bypass_theme_api_call($override, $action, $args)
{
// Bail if disabled.
if (!$this->enabled()) {
return $override;
}
// Return false on feature list to avoid the API call.
return !empty($action) && 'feature_list' === $action ? true : $override;
}