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

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

Set default values for plugin/theme.
protected set_defaults ( $type )
$type
    protected function set_defaults($type)
    {
        if (!isset(self::$options['branch_switch'])) {
            self::$options['branch_switch'] = null;
        }
        if (!isset($this->{$type}->repo)) {
            $this->{$type} = new \stdClass();
            $this->{$type}->repo = null;
        } elseif (!isset(self::$options[$this->{$type}->repo])) {
            self::$options[$this->{$type}->repo] = null;
            add_site_option('github_updater', self::$options);
        }
        $this->{$type}->remote_version = '0.0.0';
        $this->{$type}->newest_tag = '0.0.0';
        $this->{$type}->download_link = null;
        $this->{$type}->tags = array();
        $this->{$type}->rollback = array();
        $this->{$type}->branches = array();
        $this->{$type}->requires = null;
        $this->{$type}->tested = null;
        $this->{$type}->donate_link = null;
        $this->{$type}->contributors = array();
        $this->{$type}->downloaded = 0;
        $this->{$type}->last_updated = null;
        $this->{$type}->rating = 0;
        $this->{$type}->num_ratings = 0;
        $this->{$type}->transient = array();
        $this->{$type}->repo_meta = array();
        $this->{$type}->watchers = 0;
        $this->{$type}->forks = 0;
        $this->{$type}->open_issues = 0;
        $this->{$type}->score = 0;
        $this->{$type}->requires_wp_version = '4.0';
        $this->{$type}->requires_php_version = '5.3';
        $this->{$type}->release_asset = false;
    }