type ) { case 'radioimage' : if ( empty( $this->choices ) ) return; $name = '_customize-radio-' . $this->id; if ( ! empty( $this->label ) ) : ?> label ); ?> description ) ) : ?> description ; ?> sublabel ) ) : ?> sublabel ; ?> choices as $value => $image ) : $checked = checked( $this->value(), $value, false ); ?> add_control( new Hoot_Customize_Radioimage_Control( $wp_customize, $id, $setting ) ); } endif; } add_action( 'hoot_customizer_control_interface', 'hoot_customizer_radioimage_control_interface', 10, 3 ); endif; /** * Add sanitization function * * @since 2.0.0 * @param string $name * @param string $type * @param array $setting * @return string */ function hoot_customizer_radioimage_sanitization_function( $name, $type, $setting ) { if ( $type == 'radioimage' ) $name = 'hoot_customizer_sanitize_choices'; return $name; } add_filter( 'hoot_customizer_sanitization_function', 'hoot_customizer_radioimage_sanitization_function', 5, 3 );