/** * Customizer Controls and settings * @param object WP_Customize_Manager $wp_customize Theme Customizer object. * @uses eighteen_tags_pro_fields() */ public function etp_customize_register($wp_customize) { $fields = eighteen_tags_pro_fields(); $sections = array(); foreach ($fields as $id => $f) { $f['id'] = $id; $sections[$f['section']][] = $f; } require 'class-multi-control.php'; $this->customizer_fields($wp_customize, $sections); do_action($this->token . '-customize-register', $wp_customize); set_theme_mod('etp-google-fonts', implode(':|:', $this->google_font_fields)); }
/** * Resets all Eighteen tags pro options * @action wp_ajax_eighteen_tags_pro_reset */ public function reset_all() { $redirect = filter_input(INPUT_GET, 'redirect'); if ($redirect) { $fields = eighteen_tags_pro_fields(); foreach ($fields as $id => $f) { remove_theme_mod("{$this->token}-{$id}"); } $this->add_notice('<p>All Eighteen tags pro options have been successfully reset.</p>'); header('Location:' . $redirect); } }