* * @link https://developer.wordpress.org/themes/functionality/custom-headers/ * * @package cenote */ /** * Set up the WordPress core custom header feature. * * @uses cenote_header_style() */ function cenote_custom_header_setup() { add_theme_support( 'custom-header', apply_filters( 'cenote_custom_header_args', array( 'default-image' => '', 'default-text-color' => '000000', 'width' => 1920, 'height' => 1080, 'flex-height' => true, 'wp-head-callback' => 'cenote_header_style', ) ) ); } add_action( 'after_setup_theme', 'cenote_custom_header_setup' ); /** * Adds header media on header. * * @return void */ function cenote_header_markup() { $title = get_theme_mod( 'cenote_header_media_title', 'Hi, I am Header Media Title' ); $text = get_theme_mod( 'cenote_header_media_text', 'I am description of header media. You can write short text to give me more info.' ); $button_text = get_theme_mod( 'cenote_header_media_button_text', 'Take action' ); $button_url = get_theme_mod( 'cenote_header_media_url', '#' ); $is_info_enabled = get_theme_mod( 'cenote_header_media_enable_desc', true ); $style = get_theme_mod( 'cenote_header_media_style', 'cenote-header-media--center' ); if ( has_header_image() && is_front_page() ) { ?>