Jetpack_Options::get_option PHP Method

get_option() public static method

Returns the requested option. Looks in jetpack_options or jetpack_$name as appropriate.
public static get_option ( string $name, mixed $default = false ) : mixed
$name string Option name
$default mixed (optional)
return mixed
    public static function get_option($name, $default = false)
    {
        if (self::is_valid($name, 'non_compact')) {
            return get_option("jetpack_{$name}", $default);
        }
        foreach (array_keys(self::$grouped_options) as $group) {
            if (self::is_valid($name, $group)) {
                return self::get_grouped_option($group, $name, $default);
            }
        }
        trigger_error(sprintf('Invalid Jetpack option name: %s', $name), E_USER_WARNING);
        return $default;
    }

Usage Example

 function get_jetpack_modules()
 {
     if (is_user_member_of_blog()) {
         return array_values(Jetpack_Options::get_option('active_modules', array()));
     }
     return null;
 }
All Usage Examples Of Jetpack_Options::get_option