Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: twentysixteen_custom_header_sizes

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
80                          /**
81                           * Filter the default twentysixteen custom header sizes attribute.
82                           *
83                           * @since Twenty Sixteen 1.0
84                           *
85                           * @param string $custom_header_sizes sizes attribute
86                           * for Custom Header. Default '(max-width: 709px) 85vw,
87                           * (max-width: 909px) 81vw, (max-width: 1362px) 88vw, 1200px'.
88                           */
89                          $custom_header_sizes = apply_filters( 'twentysixteen_custom_header_sizes', '(max-width: 709px) 85vw, (max-width: 909px) 81vw, (max-width: 1362px) 88vw, 1200px' );
90                     ?>
91                     <div class="header-image">
92                          <a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home">
93                               <img src="<?php header_image(); ?>" srcset="<?php echo esc_attr( wp_get_attachment_image_srcset( get_custom_header()->attachment_id ) ); ?>" sizes="<?php echo esc_attr( $custom_header_sizes ); ?>" width="<?php echo esc_attr( get_custom_header()->width ); ?>" height="<?php echo esc_attr( get_custom_header()->height ); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>">
94                          </a>
95                     </div><!-- .header-image -->
96                <?php endif; // End header image check. ?>
97           </header><!-- .site-header -->
98