WordPress at a glance
function is not described

WP_Super_Cache_Rest_Update_Settings::set_super_cache_enabled() protected WPSCache 1.0

{} It's a method of the class: WP_Super_Cache_Rest_Update_Settings{}

No Hooks.

Return

Null. Nothing.

Usage

// protected - for code of main (parent) or child class
$result = $this->set_super_cache_enabled( $value );
$value(mixed) (required)

Code of WP_Super_Cache_Rest_Update_Settings::set_super_cache_enabled() WPSCache 1.7.1

<?php
protected function set_super_cache_enabled( $value ) {
	global $wp_cache_mod_rewrite;

	if ( is_numeric( $value ) == false ) {
		$types = array( 'wpcache' => 0, 'mod_rewrite' => 1, 'PHP' => 2 );
		if ( isset( $types[ $value ] ) ) {
			$value = $types[ $value ];
		} else {
			return false;
		}
	}

	if ( $value === 0 ) { // WPCache
		wp_super_cache_disable();

	} else {
		wp_super_cache_enable();
		$wp_cache_mod_rewrite = 0; // PHP recommended

		if ( $value == 1 ) { // mod_rewrite
			$wp_cache_mod_rewrite = 1;
			add_mod_rewrite_rules();

		} elseif( $value == 2 ) { // PHP
			$wp_cache_mod_rewrite = 0;
			remove_mod_rewrite_rules();

		}

		wp_cache_setting( 'wp_cache_mod_rewrite', $wp_cache_mod_rewrite );
	}
	return true;
}