Coding standards
Security in ResourceSpace
Developer reference
Database
Mcp browse functions
Mcp report functions
Mcp management functions
Core feature functions
Embed functions

set_core_feature_options()

Description

Store a feature's setup options as a system preference, retaining array structure and scalar types.

Parameters

ColumnTypeDefaultDescription
$name string Core feature name.
$options: array
$options array Settings accepted by the feature's setup form.

Return

bool Whether the settings were saved.

Location

include/core_feature_functions.php lines 39 to 46

Definition

 
function set_core_feature_options(string $name, array $options): bool
{
    if (!isset(
CORE_FEATURES[$name])) {
        return 
false;
    }
    
$json = json_encode($options, JSON_HEX_TAG | JSON_THROW_ON_ERROR);
    return 
set_config_option(null, "core_feature_{$name}_options", $json);
}

This article was last updated 4th December 2026 17:35 Europe/London time based on the source file dated 4th December 2026 14:10 Europe/London time.