Defaults); } } /** * Get header classes * * @since 1.0.0 */ function biddo_of_get_header_classes_array() { global $biddo_options; foreach ($biddo_options as $value) { if ($value['type'] == 'heading') $hooks[] = str_replace(' ','',strtolower($value['name'])); } return $hooks; } /** * Get options from the database and process them with the load filter hook. * * @author Jonah Dahlquist * @since 1.4.0 * @return array */ function of_get_options($key = null, $data = null) { do_action('of_get_options_before', array( 'key'=>$key, 'data'=>$data )); $data = get_theme_mods(); $data = apply_filters('biddo_options_after_load', $data); do_action('of_option_setup_before', array( 'key'=>$key, 'data'=>$data )); return $data; } /** * Save options to the database after processing them * * @param $data Options array to save * @author Jonah Dahlquist * @since 1.4.0 * @uses update_option() * @return void */ function of_save_options($data, $key = null) { global $biddo_smof_data; if (empty($data)) return; do_action('of_save_options_before', array( 'key'=>$key, 'data'=>$data )); $data = apply_filters('biddo_options_before_save', $data); if ($key != null) { // Update one specific value set_theme_mod($key, $data); } else { // Update all values in $data foreach ( $data as $k=>$v ) { if (!isset($biddo_biddo_smof_data[$k]) || $biddo_smof_data[$k] != $v) { // Only write to the DB when we need to set_theme_mod($k, $v); } } } do_action('of_save_options_after', array( 'key'=>$key, 'data'=>$data )); } /** * For use in themes * * @since forever */ $data = of_get_options(); $biddo_smof_data = of_get_options(); $data = $biddo_smof_data; $biddo_data =$data;