inc/customizer/colors.php
public function header() {

		/**
		 * Filter the custom header args.
		 *
		 * @since 1.0.0
		 *
		 * @var array
		 */
		$args = (array) apply_filters( 'rock_custom_header_args',
			array(
				'default-text-color' => $this->get_default_color( 'header_textcolor', 'default' ),
				'width'              => 2400,
				'height'             => 1300,
				'flex-height'        => true,
				'wp-head-callback'   => array( $this, 'header_css' ),
			)
		);

		add_theme_support( 'custom-header', $args );

		/**
		 * Filter the default hero images.
		 *
		 * @var array
		 */
		$defaults = (array) apply_filters( 'rock_default_hero_images',
			array(
				'default' => array(
					'url'           => 'assets/images/hero.jpg',
					'thumbnail_url' => 'assets/images/hero-thumbnail.jpg',
				),
			)
		);

		foreach ( $defaults as $name => &$args ) {

			$path = trailingslashit( get_stylesheet_directory() );
			$url  = trailingslashit( get_stylesheet_directory_uri() );

			if ( ! file_exists( $path . $args['url'] ) ) {

				unset( $defaults[ $name ] );

				continue;

			}

			$args['url']           = $url . $args['url'];
			$args['thumbnail_url'] = file_exists( $path . $args['thumbnail_url'] ) ? $url . $args['thumbnail_url'] : $args['url'];

		}

		if ( $defaults ) {

			register_default_headers( $defaults );

		}

	}
public function header() {

		/**
		 * Filter the custom header args.
		 *
		 * @since 1.0.0
		 *
		 * @var array
		 */
		$args = (array) apply_filters( 'rock_custom_header_args',
			array(
				'default-text-color' => $this->get_default_color( 'header_textcolor', 'default' ),
				'width'              => 2400,
				'height'             => 1300,
				'flex-height'        => true,
				'wp-head-callback'   => array( $this, 'header_css' ),
			)
		);

		add_theme_support( 'custom-header', $args );

		/**
		 * Filter the default hero images.
		 *
		 * @var array
		 */
		$defaults = (array) apply_filters( 'rock_default_hero_images',
			array(
				'default' => array(
					'url'           => 'assets/images/hero.jpg',
					'thumbnail_url' => 'assets/images/hero-thumbnail.jpg',
				),
			)
		);

		foreach ( $defaults as $name => &$args ) {

			$path = trailingslashit( get_stylesheet_directory() );
			$url  = trailingslashit( get_stylesheet_directory_uri() );

			if ( ! file_exists( $path . $args['url'] ) ) {

				unset( $defaults[ $name ] );

				continue;

			}

			$args['url']           = $url . $args['url'];
			$args['thumbnail_url'] = file_exists( $path . $args['thumbnail_url'] ) ? $url . $args['thumbnail_url'] : $args['url'];

		}

		if ( $defaults ) {

			register_default_headers( $defaults );

		}

	}
public function header ( ) { /**
		 * Filter the custom header args.
		 *
		 * @since 1.0.0
		 *
		 * @var array
		 */ $ args = ( array ) apply_filters ( 'rock_custom_header_args' , array ( 'default-text-color' => $ this -> get_default_color ( 'header_textcolor' , 'default' ) , 'width' => 2400 , 'height' => 1300 , 'flex-height' => true , 'wp-head-callback' => array ( $ this , 'header_css' ) , ) ) ; add_theme_support ( 'custom-header' , $ args ) ; /**
		 * Filter the default hero images.
		 *
		 * @var array
		 */ $ defaults = ( array ) apply_filters ( 'rock_default_hero_images' , array ( 'default' => array ( 'url' => 'assets/images/hero.jpg' , 'thumbnail_url' => 'assets/images/hero-thumbnail.jpg' , ) , ) ) ; foreach ( $ defaults as $ name => & $ args ) { $ path = trailingslashit ( get_stylesheet_directory ( ) ) ; $ url = trailingslashit ( get_stylesheet_directory_uri ( ) ) ; if ( ! file_exists ( $ path . $ args [ 'url' ] ) ) { unset ( $ defaults [ $ name ] ) ; continue ; } $ args [ 'url' ] = $ url . $ args [ 'url' ] ; $ args [ 'thumbnail_url' ] = file_exists ( $ path . $ args [ 'thumbnail_url' ] ) ? $ url . $ args [ 'thumbnail_url' ] : $ args [ 'url' ] ; } if ( $ defaults ) { register_default_headers ( $ defaults ) ; } }
Add custom header support.

@action after_setup_theme
@since  1.0.0
@uses   $this->header_css()
Add custom header support .