/** * Load Custom Customizer JS Object * * Major rewrite, now generates the array without * referencing the customizer manager, which increases * performance and prevents recursion. * * @return array $controls Control properties which will be enqueues as a JSON object on the page * * @since 1.3 * @version 1.3.6 * */ public function customize_live_preview_l10n() { $controls = array(); $font_controls = array_merge(EGF_Register_Options::get_option_parameters(), EGF_Register_Options::get_custom_option_parameters(array())); foreach ($font_controls as $key => $value) { $controls[$key] = array('id' => $key, 'label' => $value['title'], 'type' => $value['type'], 'section' => 'tt_font_typography', 'force_styles' => $value['properties']['force_styles'], 'json' => array(), 'selector' => $value['properties']['selector'], 'setting' => array('capability' => 'edit_theme_options', 'id' => "tt_font_theme_options[{$key}]", 'default' => $value['default'], 'sanitize_callback' => '', 'sanitize_js_callback' => '', 'theme_supports' => '', 'transport' => $value['transport'], 'type' => 'option')); } return $controls; }