get_template_directory_uri() . '/framework/images/header.jpg', 'default-text-color' => 'fff', 'width' => 1335, 'height' => 600, 'flex-height' => true, 'flex-width' => true, 'wp-head-callback' => 'best_wp_header_style', ) ) ); register_default_headers( array( 'yourimg' => array( 'url' => get_template_directory_uri() . '/framework/images/header.jpg', 'thumbnail_url' => get_template_directory_uri() . '/framework/images/header.jpg', 'description' => _x( 'Default Image', 'header image description', 'best-wp' )), )); } add_action( 'after_setup_theme', 'best_wp_custom_header_setup' ); if ( ! function_exists( 'best_wp_header_style' ) ) : /** * Styles the header image and text displayed on the blog. * * @see best_wp_custom_header_setup(). */ function best_wp_header_style() { $best_wp_header_text_color = get_header_textcolor(); // If we get this far, we have custom styles. Let's do this. ?> add_setting( 'custom_header_position', array( 'default' => 'all', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'best_wp_sanitize_select', ) ); $wp_customize->add_control( 'custom_header_position', array( 'settings' => 'custom_header_position', 'priority' => 1, 'label' => __( 'Activate Header Image:', 'best-wp' ), 'section' => 'header_image', 'type' => 'select', 'choices' => array( 'deactivate' => __( 'Deactivate Header Image', 'best-wp' ), 'all' => __( 'All Pages', 'best-wp' ), 'home' => __( 'Home Page', 'best-wp' ) ), 'default' => 'all' ) ); } function best_wp_customize_css () { ?> __( 'Deactivate Header Image', 'best-wp' ), 'all' => __( 'All Pages', 'best-wp' ), 'home' => __( 'Home Page', 'best-wp' ) ); if ( array_key_exists( $input, $valid ) ) { return $input; } else { return ''; } }