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

set_options_filter() публичный Метод

Saves results of filter hook to self::$options. Hook requires return of associative element array. $key === repo-name and $value === token e.g. array( 'repo-name' => 'access_token' );
public set_options_filter ( )
    public function set_options_filter()
    {
        // Single plugin/theme should not be using both hooks.
        $config = apply_filters('github_updater_set_options', array());
        if (empty($config)) {
            $config = function_exists('apply_filters_deprecated') ? apply_filters_deprecated('github_updater_token_distribution', array(null), '6.1.0', 'github_updater_set_options') : apply_filters('github_updater_token_distribution', array());
        }
        if (!empty($config)) {
            $config = Settings::sanitize($config);
            self::$options = array_merge(get_site_option('github_updater'), $config);
            update_site_option('github_updater', self::$options);
        }
    }