add_panel( 'footer_section', array( 'priority' => 30, 'capability' => 'edit_theme_options', 'title' => __('Footer', 'aqwa'), ) ); } // add section public function customizer_sections( $wp_customize ) { $this->selective_refresh = isset( $wp_customize->selective_refresh ) ? 'postMessage' : 'refresh'; // Footer widget column // $wp_customize->add_section('footer_layout', array( 'title' => __('Footer Widget Layout','aqwa'), 'panel' => 'footer_section', 'priority' => 2, ) ); // Copyright bar // $wp_customize->add_section( 'footer_bar_bottom', array( 'title' => __('Copyright','aqwa'), 'panel' => 'footer_section', 'priority' => 3, ) ); } public function footer_widget_column_customizer_settings( $wp_customize ) { $wp_customize->add_setting('aqwa_footer_widget_column', array( 'default' => 'col-lg-3', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'aqwa_sanitize_radio', 'priority' => 1, ) ); $wp_customize->add_control( 'aqwa_footer_widget_column', array( 'type' => 'radio', 'section' => 'footer_layout', 'label' => __( 'Footer Widget Column', 'aqwa' ), 'description' => __( 'Change the footer widget column','aqwa' ), 'choices' => array( 'col-lg-6' => __( 'Two Column','aqwa' ), 'col-lg-4' => __( 'Three Column' ,'aqwa' ), 'col-lg-3' => __( 'Four Column' ,'aqwa' ), ), ) ); } public function footer_copyright_bar_customizer_settings( $wp_customize ){ // Footer Copyright $copy_text = esc_html__('Copyright © [year] | By [author_name]', 'aqwa' ); $wp_customize->add_setting( 'aqwa_footer_copyright', array( 'default' => $copy_text, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'aqwa_sanitize_html', 'priority' => 4, ) ); $wp_customize->add_control( 'aqwa_footer_copyright', array( 'label' => __('Copyright','aqwa'), 'description' => __('[year] => Current year
[author_name] => Theme author','aqwa'), 'section' => 'footer_bar_bottom', 'type' => 'textarea', 'transport' => $this->selective_refresh, ) ); } public function customizer_partials( $wp_customize ){ // footer $wp_customize->selective_refresh->add_partial( 'aqwa_footer_copyright', array( 'selector' => '.footer-coppy-right p', 'render_callback' => function() { return get_theme_mod( 'aqwa_footer_copyright' ); }, ) ); } } new Aqwa_Footer_Section_Customize(); }