* * @link https://developer.wordpress.org/themes/functionality/custom-headers/ * * @package Big_Bob */ /** * Set up the WordPress core custom header feature. * * @uses big_bob_header_style() */ function big_bob_custom_header_setup() { add_theme_support( 'custom-header', apply_filters( 'big_bob_custom_header_args', array( 'default-text-color' => '000000', 'width' => 2000, 'height' => 1200, 'flex-height' => true, 'flex-width' => true, 'wp-head-callback' => 'big_bob_header_style', 'video' => true, ) ) ); } // Enable video header support on mobile devices add_filter( 'header_video_settings', function( $args ) { $args['minWidth'] = 0; $args['minHeight'] = 0; return $args; } ); add_action( 'after_setup_theme', 'big_bob_custom_header_setup' ); if ( ! function_exists( 'big_bob_header_style' ) ) : /** * Styles the header image and text displayed on the blog. * * @see big_bob_custom_header_setup(). */ function big_bob_header_style() { $header_text_color = get_header_textcolor(); /* * If no custom options for text are set, let's bail. * get_header_textcolor() options: Any hex value, 'blank' to hide text. Default: add_theme_support( 'custom-header' ). */ if ( get_theme_support( 'custom-header', 'default-text-color' ) === $header_text_color ) { return; } // If we get this far, we have custom styles. Let's do this. ?>