Make WordPress Core

Ticket #24469: 24469.patch

File 24469.patch, 17.2 KB (added by obenland, 12 years ago)
  • wp-content/themes/twentythirteen/content-image.php

     
    99?>
    1010
    1111<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    12         <div class="entry-media">
    13                 <?php the_post_format_image( 'twentythirteen-image-post' ); ?>
    14         </div><!-- .entry-media -->
    15 
    1612        <header class="entry-header">
    1713                <?php if ( is_single() ) : ?>
    1814                <h1 class="entry-title"><?php the_title(); ?></h1>
     
    2420        </header><!-- .entry-header -->
    2521
    2622        <div class="entry-content">
    27                 <?php the_remaining_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentythirteen' ) ); ?>
     23                <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentythirteen' ) ); ?>
    2824                <?php wp_link_pages( array( 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentythirteen' ) . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>' ) ); ?>
    2925        </div><!-- .entry-content -->
    3026
  • wp-content/themes/twentythirteen/content-audio.php

     
    1919                <?php endif; // is_single() ?>
    2020        </header><!-- .entry-header -->
    2121
    22         <div class="entry-media">
     22        <div class="entry-content">
    2323                <div class="audio-content">
    24                         <?php the_post_format_audio(); ?>
     24                        <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentythirteen' ) ); ?>
     25                        <?php wp_link_pages( array( 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentythirteen' ) . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>' ) ); ?>
    2526                </div><!-- .audio-content -->
    26         </div><!-- .entry-media -->
    27 
    28         <div class="entry-content">
    29                 <?php the_remaining_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentythirteen' ) ); ?>
    30                 <?php wp_link_pages( array( 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentythirteen' ) . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>' ) ); ?>
    3127        </div><!-- .entry-content -->
    3228
    3329        <footer class="entry-meta">
  • wp-content/themes/twentythirteen/content-chat.php

     
    2020        </header><!-- .entry-header -->
    2121
    2222        <div class="entry-content">
    23                 <?php the_post_format_chat(); ?>
     23                <?php the_content(); ?>
    2424                <?php wp_link_pages( array( 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentythirteen' ) . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>' ) ); ?>
    2525        </div><!-- .entry-content -->
    2626
  • wp-content/themes/twentythirteen/content-gallery.php

     
    2020        </header><!-- .entry-header -->
    2121
    2222        <div class="entry-content">
    23                 <?php if ( is_single() || ! get_post_gallery() ) : ?>
     23                <?php if ( is_single() || ! has_shortcode( get_the_content(), 'gallery' ) ) : ?>
    2424                        <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentythirteen' ) ); ?>
    2525                        <?php wp_link_pages( array( 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentythirteen' ) . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>' ) ); ?>
    2626                <?php else : ?>
    27                         <?php the_post_format_gallery(); ?>
     27                        <?php twentythirteen_featured_gallery(); ?>
    2828                <?php endif; // is_single() ?>
    2929        </div><!-- .entry-content -->
    3030
  • wp-content/themes/twentythirteen/content-video.php

     
    99?>
    1010
    1111<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    12         <div class="entry-media">
    13                 <?php the_post_format_video(); ?>
    14         </div><!-- .entry-media -->
    15 
    1612        <header class="entry-header">
    1713                <?php if ( is_single() ) : ?>
    1814                <h1 class="entry-title"><?php the_title(); ?></h1>
     
    2420        </header><!-- .entry-header -->
    2521
    2622        <div class="entry-content">
    27                 <?php the_remaining_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentythirteen' ) ); ?>
     23                <?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentythirteen' ) ); ?>
    2824                <?php wp_link_pages( array( 'before' => '<div class="page-links"><span class="page-links-title">' . __( 'Pages:', 'twentythirteen' ) . '</span>', 'after' => '</div>', 'link_before' => '<span>', 'link_after' => '</span>' ) ); ?>
    2925        </div><!-- .entry-content -->
    3026
  • wp-content/themes/twentythirteen/css/editor-style.css

     
    1414 * 5.0 - Alignment
    1515 * 6.0 - Tables
    1616 * 7.0 - Images
    17  * 8.0 - Post Formats
    18  * 9.0 - RTL
     17 * 8.0 - RTL
    1918 * ----------------------------------------------------------------------------
    2019 */
    2120
     
    365364        padding: 0;
    366365}
    367366
    368 /**
    369  * 8.0 Post Formats
    370  * ----------------------------------------------------------------------------
    371  */
    372 
    373 /* Aside */
    374 .post-format-aside {
    375         background-color: #f7f5e7;
    376 }
    377 
    378 .post-format-aside blockquote {
    379         font-size: 100%;
    380         font-weight: normal;
    381 }
    382 
    383 .post-format-aside cite {
    384         font-size: 100%;
    385         text-transform: none;
    386 }
    387 
    388 .post-format-aside cite:before {
    389         content: "\2014";
    390         margin-right: 5px;
    391 }
    392 
    393 /* Audio */
    394 .post-format-audio {
    395         background-color: #db572f;
    396 }
    397 
    398 .post-format-audio a {
    399         color: #fbfaf3;
    400 }
    401 
    402 /* Chat */
    403 .post-format-chat {
    404         background-color: #eadaa6;
    405 }
    406 
    407 .post-format-chat a {
    408         color: #722d19;
    409 }
    410 
    411 /* Gallery */
    412 .post-format-gallery {
    413         background-color: #fbca3c;
    414 }
    415 
    416 .post-format-gallery a {
    417         color: #722d19;
    418 }
    419 
    420 /* Image: same as Standard/Defaults */
    421 
    422 /* Link */
    423 .post-format-link {
    424         background-color: #f7f5e7;
    425 }
    426 
    427 /* Quote */
    428 .post-format-quote {
    429         background-color: #210d10;
    430         color: #f7f5e7;
    431 }
    432 
    433 .post-format-quote blockquote {
    434         font-size: 28px;
    435         font-style: italic;
    436         font-weight: 300;
    437         margin: 0;
    438         padding-left: 75px;
    439         position: relative;
    440 }
    441 
    442 .post-format-quote blockquote:before {
    443         content: '\201C';
    444         font-size: 140px;
    445         font-weight: 400;
    446         line-height: .8;
    447         padding-right: 25px;
    448         position: absolute;
    449         left: -15px;
    450         top: -3px;
    451 }
    452 
    453 .post-format-quote a {
    454         color: #e63f2a;
    455 }
    456 
    457 .post-format-quote .quote-caption,
    458 .post-format-quote blockquote small,
    459 .post-format-quote blockquote cite {
    460         display: block;
    461         font-size: 16px;
    462 }
    463 
    464 /* Status */
    465 .post-format-status {
    466         background-color: #722d19;
    467         color: #f7f5e7;
    468         font-style: italic;
    469         font-weight: 300;
    470         padding: 0;
    471         padding-left: 35px;
    472 }
    473 
    474 .post-format-status.mceContentBody {
    475         font-size: 24px;
    476 }
    477 
    478 .post-format-status:before {
    479         background-size: 4px 4px;
    480         background: url(../images/dotted-line.png) repeat-y left bottom;
    481         content: "";
    482         display: block;
    483         height: 100%;
    484         position: absolute;
    485         left: 15px;
    486         top: 0;
    487         width: 1px;
    488 }
    489 
    490 .post-format-status p:first-child:before {
    491         background-color: rgba(0, 0, 0, 0.65);
    492         content: "";
    493         height: 3px;
    494         width: 13px;
    495         margin-top: 13px;
    496         position: absolute;
    497         left: 9px;
    498 }
    499 
    500 .post-format-status a {
    501         color: #eadaa6;
    502 }
    503 
    504 /* Video */
    505 .post-format-video {
    506         background-color: #db572f;
    507 }
    508 
    509 .post-format-video a {
    510         color: #fbfaf3;
    511 }
    512 
    513367
    514368/**
    515  * 9.0 RTL
     369 * 8.0 RTL
    516370 * ----------------------------------------------------------------------------
    517371 */
    518372
  • wp-content/themes/twentythirteen/css/ie.css

     
    1010.menu-toggle:after:hover,
    1111.date a:before:hover,
    1212.entry-meta .author a:before:hover,
    13 .format-audio .entry-media:before:hover,
     13.format-audio .entry-content:before:hover,
    1414.comments-link a:before:hover,
    1515.tags-links a:first-child:before:hover,
    1616.categories-links a:first-child:before:hover,
     
    280280        left: auto;
    281281}
    282282
    283 .ie7 .format-quote .quote {
    284         padding: 0;
    285 }
    286 
    287283/* RTL for Internet Explorer 7 & 8 */
    288 .rtl .format-audio .entry-media:before,
     284.rtl .format-audio .entry-content:before,
    289285.rtl .comment-reply-link:before,
    290286.rtl .comment-reply-login:before {
    291287        -ms-filter: "FlipH";
  • wp-content/themes/twentythirteen/rtl.css

     
    151151 * ----------------------------------------------------------------------------
    152152 */
    153153
    154 .sidebar .entry-media {
    155         padding-left: 316px;
    156         padding-right: 0;
    157 }
    158 
    159154.sidebar .entry-header,
    160155.sidebar .entry-content,
    161156.sidebar .entry-summary,
     
    245240 * ----------------------------------------------------------------------------
    246241 */
    247242
    248 .entry-media a,
    249243.entry-content a {
    250244        display: inline;
    251245}
     
    260254        margin-left: 5px;
    261255}
    262256
    263 .format-audio .entry-media:before {
     257.format-audio .entry-content:before {
    264258        float: right;
    265259        -webkit-transform: scaleX(-1);
    266260        -moz-transform:    scaleX(-1);
     
    269263        transform:         scaleX(-1);
    270264}
    271265
    272 .format-audio .entry-media,
    273 .sidebar .format-audio .entry-media {
    274         padding-left: 374px;
    275         padding-right: 60px;
    276 }
    277 
    278266.format-audio .audio-content {
    279267        background-position: right top;
    280268        float: left;
     
    343331        right: 64px;
    344332}
    345333
    346 .format-quote .quote {
     334.format-quote blockquote {
    347335        padding-left: 0;
    348336        padding-right: 75px;
    349337}
    350338
    351 .format-quote .quote:before {
     339.format-quote blockquote:before {
    352340        content: '\201D';
    353341        padding-left: 25px;
    354342        padding-right: 0;
     
    608596 */
    609597
    610598@media (max-width: 1069px) {
    611         .sidebar .entry-media,
    612         .format-audio .entry-media,
    613         .sidebar .format-audio .entry-media {
    614                 padding-left: 376px;
    615                 padding-right: 60px;
    616         }
    617 
    618599        ul.nav-menu,
    619600        div.nav-menu > ul {
    620601                margin-left: auto;
     
    656637                padding-right: 0;
    657638        }
    658639
    659         .sidebar .entry-media,
    660         .format-audio .entry-media,
    661         .sidebar .format-audio .entry-media {
    662                 padding-left: 0;
    663                 padding-right: 0;
    664         }
    665 
    666640        .site-main .widget-area {
    667641                float: none;
    668642                margin-left: auto;
  • wp-content/themes/twentythirteen/style.css

     
    257257}
    258258
    259259blockquote cite,
    260 blockquote small,
    261 .quote-caption {
     260blockquote small {
    262261        font-size: 14px;
    263262        font-weight: normal;
    264263        text-transform: uppercase;
     
    480479.featured-post:before,
    481480.date a:before,
    482481.entry-meta .author a:before,
    483 .format-audio .entry-media:before,
     482.format-audio .entry-content:before,
    484483.comments-link a:before,
    485484.tags-links a:first-child:before,
    486485.categories-links a:first-child:before,
     
    502501
    503502/* Clearing floats */
    504503.clear:after,
    505 .entry-media:after,
    506504.attachment .entry-header:after,
    507505.site-footer .widget-area:after,
    508506.entry-content:after,
     
    516514
    517515.clear:before,
    518516.clear:after,
    519 .entry-media:before,
    520 .entry-media:after,
    521517.attachment .entry-header:before,
    522518.attachment .entry-header:after,
    523519.site-footer .widget-area:before,
     
    676672        height: auto;
    677673}
    678674
    679 .entry-media img,
    680675img.size-full,
    681676img.size-large,
    682677img.wp-post-image {
     
    11261121}
    11271122
    11281123.entry-content blockquote cite,
    1129 .entry-content blockquote small,
    1130 .entry-content .quote-caption {
     1124.entry-content blockquote small {
    11311125        font-size: 16px;
    11321126}
    11331127
     
    13651359 * ----------------------------------------------------------------------------
    13661360 */
    13671361
    1368 .entry-media {
    1369         margin: 0 auto 24px;
    1370         max-width: 724px;
    1371         width: 100%;
    1372 }
    1373 
    1374 .sidebar .entry-media {
    1375         max-width: 1040px;
    1376         padding: 0 316px 0 0;
    1377 }
    1378 
    1379 .entry-media .wp-caption,
    1380 .entry-media .wp-caption-text,
    1381 .entry-media [class*="align"] {
    1382         margin: 0 auto;
    1383 }
    1384 
    13851362/* Aside */
    13861363.format-aside {
    13871364        background-color: #f7f5e7;
     
    14241401        font-weight: bold;
    14251402}
    14261403
    1427 .format-audio .entry-media {
    1428         max-width: 604px;
    1429 }
    1430 
    1431 .sidebar .format-audio .entry-media {
    1432         max-width: 1040px;
    1433         padding: 0 374px 0 60px;
    1434 }
    1435 
    1436 .format-audio .entry-media:before {
     1404.format-audio .entry-content:before {
    14371405        content: "\f109";
    14381406        float: left;
    14391407        font-size: 64px;
     
    16821650        text-decoration: none;
    16831651}
    16841652
    1685 .format-quote .quote-caption,
    16861653.format-quote blockquote small,
    16871654.format-quote blockquote cite {
    16881655        display: block;
    16891656        font-size: 16px;
    16901657}
    16911658
    1692 .format-quote .quote {
     1659.format-quote blockquote {
    16931660        font-style: italic;
    16941661        font-weight: 300;
    16951662        padding-left: 75px;
    16961663        position: relative;
    16971664}
    16981665
    1699 .format-quote .quote:before {
     1666.format-quote blockquote:before {
    17001667        content: '\201C';
    17011668        font-size: 140px;
    17021669        font-weight: 400;
     
    27142681}
    27152682
    27162683@media (max-width: 1069px) {
    2717         .sidebar .entry-media {
    2718                 padding: 0 376px 0 60px;
    2719         }
    2720 
    27212684        .sidebar img.alignleft,
    27222685        .sidebar .wp-caption.alignleft {
    27232686                margin-left: 0;
     
    27842747        .sidebar #respond #commentform,
    27852748        .sidebar .featured-gallery,
    27862749        .sidebar .post-navigation .nav-links,
    2787         .author.sidebar .author-info,
    2788         .format-audio .entry-media,
    2789         .sidebar .format-audio .entry-media {
     2750        .author.sidebar .author-info {
    27902751                max-width: 604px;
    27912752                padding-left: 0;
    27922753                padding-right: 0;
     
    28042765                max-width: 604px;
    28052766        }
    28062767
    2807         .sidebar .entry-media {
    2808                 max-width: 724px;
    2809         }
    2810 
    2811         .sidebar .entry-media,
    28122768        .sidebar .archive-meta,
    28132769        .attachment .entry-header,
    28142770        .search.sidebar .page-content,
     
    28892845                margin-right: 0;
    28902846        }
    28912847
    2892         .entry-media,
    2893         .sidebar .entry-media {
    2894                 max-width: 604px;
    2895         }
    2896 
    28972848        .attachment .image-navigation,
    28982849        .attachment .entry-attachment .attachment {
    28992850                max-width: 604px;
     
    29112862                font-size: 30px;
    29122863        }
    29132864
    2914         #content .entry-media,
    29152865        #content .entry-header,
    29162866        #content .entry-content,
    29172867        #content .entry-summary,
     
    30272977        }
    30282978
    30292979        .format-quote blockquote small,
    3030         .format-quote blockquote cite,
    3031         .format-quote .quote-caption {
     2980        .format-quote blockquote cite {
    30322981                font-size: 13px;
    30332982        }
    30342983
     
    30693018        }
    30703019
    30713020        /* Audio */
     3021        .format-audio .entry-content:before {
     3022                display: none;
     3023        }
     3024
    30723025        .format-audio .audio-content {
    30733026                background-image: none;
    30743027                float: none;
    30753028                padding-left: 0;
    30763029                width: auto;
    30773030        }
    3078 
    3079         .format-audio .entry-media:before {
    3080                 display: none;
    3081         }
    30823031}
    30833032
    30843033/* Mobile devices */
  • wp-content/themes/twentythirteen/functions.php

     
    436436 * @return string The Link format URL.
    437437 */
    438438function twentythirteen_get_link_url() {
    439         $has_url = get_the_post_format_url();
     439        $has_url = preg_match( '/<a\s[^>]*?href=[\'"](.+?)[\'"]/is', get_the_content(), $match );
    440440
    441         return ( $has_url ) ? $has_url : apply_filters( 'the_permalink', get_permalink() );
     441        return ( $has_url ) ? esc_url_raw( $match[1] ) : apply_filters( 'the_permalink', get_permalink() );
    442442}
    443443
     444if ( ! function_exists( 'twentythirteen_featured_gallery' ) ) :
     445/**
     446 * Displays first gallery from post content.
     447 *
     448 * @since Twenty Thirteen 1.0
     449 *
     450 * @return void
     451 */
     452function twentythirteen_featured_gallery() {
     453        if ( preg_match_all( '/' . get_shortcode_regex() . '/s', get_the_content(), $matches, PREG_SET_ORDER ) && ! empty( $matches ) && 'gallery' === $matches[0][2] )
     454                echo do_shortcode_tag( $matches[0] );
     455}
     456endif;
     457
    444458/**
    445459 * Sets the image size in featured galleries to large.
    446460 *
     
    498512 * @return void
    499513 */
    500514function twentythirteen_content_width() {
    501         if ( has_post_format( 'video' ) || is_attachment() ) {
     515        if ( is_attachment() ) {
    502516                global $content_width;
    503517                $content_width = 724;
    504518        }
    505 }
    506 add_action( 'template_redirect', 'twentythirteen_content_width' );
    507 
    508 /**
    509  * Adjusts content_width value for video shortcodes in video post formats.
    510  *
    511  * @since Twenty Thirteen 1.0
    512  *
    513  * @param array $atts The attribute list.
    514  * @return array The filtered attribute list.
    515  */
    516 function twentythirteen_video_width( $atts ) {
    517         if ( ! is_admin() && has_post_format( 'video' ) ) {
    518                 $new_width = 724;
    519                 $atts['height'] = round( ( $atts['height'] * $new_width ) / $atts['width'] );
    520                 $atts['width'] = $new_width;
     519        elseif ( has_post_format( 'audio' ) ) {
     520                global $content_width;
     521                $content_width = 484;
    521522        }
    522 
    523         return $atts;
    524523}
    525 add_action( 'embed_defaults',       'twentythirteen_video_width' );
    526 add_action( 'shortcode_atts_video', 'twentythirteen_video_width' );
     524add_action( 'template_redirect', 'twentythirteen_content_width' );
    527525
    528526/**
    529527 * Switches default core markup for search form to output valid HTML5.