selective_refresh ) ? 'postMessage' : 'refresh'; // Footer Panel // $wp_customize->add_panel( 'footer_section', array( 'priority' => 34, 'capability' => 'edit_theme_options', 'title' => __('Footer', 'architecture-designer'), ) ); // Footer Background // $wp_customize->add_section( 'footer_background', array( 'title' => __('Footer Top','architecture-designer'), 'panel' => 'footer_section', 'priority' => 1, ) ); // Background color // // footer bg color $footerbg = esc_html__('#07332e', 'architecture-designer' ); $wp_customize->add_setting( 'footer_bg', array( 'default' => $footerbg, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 13, ) ); $wp_customize->add_control( 'footer_bg', array( 'label' => __('Footer BG Color','architecture-designer'), 'section' => 'footer_background', 'type' => 'color', 'transport' => $selective_refresh, ) ); // footer icon color $footericoncolor = esc_html__('#fff', 'architecture-designer' ); $wp_customize->add_setting( 'footer_icon_color', array( 'default' => $footericoncolor, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 14, ) ); $wp_customize->add_control( 'footer_icon_color', array( 'label' => __('Icon Color','architecture-designer'), 'section' => 'footer_background', 'type' => 'color', 'transport' => $selective_refresh, ) ); // footer text color $footertextcolor = esc_html__('#fff', 'architecture-designer' ); $wp_customize->add_setting( 'footer_text_color', array( 'default' => $footertextcolor, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 15, ) ); $wp_customize->add_control( 'footer_text_color', array( 'label' => __('Text Color','architecture-designer'), 'section' => 'footer_background', 'type' => 'color', 'transport' => $selective_refresh, ) ); // footer text hover color $footertexthovercolor = esc_html__('#8a8a8a', 'architecture-designer' ); $wp_customize->add_setting( 'footer_text_hover_color', array( 'default' => $footertexthovercolor, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 16, ) ); $wp_customize->add_control( 'footer_text_hover_color', array( 'label' => __('Text Hover Color','architecture-designer'), 'section' => 'footer_background', 'type' => 'color', 'transport' => $selective_refresh, ) ); // Footer Bottom // $wp_customize->add_section( 'footer_bottom', array( 'title' => __('Footer Bottom','architecture-designer'), 'panel' => 'footer_section', 'priority' => 2, ) ); // Footer Copyright Head $wp_customize->add_setting( 'footer_btm_copy_head' ,array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'architecturedesigner_sanitize_text', 'priority' => 3, ) ); $wp_customize->add_control( 'footer_btm_copy_head', array( 'type' => 'hidden', 'label' => __('Copyright','architecture-designer'), 'section' => 'footer_bottom', ) ); // Footer Copyright $architecturedesigner_foo_copy = esc_html__('Copyright © [current_year] [site_title] | Powered by [theme_author]', 'architecture-designer' ); $wp_customize->add_setting( 'footer_copyright', array( 'default' => $architecturedesigner_foo_copy, 'capability' => 'edit_theme_options', 'sanitize_callback' => 'wp_kses_post', 'priority' => 4, ) ); $wp_customize->add_control( 'footer_copyright', array( 'label' => __('Copytight','architecture-designer'), 'section' => 'footer_bottom', 'type' => 'textarea', 'transport' => $selective_refresh, ) ); } add_action( 'customize_register', 'architecturedesigner_footer' ); // Footer selective refresh function architecturedesigner_footer_partials( $wp_customize ){ // footer_copyright $wp_customize->selective_refresh->add_partial( 'footer_copyright', array( 'selector' => '.copy-right .copyright-text', 'settings' => 'footer_copyright', 'render_callback' => 'architecturedesigner_footer_copyright_render_callback', ) ); } add_action( 'customize_register', 'architecturedesigner_footer_partials' ); // copyright_content function architecturedesigner_footer_copyright_render_callback() { return get_theme_mod( 'footer_copyright' ); }