functions.php add_panel( 'header_panel', array( 'priority' => 22, 'capability' => 'edit_theme_options', 'theme_supports' => '', 'title' => __( 'Header', 'sensible-wp' ), 'description' => __( 'Bitte fügen Sie die Inhalte in Ihren Header ein.', 'sensible-wp'), )); // Logo Section $wp_customize->add_section( 'logo', array( 'title' => __( 'Logo', 'sensible-wp' ), 'priority' => 1, 'description' => __( 'Bitte fügen Sie Ihr Logo ein.', 'sensible-wp' ), 'panel' => 'header_panel', )); // Logo Image $wp_customize->add_setting( 'logo_img', array( 'sanitize_callback' => 'esc_url_raw', )); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'logo_img', array( 'label' => __( 'Logo', 'sensible-wp' ), 'type' => 'image', 'section' => 'logo', 'settings' => 'logo_img', 'priority' => 1, ))); // Title Section $wp_customize->add_section( 'titel', array( 'title' => __( 'Seitentitel', 'sensible-wp' ), 'priority' => 1, 'description' => __( 'Bitte fügen Sie Ihren Seitentitel ein.', 'sensible-wp' ), 'panel' => 'header_panel', )); // Site-Title $wp_customize->add_setting( 'site_title' , array( 'sanitize_callback' => 'sensiblewp_sanitize_text', )); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'site_title', array( 'label' => __( 'Seitentitel', 'sensible-wp' ), 'section' => 'titel', 'settings' => 'site_title', 'priority' => 1 ))); // Title Section $wp_customize->add_section( 'description', array( 'title' => __( 'Seitenbeschreibung', 'sensible-wp' ), 'priority' => 1, 'description' => __( 'Bitte fügen Sie eine Seitenbeschreibung für Google ein.', 'sensible-wp' ), 'panel' => 'header_panel', )); // Site-Desc DE $wp_customize->add_setting( 'site_desc_de' , array( 'sanitize_callback' => 'sensiblewp_sanitize_text', )); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'site_desc_de', array( 'label' => __( 'Seitenbeschreibung DE (Google)', 'sensible-wp' ), 'section' => 'description', 'settings' => 'site_desc_de', 'priority' => 1 ))); // Site-Desc EN $wp_customize->add_setting( 'site_desc_en' , array( 'sanitize_callback' => 'sensiblewp_sanitize_text', )); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'site_desc_en', array( 'label' => __( 'Seitenbeschreibung EN (Google)', 'sensible-wp' ), 'section' => 'description', 'settings' => 'site_desc_en', 'priority' => 1 ))); // Footer Panel $wp_customize->add_panel( 'footer_panel', array( 'priority' => 22, 'capability' => 'edit_theme_options', 'theme_supports' => '', 'title' => __( 'Footer', 'sensible-wp' ), 'description' => __( 'Bitte fügen Sie die Inhalte in Ihren Footer ein.', 'sensible-wp'), )); // Footer Section $wp_customize->add_section( 'copyright', array( 'title' => __( 'Copyright', 'sensible-wp' ), 'priority' => 1, 'description' => __( 'Bitte geben Sie einen Copyrightvermerk ein.', 'sensible-wp' ), 'panel' => 'footer_panel', )); // Footer Copyright $wp_customize->add_setting( 'copyright_text' , array( 'sanitize_callback' => 'sensiblewp_sanitize_text', )); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'copyright_text', array( 'label' => __( 'Copyright', 'sensible-wp' ), 'section' => 'copyright', 'settings' => 'copyright_text', 'priority' => 1 ))); // Footer Link $wp_customize->add_section( 'link', array( 'title' => __( 'Links DE', 'sensible-wp' ), 'priority' => 2, 'description' => __( 'Bitte geben Sie Ihre Links an.', 'sensible-wp' ), 'panel' => 'footer_panel', )); // Footer Link1 $wp_customize->add_setting( 'footer_link1' , array( 'sanitize_callback' => 'sensiblewp_sanitize_text', )); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'footer_link1', array( 'label' => __( 'Link', 'sensible-wp' ), 'section' => 'link', 'settings' => 'footer_link1', 'priority' => 1 ))); // Footer Link Text1 $wp_customize->add_setting( 'footer_link_text1' , array( 'sanitize_callback' => 'sensiblewp_sanitize_text', )); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'footer_link_text1', array( 'label' => __( 'Link Text', 'sensible-wp' ), 'section' => 'link', 'settings' => 'footer_link_text1', 'priority' => 2 ))); // Footer Link2 $wp_customize->add_setting( 'footer_link2' , array( 'sanitize_callback' => 'sensiblewp_sanitize_text', )); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'footer_link2', array( 'label' => __( 'Link', 'sensible-wp' ), 'section' => 'link', 'settings' => 'footer_link2', 'priority' => 3 ))); // Footer Link Text2 $wp_customize->add_setting( 'footer_link_text2' , array( 'sanitize_callback' => 'sensiblewp_sanitize_text', )); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'footer_link_text2', array( 'label' => __( 'Link Text', 'sensible-wp' ), 'section' => 'link', 'settings' => 'footer_link_text2', 'priority' => 4 ))); // Footer Link3 $wp_customize->add_setting( 'footer_link3' , array( 'sanitize_callback' => 'sensiblewp_sanitize_text', )); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'footer_link3', array( 'label' => __( 'Link', 'sensible-wp' ), 'section' => 'link', 'settings' => 'footer_link3', 'priority' => 5 ))); // Footer Link Text3 $wp_customize->add_setting( 'footer_link_text3' , array( 'sanitize_callback' => 'sensiblewp_sanitize_text', )); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'footer_link_text3', array( 'label' => __( 'Link Text', 'sensible-wp' ), 'section' => 'link', 'settings' => 'footer_link_text3', 'priority' => 6 ))); // Footer Link4 $wp_customize->add_setting( 'footer_link4' , array( 'sanitize_callback' => 'sensiblewp_sanitize_text', )); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'footer_link4', array( 'label' => __( 'Link', 'sensible-wp' ), 'section' => 'link', 'settings' => 'footer_link4', 'priority' => 7 ))); // Footer Link Text4 $wp_customize->add_setting( 'footer_link_text4' , array( 'sanitize_callback' => 'sensiblewp_sanitize_text', )); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'footer_link_text4', array( 'label' => __( 'Link Text', 'sensible-wp' ), 'section' => 'link', 'settings' => 'footer_link_text4', 'priority' => 8 ))); // Footer Link5 $wp_customize->add_setting( 'footer_link5' , array( 'sanitize_callback' => 'sensiblewp_sanitize_text', )); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'footer_link5', array( 'label' => __( 'Link', 'sensible-wp' ), 'section' => 'link', 'settings' => 'footer_link5', 'priority' => 9 ))); // Footer Link Text5 $wp_customize->add_setting( 'footer_link_text5' , array( 'sanitize_callback' => 'sensiblewp_sanitize_text', )); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'footer_link_text5', array( 'label' => __( 'Link Text', 'sensible-wp' ), 'section' => 'link', 'settings' => 'footer_link_text5', 'priority' => 10 ))); // Footer Link6 $wp_customize->add_setting( 'footer_link6' , array( 'sanitize_callback' => 'sensiblewp_sanitize_text', )); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'footer_link6', array( 'label' => __( 'Link', 'sensible-wp' ), 'section' => 'link', 'settings' => 'footer_link6', 'priority' => 11 ))); // Footer Link Text6 $wp_customize->add_setting( 'footer_link_text6' , array( 'sanitize_callback' => 'sensiblewp_sanitize_text', )); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'footer_link_text6', array( 'label' => __( 'Link Text', 'sensible-wp' ), 'section' => 'link', 'settings' => 'footer_link_text6', 'priority' => 12 ))); // Footer Link EN $wp_customize->add_section( 'link_en', array( 'title' => __( 'Links EN', 'sensible-wp' ), 'priority' => 2, 'description' => __( 'Bitte geben Sie Ihre Links an.', 'sensible-wp' ), 'panel' => 'footer_panel', )); // Footer Link1 EN $wp_customize->add_setting( 'footer_en_link1' , array( 'sanitize_callback' => 'sensiblewp_sanitize_text', )); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'footer_en_link1', array( 'label' => __( 'Link', 'sensible-wp' ), 'section' => 'link_en', 'settings' => 'footer_en_link1', 'priority' => 1 ))); // Footer Link Text1 EN $wp_customize->add_setting( 'footer_en_link_text1' , array( 'sanitize_callback' => 'sensiblewp_sanitize_text', )); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'footer_en_link_text1', array( 'label' => __( 'Link Text', 'sensible-wp' ), 'section' => 'link_en', 'settings' => 'footer_en_link_text1', 'priority' => 2 ))); // Footer Link2 EN $wp_customize->add_setting( 'footer_en_link2' , array( 'sanitize_callback' => 'sensiblewp_sanitize_text', )); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'footer_en_link2', array( 'label' => __( 'Link', 'sensible-wp' ), 'section' => 'link_en', 'settings' => 'footer_en_link2', 'priority' => 3 ))); // Footer Link Text2 EN $wp_customize->add_setting( 'footer_en_link_text2' , array( 'sanitize_callback' => 'sensiblewp_sanitize_text', )); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'footer_en_link_text2', array( 'label' => __( 'Link Text', 'sensible-wp' ), 'section' => 'link_en', 'settings' => 'footer_en_link_text2', 'priority' => 4 ))); // Footer Link3 EN $wp_customize->add_setting( 'footer_en_link3' , array( 'sanitize_callback' => 'sensiblewp_sanitize_text', )); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'footer_en_link3', array( 'label' => __( 'Link', 'sensible-wp' ), 'section' => 'link_en', 'settings' => 'footer_en_link3', 'priority' => 5 ))); // Footer Link Text3 EN $wp_customize->add_setting( 'footer_en_link_text3' , array( 'sanitize_callback' => 'sensiblewp_sanitize_text', )); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'footer_en_link_text3', array( 'label' => __( 'Link Text', 'sensible-wp' ), 'section' => 'link_en', 'settings' => 'footer_en_link_text3', 'priority' => 6 ))); // Footer Link4 EN $wp_customize->add_setting( 'footer_en_link4' , array( 'sanitize_callback' => 'sensiblewp_sanitize_text', )); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'footer_en_link4', array( 'label' => __( 'Link', 'sensible-wp' ), 'section' => 'link_en', 'settings' => 'footer_en_link4', 'priority' => 7 ))); // Footer Link Text4 EN $wp_customize->add_setting( 'footer_en_link_text4' , array( 'sanitize_callback' => 'sensiblewp_sanitize_text', )); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'footer_en_link_text4', array( 'label' => __( 'Link Text', 'sensible-wp' ), 'section' => 'link_en', 'settings' => 'footer_en_link_text4', 'priority' => 8 ))); // Footer Link5 EN $wp_customize->add_setting( 'footer_en_link5' , array( 'sanitize_callback' => 'sensiblewp_sanitize_text', )); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'footer_en_link5', array( 'label' => __( 'Link', 'sensible-wp' ), 'section' => 'link_en', 'settings' => 'footer_en_link5', 'priority' => 9 ))); // Footer Link Text5 EN $wp_customize->add_setting( 'footer_en_link_text5' , array( 'sanitize_callback' => 'sensiblewp_sanitize_text', )); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'footer_en_link_text5', array( 'label' => __( 'Link Text', 'sensible-wp' ), 'section' => 'link_en', 'settings' => 'footer_en_link_text5', 'priority' => 10 ))); // Footer Link6 EN $wp_customize->add_setting( 'footer_en_link6' , array( 'sanitize_callback' => 'sensiblewp_sanitize_text', )); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'footer_en_link6', array( 'label' => __( 'Link', 'sensible-wp' ), 'section' => 'link_en', 'settings' => 'footer_en_link6', 'priority' => 11 ))); // Footer Link Text6 EN $wp_customize->add_setting( 'footer_en_link_text6' , array( 'sanitize_callback' => 'sensiblewp_sanitize_text', )); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'footer_en_link_text6', array( 'label' => __( 'Link Text', 'sensible-wp' ), 'section' => 'link_en', 'settings' => 'footer_en_link_text6', 'priority' => 12 ))); // Footer Social Media $wp_customize->add_section( 'socialmedia', array( 'title' => __( 'Social Media', 'sensible-wp' ), 'priority' => 3, 'description' => __( 'Bitte fügen Sie Ihre Verlinkungen zu Social Media ein.', 'sensible-wp' ), 'panel' => 'footer_panel', )); // Footer Social Media Link 1 $wp_customize->add_setting( 'socialmedia_link1' , array( 'sanitize_callback' => 'sensiblewp_sanitize_text', )); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'socialmedia_link1', array( 'label' => __( 'Link', 'sensible-wp' ), 'section' => 'socialmedia', 'settings' => 'socialmedia_link1', 'priority' => 1 ))); // Footer Social Media Link 2 $wp_customize->add_setting( 'socialmedia_link2' , array( 'sanitize_callback' => 'sensiblewp_sanitize_text', )); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'socialmedia_link2', array( 'label' => __( 'Link', 'sensible-wp' ), 'section' => 'socialmedia', 'settings' => 'socialmedia_link2', 'priority' => 2 ))); // Footer Social Media Link 3 $wp_customize->add_setting( 'socialmedia_link3' , array( 'sanitize_callback' => 'sensiblewp_sanitize_text', )); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'socialmedia_link3', array( 'label' => __( 'Link', 'sensible-wp' ), 'section' => 'socialmedia', 'settings' => 'socialmedia_link3', 'priority' => 3 ))); // Footer Social Media Link 4 $wp_customize->add_setting( 'socialmedia_link4' , array( 'sanitize_callback' => 'sensiblewp_sanitize_text', )); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'socialmedia_link4', array( 'label' => __( 'Link', 'sensible-wp' ), 'section' => 'socialmedia', 'settings' => 'socialmedia_link4', 'priority' => 4 ))); // Footer Social Media Link 5 $wp_customize->add_setting( 'socialmedia_link5' , array( 'sanitize_callback' => 'sensiblewp_sanitize_text', )); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'socialmedia_link5', array( 'label' => __( 'Link', 'sensible-wp' ), 'section' => 'socialmedia', 'settings' => 'socialmedia_link5', 'priority' => 5 ))); // Footer Social Media Link 6 $wp_customize->add_setting( 'socialmedia_link6' , array( 'sanitize_callback' => 'sensiblewp_sanitize_text', )); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'socialmedia_link6', array( 'label' => __( 'Link', 'sensible-wp' ), 'section' => 'socialmedia', 'settings' => 'socialmedia_link6', 'priority' => 6 ))); // Footer Social Media Link 7 $wp_customize->add_setting( 'socialmedia_link7' , array( 'sanitize_callback' => 'sensiblewp_sanitize_text', )); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'socialmedia_link7', array( 'label' => __( 'Link', 'sensible-wp' ), 'section' => 'socialmedia', 'settings' => 'socialmedia_link7', 'priority' => 7 ))); // Footer Social Media Link 8 $wp_customize->add_setting( 'socialmedia_link8' , array( 'sanitize_callback' => 'sensiblewp_sanitize_text', )); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'socialmedia_link8', array( 'label' => __( 'Link', 'sensible-wp' ), 'section' => 'socialmedia', 'settings' => 'socialmedia_link8', 'priority' => 8 ))); } add_action('customize_register', 'sensiblewp_theme_customizer'); /** * Sanitizes our post content value (either excerpts or full post content). * * @since 1.7 */ //Integers function sensiblewp_sanitize_int( $input ) { if( is_numeric( $input ) ) { return intval( $input ); } } //Text function sensiblewp_sanitize_text( $input ) { return wp_kses_post( force_balance_tags( $input ) ); } //No sanitize - empty function for options that do not require sanitization -> to bypass the Theme Check plugin function sensiblewp_no_sanitize( $input ) { } ?>