um_get_option

Description

This function returns the value of an option or setting.

Usage

<?php $value = UM()->options()->get( $option_id ); ?>

Parameters

$option_id

(string) (required) The option or setting that you want to retrieve

Returns

Returns the value of the setting you requested, or a blank value if the setting does not exist.

Examples

Get default user role set in global options

<?php $default_role = UM()->options()->get('default_role'); ?>

Get blocked IP addresses set in the backend

<?php $blocked_ips = UM()->options()->get('blocked_ips'); ?>