add_section( 'aemon_theme_social_icon_section' , array( 'title' => esc_html__( 'Footer Social Icon Link', 'aemon' ), 'priority' => 10, ) ); $socailMediaLabel = array( 'Facebook', 'Twitter', 'Gmail', 'RSS', 'Pinterest', 'Vimeo' ); $socialMediaLinks = array( 'https://www.facebook.com/#', 'https://www.twitter.com/#', 'https://www.gmail.com/#', 'https://www.rss.com/#', 'https://www.pinterest.com/#', 'https://www.vimeo.com/#' ); $i = 0; while ( $i < 6 ) : $i++; $wp_customize->add_setting( "aemon_theme_footer_{$i}", array( 'default' => $socialMediaLinks[intval($i)-1], 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, "aemon_theme_footer_{$i}", array( 'label' => esc_html( "{$socailMediaLabel[intval($i)-1]} Link :" ), 'section' => 'aemon_theme_social_icon_section', 'settings' => "aemon_theme_footer_{$i}", 'type' => 'text', 'priority' => 10, ) ) ); $wp_customize->selective_refresh->add_partial( "aemon_theme_footer_{$i}", array( 'selector' => ".aemon_social_{$i} a", 'container_inclusive' => true, ) ); endwhile; $aemonCRLabel = array( 'Copy Right Text', 'Copy Right Link', 'Copy Right Text' ); $aemonCRDefault = array( '© 2014 Aemon HTML Theme By WPBrigade - ', 'http://www.wpbrigade.com', 'www.wpbrigade.com' ); $aemonCopyR = 0; while ( $aemonCopyR < 3 ) : $aemonCopyR++; $wp_customize->add_setting( "aemon_theme_footer_copyright_{$aemonCopyR}", array( 'default' => $aemonCRDefault[intval($aemonCopyR)-1], 'sanitize_callback' => 'wp_filter_nohtml_kses', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, "aemon_theme_footer_copyright_{$aemonCopyR}", array( 'label' => esc_html( $aemonCRLabel[intval($aemonCopyR)-1] ), 'section' => 'aemon_theme_social_icon_section', 'settings' => "aemon_theme_footer_copyright_{$aemonCopyR}", 'type' => 'text', 'priority' => 10, ) ) ); endwhile; /** * Setting up a general panel. */ $wp_customize->add_panel( 'aemon_theme_general_panel', array( 'priority' => 1, 'capability' => 'edit_theme_options', 'theme_supports' => '', 'title' => esc_html__( 'Theme Options', 'aemon' ), 'description' => esc_html__( 'This panel allows you to customize general setting of the theme.', 'aemon' ), ) ); /* * Creating section for price. */ $wp_customize->add_section( 'aemon_theme_general_section' , array( 'title' => esc_html__( 'Single Page Setting', 'aemon' ), 'priority' => 5, 'panel' => 'aemon_theme_general_panel', ) ); $generalSidebarSetting = array( 'aemon_theme_singPost_sidebar', 'aemon_theme_singPage_sidebar', 'aemon_theme_search_sidebar', 'aemon_theme_archive_sidebar', 'aemon_theme_author_sidebar', 'aemon_theme_blog_sidebar' ); $generalSidebarLabel = array( esc_html__( 'Display Sidebar at Single Post?', 'aemon' ), esc_html__( 'Display Sidebar at Single Page?', 'aemon' ), esc_html__( 'Display Sidebar at Seach Page?', 'aemon' ), esc_html__( 'Display Sidebar at Archive Page?', 'aemon' ), esc_html__( 'Display Sidebar at Author Page?', 'aemon' ), esc_html__( 'Display Sidebar at Blog Post?', 'aemon' ) ); $i = 0; while ( $i < 6 ) : $i++; $wp_customize->add_setting( $generalSidebarSetting[intval($i)-1], array( 'default' => 1, 'sanitize_callback' => 'theme_slug_sanitize_checkbox', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, $generalSidebarSetting[intval($i)-1], array( 'label' => $generalSidebarLabel[intval($i)-1], 'section' => 'aemon_theme_general_section', 'settings' => $generalSidebarSetting[intval($i)-1], 'type' => 'checkbox', 'priority' => 80, ) ) ); endwhile; } add_action('customize_register', 'aemon_theme_customizer', 19 );