/** * Override the getOption value with the customizer value which comes from the $_POST array * * @since 1.9.2 * * @param mixed $value The value of the option. * @param int $postID The post ID if there is one (always null in this case). * @param TitanFrameworkOption $option The option being parsed. * * @return mixed The new value * * @see tf_pre_get_value_{namespace} */ public function useCustomizerModifiedValue($value, $postID, $option) { if (empty($_POST)) { return $value; } if (!is_array($_POST)) { return $value; } if (array_key_exists($option->getID(), $_POST)) { return $_POST[$option->getID()]; } if (!empty($_POST['customized'])) { $customizedSettings = (array) json_decode(stripslashes($_POST['customized'])); if (is_array($customizedSettings) && !empty($customizedSettings)) { if (array_key_exists($option->getID(), $customizedSettings)) { return $customizedSettings[$option->getID()]; } } } return $value; }