array( 'id' => 'is_on_mobile_menu', 'name' => esc_html__( 'Mobile Sidebar ( Wrapper )', Ace::TEXTDOMAIN ), ), 'before_primary' => array( 'id' => 'before_primary', 'name' => esc_html__( 'Before Content Area ( Wrapper )', Ace::TEXTDOMAIN ), ), 'before_content' => array( 'id' => 'before_content', 'name' => esc_html__( 'Before the Content ( Wrapper )', Ace::TEXTDOMAIN ), ), 'beginning_of_content' => array( 'id' => 'beginning_of_content', 'name' => esc_html__( 'At the Beginning of the Content ( Wrapper )', Ace::TEXTDOMAIN ), ), 'before_1st_h2_of_content' => array( 'id' => 'before_1st_h2_of_content', 'name' => esc_html__( 'Before the First H2 tag of the Content ( Wrapper )', Ace::TEXTDOMAIN ), ), 'end_of_content' => array( 'id' => 'end_of_content', 'name' => esc_html__( 'At the End of the Content ( Wrapper )', Ace::TEXTDOMAIN ), ), 'after_content' => array( 'id' => 'after_content', 'name' => esc_html__( 'After the Content ( Wrapper )', Ace::TEXTDOMAIN ), ), 'after_primary' => array( 'id' => 'after_primary', 'name' => esc_html__( 'After Content Area ( Wrapper )', Ace::TEXTDOMAIN ), ), 'in_footer' => array( 'id' => 'in_footer', 'name' => esc_html__( 'In the Footer ( Wrapper )', Ace::TEXTDOMAIN ), ), ); if ( is_array( $owa_args ) && 0 < count( $owa_args ) ) { foreach( $owa_args as $name => $data ) { // Append Some Theme Customizer } } // Widget Areas $owa = ace()->getWidgetAreaManager()->getOptionalWidgetAreas(); //var_dump( $owa ); if ( is_array( $owa ) && 0 < count( $owa ) ) { foreach ( $owa as $owa_id => $each_owa ) { $widget_num = absint( $each_owa['widget_num'] ); // Section $section_id = sprintf( 'owa_%s', $owa_id ); $wp_customize->add_section( $section_id, array( 'title' => $data['name'], 'panel' => 'owa', )); if ( ! isset( $each_owa['hook'] ) || ! is_string( $each_owa['hook'] ) || empty( $each_owa['hook'] ) || 'customize' === $each_owa['hook'] ) continue; $owa_hook = sanitize_text_field( $each_owa['hook'] ); $owa_name = esc_html( $each_owa['name'] ); $setting_id_prefix = $owa_hook . '_' . $widget_num; } }