add_panel( 'theme_options', array( 'title' => esc_html__( 'Theme Options', 'camaraderie' ), 'priority' => 5, ) ); $wp_customize->add_section( 'custom_header', array( 'title' => esc_html__( 'Custom Header', 'camaraderie' ), 'panel' => 'theme_options', 'priority' => 5, ) ); $wp_customize->add_setting( 'custom_image', array( 'default' => get_theme_file_uri( '/vendor/benlumia007/backdrop-core/src/assets/images/header-image.jpg' ), 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_control( new \WP_Customize_Image_Control( $wp_customize, 'custom_image', array( 'label' => esc_html__( 'Custom Image', 'camaraderie' ), 'description' => esc_html__( 'Custom Image should be activate once a static page is set.', 'camaraderie' ), 'section' => 'custom_header', 'settings' => 'custom_image', ) ) ); $wp_customize->add_setting( 'custom_avatar', array( 'default' => get_theme_file_uri( '/vendor/benlumia007/backdrop-core/src/assets/images/avatar.jpg' ), 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_control( new \WP_Customize_Image_Control( $wp_customize, 'custom_avatar', array( 'label' => esc_html__( 'Avatar Image', 'camaraderie' ), 'section' => 'custom_header', 'settings' => 'custom_avatar', ) ) ); } add_action( 'customize_register', __NAMESPACE__ . '\load_theme_options' );