Custom Controls, Sections, and Panels can be easily created by subclassing the PHP objects associated with each Customizer object: WP_Customize_Control, WP_Customize_Section, and WP_Customize_Panel (this can also be done for WP_Customize_Setting, but custom settings are typically better implemented using custom setting types, as outlined in the next section). Here’s an example for a basic custom control:1234567891011class WP_New_Menu_Customize_Control extends WP_Customize_Control { public $type = ‘new_menu’; /** * Render the control’s content. */ public function render_content() { ?> <?php }}By
Source: Customizer Objects | Theme Developer Handbook | WordPress Developer Resources