Changeset 59907
- Timestamp:
- 03/03/2025 06:43:08 PM (8 weeks ago)
- Location:
- trunk/src/wp-content/themes
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentyeleven/header.php
r59344 r59907 79 79 <header id="branding"> 80 80 <hgroup> 81 <h1 id="site-title"><span><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></span></h1> 81 <?php $is_front = ! is_paged() && ( is_front_page() || ( is_home() && ( (int) get_option( 'page_for_posts' ) !== get_queried_object_id() ) ) ); ?> 82 <h1 id="site-title"><span><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" <?php echo $is_front ? 'aria-current="page"' : ''; ?>><?php bloginfo( 'name' ); ?></a></span></h1> 82 83 <h2 id="site-description"><?php bloginfo( 'description' ); ?></h2> 83 84 </hgroup> … … 98 99 } 99 100 ?> 100 <a href="<?php echo esc_url( home_url( '/' ) ); ?>" >101 <a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" <?php echo $is_front ? 'aria-current="page"' : ''; ?>> 101 102 <?php 102 103 /* -
trunk/src/wp-content/themes/twentyfifteen/header.php
r59026 r59907 34 34 <?php 35 35 twentyfifteen_the_custom_logo(); 36 36 $is_front = ! is_paged() && ( is_front_page() || ( is_home() && ( (int) get_option( 'page_for_posts' ) !== get_queried_object_id() ) ) ); 37 37 if ( is_front_page() && is_home() ) : 38 38 ?> 39 <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" ><?php bloginfo( 'name' ); ?></a></h1>39 <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" <?php echo $is_front ? 'aria-current="page"' : ''; ?>><?php bloginfo( 'name' ); ?></a></h1> 40 40 <?php else : ?> 41 <p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" ><?php bloginfo( 'name' ); ?></a></p>41 <p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" <?php echo $is_front ? 'aria-current="page"' : ''; ?>><?php bloginfo( 'name' ); ?></a></p> 42 42 <?php 43 43 endif; -
trunk/src/wp-content/themes/twentyfourteen/header.php
r59026 r59907 34 34 <?php wp_body_open(); ?> 35 35 <div id="page" class="hfeed site"> 36 <?php $is_front = ! is_paged() && ( is_front_page() || ( is_home() && ( (int) get_option( 'page_for_posts' ) !== get_queried_object_id() ) ) ); ?> 36 37 <?php if ( get_header_image() ) : ?> 37 38 <div id="site-header"> 38 <a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" >39 <a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" <?php echo $is_front ? 'aria-current="page"' : ''; ?>> 39 40 <?php twentyfourteen_header_image(); ?> 40 41 </a> … … 44 45 <header id="masthead" class="site-header"> 45 46 <div class="header-main"> 46 <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" ><?php bloginfo( 'name' ); ?></a></h1>47 <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" <?php echo $is_front ? 'aria-current="page"' : ''; ?>><?php bloginfo( 'name' ); ?></a></h1> 47 48 48 49 <div class="search-toggle"> -
trunk/src/wp-content/themes/twentynineteen/template-parts/header/site-branding.php
r46827 r59907 14 14 <?php endif; ?> 15 15 <?php $blog_info = get_bloginfo( 'name' ); ?> 16 <?php $is_front = ! is_paged() && ( is_front_page() || ( is_home() && ( (int) get_option( 'page_for_posts' ) !== get_queried_object_id() ) ) ); ?> 16 17 <?php if ( ! empty( $blog_info ) ) : ?> 17 18 <?php if ( is_front_page() && is_home() ) : ?> 18 <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" ><?php bloginfo( 'name' ); ?></a></h1>19 <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" <?php echo $is_front ? 'aria-current="page"' : ''; ?>><?php bloginfo( 'name' ); ?></a></h1> 19 20 <?php else : ?> 20 <p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" ><?php bloginfo( 'name' ); ?></a></p>21 <p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" <?php echo $is_front ? 'aria-current="page"' : ''; ?>><?php bloginfo( 'name' ); ?></a></p> 21 22 <?php endif; ?> 22 23 <?php endif; ?> -
trunk/src/wp-content/themes/twentyseventeen/template-parts/header/site-branding.php
r55276 r59907 16 16 17 17 <div class="site-branding-text"> 18 <?php $is_front = ! is_paged() && ( is_front_page() || ( is_home() && ( (int) get_option( 'page_for_posts' ) !== get_queried_object_id() ) ) ); ?> 18 19 <?php if ( is_front_page() ) : ?> 19 <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" ><?php bloginfo( 'name' ); ?></a></h1>20 <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" <?php echo $is_front ? 'aria-current="page"' : ''; ?>><?php bloginfo( 'name' ); ?></a></h1> 20 21 <?php else : ?> 21 <p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" ><?php bloginfo( 'name' ); ?></a></p>22 <p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" <?php echo $is_front ? 'aria-current="page"' : ''; ?>><?php bloginfo( 'name' ); ?></a></p> 22 23 <?php endif; ?> 23 24 -
trunk/src/wp-content/themes/twentysixteen/header.php
r59026 r59907 37 37 <div class="site-branding"> 38 38 <?php twentysixteen_the_custom_logo(); ?> 39 39 <?php $is_front = ! is_paged() && ( is_front_page() || ( is_home() && ( (int) get_option( 'page_for_posts' ) !== get_queried_object_id() ) ) ); ?> 40 40 <?php if ( is_front_page() && is_home() ) : ?> 41 <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" ><?php bloginfo( 'name' ); ?></a></h1>41 <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" <?php echo $is_front ? 'aria-current="page"' : ''; ?>><?php bloginfo( 'name' ); ?></a></h1> 42 42 <?php else : ?> 43 <p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" ><?php bloginfo( 'name' ); ?></a></p>43 <p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" <?php echo $is_front ? 'aria-current="page"' : ''; ?>><?php bloginfo( 'name' ); ?></a></p> 44 44 <?php 45 45 endif; … … 102 102 ?> 103 103 <div class="header-image"> 104 <a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" >104 <a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" <?php echo $is_front ? 'aria-current="page"' : ''; ?>> 105 105 <?php 106 106 $custom_header = get_custom_header(); -
trunk/src/wp-content/themes/twentyten/header.php
r59857 r59907 72 72 <<?php echo $heading_tag; ?> id="site-title"> 73 73 <span> 74 <a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a> 74 <?php $is_front = ! is_paged() && ( is_front_page() || ( is_home() && ( (int) get_option( 'page_for_posts' ) !== get_queried_object_id() ) ) ); ?> 75 <a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" <?php echo $is_front ? 'aria-current="page"' : ''; ?>><?php bloginfo( 'name' ); ?></a> 75 76 </span> 76 77 </<?php echo $heading_tag; ?>> -
trunk/src/wp-content/themes/twentythirteen/header.php
r59026 r59907 24 24 <div id="page" class="hfeed site"> 25 25 <header id="masthead" class="site-header"> 26 <a class="home-link" href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"> 26 <?php $is_front = ! is_paged() && ( is_front_page() || ( is_home() && ( (int) get_option( 'page_for_posts' ) !== get_queried_object_id() ) ) ); ?> 27 <a class="home-link" href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" <?php echo $is_front ? 'aria-current="page"' : ''; ?>> 27 28 <h1 class="site-title"><?php bloginfo( 'name' ); ?></h1> 28 29 <h2 class="site-description"><?php bloginfo( 'description' ); ?></h2> -
trunk/src/wp-content/themes/twentytwelve/header.php
r59026 r59907 37 37 <header id="masthead" class="site-header"> 38 38 <hgroup> 39 <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1> 39 <?php $is_front = ! is_paged() && ( is_front_page() || ( is_home() && ( (int) get_option( 'page_for_posts' ) !== get_queried_object_id() ) ) ); ?> 40 <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" <?php echo $is_front ? 'aria-current="page"' : ''; ?>><?php bloginfo( 'name' ); ?></a></h1> 40 41 <h2 class="site-description"><?php bloginfo( 'description' ); ?></h2> 41 42 </hgroup> … … 55 56 56 57 <?php if ( get_header_image() ) : ?> 57 <a href="<?php echo esc_url( home_url( '/' ) ); ?>" ><?php twentytwelve_header_image(); ?></a>58 <a href="<?php echo esc_url( home_url( '/' ) ); ?>" <?php echo $is_front ? 'aria-current="page"' : ''; ?> rel="home"><?php twentytwelve_header_image(); ?></a> 58 59 <?php endif; ?> 59 60 </header><!-- #masthead --> -
trunk/src/wp-content/themes/twentytwenty/inc/template-tags.php
r56548 r59907 41 41 'logo' => '%1$s<span class="screen-reader-text">%2$s</span>', 42 42 'logo_class' => 'site-logo', 43 'title' => '<a href="%1$s" >%2$s</a>',43 'title' => '<a href="%1$s" rel="home">%2$s</a>', 44 44 'title_class' => 'site-title', 45 45 'home_wrap' => '<h1 class="%1$s">%2$s</h1>', … … 64 64 $classname = $args['logo_class']; 65 65 } else { 66 $contents = sprintf( $args['title'], esc_url( get_home_url( null, '/' ) ), esc_html( $site_title ) ); 66 $contents = sprintf( $args['title'], esc_url( get_home_url( null, '/' ) ), esc_html( $site_title ) ); 67 if ( 68 ( is_front_page() || is_home() && ( (int) get_option( 'page_for_posts' ) !== get_queried_object_id() ) ) 69 && ! is_paged() 70 && $args['title'] === $defaults['title'] 71 ) { 72 $contents = str_replace( ' rel=', ' aria-current="page" rel=', $contents ); 73 } 67 74 $classname = $args['title_class']; 68 75 } -
trunk/src/wp-content/themes/twentytwentyone/template-parts/header/site-branding.php
r50802 r59907 29 29 <h1 class="<?php echo esc_attr( $header_class ); ?>"><?php echo esc_html( $blog_info ); ?></h1> 30 30 <?php elseif ( is_front_page() && ! is_home() ) : ?> 31 <h1 class="<?php echo esc_attr( $header_class ); ?>"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" ><?php echo esc_html( $blog_info ); ?></a></h1>31 <h1 class="<?php echo esc_attr( $header_class ); ?>"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php echo esc_html( $blog_info ); ?></a></h1> 32 32 <?php else : ?> 33 <p class="<?php echo esc_attr( $header_class ); ?>"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" ><?php echo esc_html( $blog_info ); ?></a></p>33 <p class="<?php echo esc_attr( $header_class ); ?>"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php echo esc_html( $blog_info ); ?></a></p> 34 34 <?php endif; ?> 35 35 <?php endif; ?>
Note: See TracChangeset
for help on using the changeset viewer.