type ) { case 'icon' : if ( ! empty( $this->label ) ) : ?> label ); ?> description ) ) : ?> description ); ?> sublabel ) ) : ?> sublabel ); ?> value() ); ?> link(); ?> type="hidden"/>
add_control( new Hoot_Customize_Icon_Control( $wp_customize, $id, $setting ) ); } endif; } add_action( 'hoot_customize_control_interface', 'hoot_customize_icon_control_interface', 10, 3 ); endif; /** * Add Content to Customizer Panel Footer * * @since 3.0.0 * @return void */ // Only load in customizer (not in frontend) if ( class_exists( 'WP_Customize_Control' ) ) : function hoot_customize_footer_iconcontent() { ?>
'; foreach ( hoot_enum_icons('sections') as $s_key => $s_title ) { $iconslist .= "

$s_title

"; $iconslist .= '
'; foreach ( $section_icons[$s_key] as $i_key => $i_class ) { $iconslist .= ""; } $iconslist .= '
'; } $iconslist .= ''; $data['iconslist'] = $iconslist; return $data; } add_filter( 'hoot_customize_control_footer_js_data_object', 'hoot_customize_controls_icon_control_js_object' ); endif; /** * Add sanitization function * * @since 3.0.0 * @param string $callback * @param string $type * @param array $setting * @param string $name name (id) of the setting * @return string */ function hoot_customize_sanitize_icon_callback( $callback, $type, $setting, $name ) { if ( $type == 'icon' ) $callback = 'hoot_sanitize_icon'; return $callback; } add_filter( 'hoot_customize_sanitize_callback', 'hoot_customize_sanitize_icon_callback', 5, 4 );