Set default theme constant in main "wordpress.php" config file.

@param string $name
761701
protected function setAsDefaultTheme(string $name)
    {
        if (! file_exists($file = config_path('wordpress.php'))) {
            $this->warn('Cannot update default theme configuration.');

            return;
        }

        $this->info('Set default theme constant...');
        $lines = file($file);

        $content = array_map(function ($line) use ($name) {
            if (stristr($line, 'WP_DEFAULT_THEME')) {
                return "define('WP_DEFAULT_THEME', '{$name}');\r\n";
            }

            return $line;
        }, $lines);

        $this->files->put($file, implode('', $content));
    }
850796
public function setName($name)
    {
        $this->name = $name;
        if ($this->node) {
            $this->node->name = $name;
        }
    }
40797
function set_conf( $confname ){
		$this->confname = $confname;
		$this->confdir = PLUG_HOST_DIR.'/'.$confname;
		if( ! PLUGTool::check_dir($this->confdir) ){
			throw new PLUGException('bad conf');
		}
		// parse default plug conf using external parser
		$confpath = $this->confdir.'/PLUG.conf.php';
		$this->conf_vars = array();
		$this->conf_consts = array ();
		$this->load_conf( $confpath );
	}
1254730
public function set($name = null, $config = null) {
		if (is_array($config)) {
			$this->_configurations[$name] = $config;
			return;
		}
		if ($config === false) {
			unset($this->_configurations[$name]);
		}
	}
1202707
public function addConst($name, $value = null, $recursive = false, $changeable = false)
    {
        if ($this->existsConst($name) && !$changeable) {
            if (is_array($name)) {
                $name = implode('.', $name);
            }
            throw new TemplateException("Constant is defined: {$name}");
        }
        static::$constants[$name] =
            isset(static::$constants[$name]) && is_array(static::$constants[$name])
                ? $this->_merge(static::$constants[$name], (array)$value, $recursive)
                : $value;
    }
1236883
public function set_config($name, $value) {
        $pluginname = $this->get_name();
        $this->load_config();
        if ($value === NULL) {
            unset($this->config->$name);
        } else {
            $this->config->$name = $value;
        }
        set_config($name, $value, "enrol_$pluginname");
    }
629777
public function setName(string $name) : void
    {
        if (empty($name)) {
            throw new InvalidArgumentException('Empty field name is not allowed');
        }

        $this->_name = $name;
    }
765912
protected function loadThemedCSS($name)
    {
        if ($this->isDevServerActive()) {
            Requirements::css($this->getDevServerURL($this->ext($name, 'css')));
        } else {
            Requirements::themedCSS($name);
        }
    }
1097122
protected function setConfigurationFile(string $name, array $headers)
    {
        $this->info('Set plugin configuration...');

        $prefix = trim($headers['plugin_prefix'], '\/_-');
        $from = $this->path($name.'/config/prefix_plugin.php');
        $to = $this->path($name.'/config/'.$prefix.'_plugin.php');

        $this->files->move($from, $to);
        $this->replaceFileContent($to, $headers);
    }
467460
public function setNameAttribute(string $name)
    {
        $this->attributes['name'] = $name;
        $this->slug = $slug = str_slug($name);

        if ($this instanceof Model && self::sameSlugs($this, $slug)->exists()) {
            $similarSlugs = self::similarSlugs($this, $slug);
            $postfix = 1;
            $this->slug = $slug.$postfix;
            while ($similarSlugs->has($this->slug)) {
                $postfix++;
                $this->slug = $slug.$postfix;
            }
        }
    }
656565
public function setOption($name, $value) {
		$this->validateName($name);
		$this->config[$name] = $value;
	}
256765
public function setSetting($name, $value = null)
    {
        $oldValue = $this->getSetting($name);
        if ($value != $oldValue) {
            if (!empty($value)) {
                $this->settings[$name] = $value;
            } else {
                unset($this->settings[$name]);
            }
            $this->settingsChanged = true;
        }
    }
106834
public function optionName($name)
    {
        if (empty($this->optionPath)) {
            $this->optionPath = PATH_RESOURCES . 'themes' . DIRECTORY_SEPARATOR;
        }

        $this->optionName = $name;
    }
348504
protected function _setTheme()
    {
        $theme = $this->request->getParam('theme');
        if ($theme) {
            $this->viewBuilder()->setTheme($theme);
        }
    }
892273
public static function init_config($theme_root = null)
    {
        if (static::$setup === false) {
            $config = new Config();

            if ($theme_root === null) {
                $config_cache_path = \get_stylesheet_directory() . '/cache/config/' . \sha1(NONCE_SALT . 'theme');

                if (WP_DEBUG === false && \file_exists($config_cache_path)) {
                    $config->load_from_cache(\file_get_contents($config_cache_path));
                } else {
                    $config->add_path(\get_template_directory() . '/config');

                    if (\is_child_theme()) {
                        $config->add_path(\get_stylesheet_directory() . '/config');
                    }
                }
            }

            if ($theme_root !== null) {
                $config->add_path($theme_root . '/config');
            }

            static::$container->add_instance($config);
            static::$container->alias(Config::class, 'config');
        }
    }
195418
public function setConfig($name, $value)
    {
        isset($this->config[$name]) && ($this->config[$name] = $value);
    }
408306
protected function setPluginRootFile(string $name)
    {
        $this->info('Set plugin root file...');
        $this->files->move($this->path($name.'/plugin-name.php'), $this->path($name.'/'.$name.'.php'));
    }