Fragen\GitHub_Updater\Base::exit_no_update PHP Метод

exit_no_update() защищенный Метод

Test to exit early if no update available, saves API calls.
protected exit_no_update ( $response, $branch = false ) : boolean
$response array|bool
$branch bool
Результат boolean
    protected function exit_no_update($response, $branch = false)
    {
        /**
         * Filters the return value of exit_no_update.
         *
         * @since 6.0.0
         * @return bool `true` will exit this function early, default will not.
         */
        if (apply_filters('ghu_always_fetch_update', false)) {
            return false;
        }
        if ($branch) {
            $options = get_site_option('github_updater');
            return empty($options['branch_switch']);
        }
        return !isset($_POST['ghu_refresh_cache']) && !$response && !$this->can_update($this->type);
    }