WordPress.org

Make WordPress Core


Ignore:
Timestamp:
11/03/2014 09:39:37 PM (6 years ago)
Author:
iandstewart
Message:

Twenty Fifteen: Use new core navigation tags.

Props obenland, iamtakashi, fixes #30189

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyfifteen/functions.php

    r30116 r30216  
    261261    if ( $previous &&  has_post_thumbnail( $previous->ID ) ) {
    262262        $prevthumb = wp_get_attachment_image_src( get_post_thumbnail_id( $previous->ID ), 'post-thumbnail' );
    263         $css .= '.post-navigation .nav-previous { background-image: url(' . esc_url( $prevthumb[0] ) . '); }';
     263        $css .= '
     264            .post-navigation .nav-previous { background-image: url(' . esc_url( $prevthumb[0] ) . '); }
     265            .post-navigation .nav-previous .post-title, .post-navigation .nav-previous .meta-nav { color: #fff; }
     266            .post-navigation .nav-previous a:before { background-color: rgba(0, 0, 0, 0.4); }
     267        ';
    264268    }
    265269
    266270    if ( $next && has_post_thumbnail( $next->ID ) ) {
    267271        $nextthumb = wp_get_attachment_image_src( get_post_thumbnail_id( $next->ID ), 'post-thumbnail' );
    268         $css .= '.post-navigation .nav-next { background-image: url(' . esc_url( $nextthumb[0] ) . '); }';
     272        $css .= '
     273            .post-navigation .nav-next { background-image: url(' . esc_url( $nextthumb[0] ) . '); }
     274            .post-navigation .nav-next .post-title, .post-navigation .nav-next .meta-nav { color: #fff; }
     275            .post-navigation .nav-next a:before { background-color: rgba(0, 0, 0, 0.4); }
     276        ';
    269277    }
    270278
Note: See TracChangeset for help on using the changeset viewer.