/** * Gets the default value of a single setting */ public function get_default($setting = null, $subset = false) { if (!self::$options_with_id) { $options = of_options_array(); foreach ($options as $key => $option) { self::$options_with_id[$option['id']] = $option; } } if (is_null($setting)) { return null; } if (isset(self::$options_with_id[$setting])) { return !$subset ? self::$options_with_id[$setting]['std'] : self::$options_with_id[$setting]['std'][$subset]; } else { return null; } }
function of_options() { global $of_options; $of_options = of_options_array(); // End Avada Edit }