WordPress at a glance
function is not described

WP_Super_Cache_Rest_Get_Settings::callback() public WPSCache 1.0

Get the settings.

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

No Hooks.

Return

WP_Error/WP_REST_Response.

Usage

$WP_Super_Cache_Rest_Get_Settings = new WP_Super_Cache_Rest_Get_Settings();
$WP_Super_Cache_Rest_Get_Settings->callback( $request );
$request(WP_REST_Request) (required)
Full data about the request.

Code of WP_Super_Cache_Rest_Get_Settings::callback() WPSCache 1.7.1

<?php
public function callback( $request ) {
	$settings = array();

	global $wp_cache_config_file;

	if ( defined( 'WPLOCKDOWN' ) ) {
		$config_file = file_get_contents( $wp_cache_config_file );
		if ( false === strpos( $config_file, "defined( 'WPLOCKDOWN' )" ) ) {
			wp_cache_replace_line( '^.*WPLOCKDOWN', "if ( ! defined( 'WPLOCKDOWN' ) ) define( 'WPLOCKDOWN', " . $this->get_is_lock_down_enabled() . " );", $wp_cache_config_file );
		}
	}

	if ( function_exists( "opcache_invalidate" ) ) {
		@opcache_invalidate( $wp_cache_config_file );
	}
	include( $wp_cache_config_file );

	foreach ( WP_Super_Cache_Settings_Map::$map as $name => $map ) {
		if ( isset ( $map['get'] ) ) {
			$get_method = $map['get'];

			if ( method_exists( $this, $get_method ) ) {
				$settings[ $name ] = $this->$get_method();

			} elseif ( function_exists( $get_method ) ) {
				$settings[ $name ] = $get_method();
			}

		} else if ( isset ( $map['option'] ) ) {
			$settings[ $name ] = get_option( $map['option'] );

		} elseif ( isset( $map['global'] ) ) {
			if ( false == isset( $GLOBALS[ $map[ 'global' ] ] ) ) {
				$settings[ $name ] = false;
			} else {
				$settings[ $name ] = $GLOBALS[ $map[ 'global' ] ];
			}
		}
	}

	return $this->prepare_item_for_response( $settings, $request );
}