Ticket #24469: 24469.patch
File 24469.patch, 17.2 KB (added by , 12 years ago) |
---|
-
wp-content/themes/twentythirteen/content-image.php
9 9 ?> 10 10 11 11 <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 16 12 <header class="entry-header"> 17 13 <?php if ( is_single() ) : ?> 18 14 <h1 class="entry-title"><?php the_title(); ?></h1> … … 24 20 </header><!-- .entry-header --> 25 21 26 22 <div class="entry-content"> 27 <?php the_ remaining_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentythirteen' ) ); ?>23 <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentythirteen' ) ); ?> 28 24 <?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>' ) ); ?> 29 25 </div><!-- .entry-content --> 30 26 -
wp-content/themes/twentythirteen/content-audio.php
19 19 <?php endif; // is_single() ?> 20 20 </header><!-- .entry-header --> 21 21 22 <div class="entry- media">22 <div class="entry-content"> 23 23 <div class="audio-content"> 24 <?php the_post_format_audio(); ?> 24 <?php the_content( __( 'Continue reading <span class="meta-nav">→</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>' ) ); ?> 25 26 </div><!-- .audio-content --> 26 </div><!-- .entry-media -->27 28 <div class="entry-content">29 <?php the_remaining_content( __( 'Continue reading <span class="meta-nav">→</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>' ) ); ?>31 27 </div><!-- .entry-content --> 32 28 33 29 <footer class="entry-meta"> -
wp-content/themes/twentythirteen/content-chat.php
20 20 </header><!-- .entry-header --> 21 21 22 22 <div class="entry-content"> 23 <?php the_ post_format_chat(); ?>23 <?php the_content(); ?> 24 24 <?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>' ) ); ?> 25 25 </div><!-- .entry-content --> 26 26 -
wp-content/themes/twentythirteen/content-gallery.php
20 20 </header><!-- .entry-header --> 21 21 22 22 <div class="entry-content"> 23 <?php if ( is_single() || ! get_post_gallery() ) : ?>23 <?php if ( is_single() || ! has_shortcode( get_the_content(), 'gallery' ) ) : ?> 24 24 <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentythirteen' ) ); ?> 25 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>' ) ); ?> 26 26 <?php else : ?> 27 <?php t he_post_format_gallery(); ?>27 <?php twentythirteen_featured_gallery(); ?> 28 28 <?php endif; // is_single() ?> 29 29 </div><!-- .entry-content --> 30 30 -
wp-content/themes/twentythirteen/content-video.php
9 9 ?> 10 10 11 11 <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 16 12 <header class="entry-header"> 17 13 <?php if ( is_single() ) : ?> 18 14 <h1 class="entry-title"><?php the_title(); ?></h1> … … 24 20 </header><!-- .entry-header --> 25 21 26 22 <div class="entry-content"> 27 <?php the_ remaining_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentythirteen' ) ); ?>23 <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentythirteen' ) ); ?> 28 24 <?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>' ) ); ?> 29 25 </div><!-- .entry-content --> 30 26 -
wp-content/themes/twentythirteen/css/editor-style.css
14 14 * 5.0 - Alignment 15 15 * 6.0 - Tables 16 16 * 7.0 - Images 17 * 8.0 - Post Formats 18 * 9.0 - RTL 17 * 8.0 - RTL 19 18 * ---------------------------------------------------------------------------- 20 19 */ 21 20 … … 365 364 padding: 0; 366 365 } 367 366 368 /**369 * 8.0 Post Formats370 * ----------------------------------------------------------------------------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 513 367 514 368 /** 515 * 9.0 RTL369 * 8.0 RTL 516 370 * ---------------------------------------------------------------------------- 517 371 */ 518 372 -
wp-content/themes/twentythirteen/css/ie.css
10 10 .menu-toggle:after:hover, 11 11 .date a:before:hover, 12 12 .entry-meta .author a:before:hover, 13 .format-audio .entry- media:before:hover,13 .format-audio .entry-content:before:hover, 14 14 .comments-link a:before:hover, 15 15 .tags-links a:first-child:before:hover, 16 16 .categories-links a:first-child:before:hover, … … 280 280 left: auto; 281 281 } 282 282 283 .ie7 .format-quote .quote {284 padding: 0;285 }286 287 283 /* RTL for Internet Explorer 7 & 8 */ 288 .rtl .format-audio .entry- media:before,284 .rtl .format-audio .entry-content:before, 289 285 .rtl .comment-reply-link:before, 290 286 .rtl .comment-reply-login:before { 291 287 -ms-filter: "FlipH"; -
wp-content/themes/twentythirteen/rtl.css
151 151 * ---------------------------------------------------------------------------- 152 152 */ 153 153 154 .sidebar .entry-media {155 padding-left: 316px;156 padding-right: 0;157 }158 159 154 .sidebar .entry-header, 160 155 .sidebar .entry-content, 161 156 .sidebar .entry-summary, … … 245 240 * ---------------------------------------------------------------------------- 246 241 */ 247 242 248 .entry-media a,249 243 .entry-content a { 250 244 display: inline; 251 245 } … … 260 254 margin-left: 5px; 261 255 } 262 256 263 .format-audio .entry- media:before {257 .format-audio .entry-content:before { 264 258 float: right; 265 259 -webkit-transform: scaleX(-1); 266 260 -moz-transform: scaleX(-1); … … 269 263 transform: scaleX(-1); 270 264 } 271 265 272 .format-audio .entry-media,273 .sidebar .format-audio .entry-media {274 padding-left: 374px;275 padding-right: 60px;276 }277 278 266 .format-audio .audio-content { 279 267 background-position: right top; 280 268 float: left; … … 343 331 right: 64px; 344 332 } 345 333 346 .format-quote .quote {334 .format-quote blockquote { 347 335 padding-left: 0; 348 336 padding-right: 75px; 349 337 } 350 338 351 .format-quote .quote:before {339 .format-quote blockquote:before { 352 340 content: '\201D'; 353 341 padding-left: 25px; 354 342 padding-right: 0; … … 608 596 */ 609 597 610 598 @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 618 599 ul.nav-menu, 619 600 div.nav-menu > ul { 620 601 margin-left: auto; … … 656 637 padding-right: 0; 657 638 } 658 639 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 666 640 .site-main .widget-area { 667 641 float: none; 668 642 margin-left: auto; -
wp-content/themes/twentythirteen/style.css
257 257 } 258 258 259 259 blockquote cite, 260 blockquote small, 261 .quote-caption { 260 blockquote small { 262 261 font-size: 14px; 263 262 font-weight: normal; 264 263 text-transform: uppercase; … … 480 479 .featured-post:before, 481 480 .date a:before, 482 481 .entry-meta .author a:before, 483 .format-audio .entry- media:before,482 .format-audio .entry-content:before, 484 483 .comments-link a:before, 485 484 .tags-links a:first-child:before, 486 485 .categories-links a:first-child:before, … … 502 501 503 502 /* Clearing floats */ 504 503 .clear:after, 505 .entry-media:after,506 504 .attachment .entry-header:after, 507 505 .site-footer .widget-area:after, 508 506 .entry-content:after, … … 516 514 517 515 .clear:before, 518 516 .clear:after, 519 .entry-media:before,520 .entry-media:after,521 517 .attachment .entry-header:before, 522 518 .attachment .entry-header:after, 523 519 .site-footer .widget-area:before, … … 676 672 height: auto; 677 673 } 678 674 679 .entry-media img,680 675 img.size-full, 681 676 img.size-large, 682 677 img.wp-post-image { … … 1126 1121 } 1127 1122 1128 1123 .entry-content blockquote cite, 1129 .entry-content blockquote small, 1130 .entry-content .quote-caption { 1124 .entry-content blockquote small { 1131 1125 font-size: 16px; 1132 1126 } 1133 1127 … … 1365 1359 * ---------------------------------------------------------------------------- 1366 1360 */ 1367 1361 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 1385 1362 /* Aside */ 1386 1363 .format-aside { 1387 1364 background-color: #f7f5e7; … … 1424 1401 font-weight: bold; 1425 1402 } 1426 1403 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 { 1437 1405 content: "\f109"; 1438 1406 float: left; 1439 1407 font-size: 64px; … … 1682 1650 text-decoration: none; 1683 1651 } 1684 1652 1685 .format-quote .quote-caption,1686 1653 .format-quote blockquote small, 1687 1654 .format-quote blockquote cite { 1688 1655 display: block; 1689 1656 font-size: 16px; 1690 1657 } 1691 1658 1692 .format-quote .quote {1659 .format-quote blockquote { 1693 1660 font-style: italic; 1694 1661 font-weight: 300; 1695 1662 padding-left: 75px; 1696 1663 position: relative; 1697 1664 } 1698 1665 1699 .format-quote .quote:before {1666 .format-quote blockquote:before { 1700 1667 content: '\201C'; 1701 1668 font-size: 140px; 1702 1669 font-weight: 400; … … 2714 2681 } 2715 2682 2716 2683 @media (max-width: 1069px) { 2717 .sidebar .entry-media {2718 padding: 0 376px 0 60px;2719 }2720 2721 2684 .sidebar img.alignleft, 2722 2685 .sidebar .wp-caption.alignleft { 2723 2686 margin-left: 0; … … 2784 2747 .sidebar #respond #commentform, 2785 2748 .sidebar .featured-gallery, 2786 2749 .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 { 2790 2751 max-width: 604px; 2791 2752 padding-left: 0; 2792 2753 padding-right: 0; … … 2804 2765 max-width: 604px; 2805 2766 } 2806 2767 2807 .sidebar .entry-media {2808 max-width: 724px;2809 }2810 2811 .sidebar .entry-media,2812 2768 .sidebar .archive-meta, 2813 2769 .attachment .entry-header, 2814 2770 .search.sidebar .page-content, … … 2889 2845 margin-right: 0; 2890 2846 } 2891 2847 2892 .entry-media,2893 .sidebar .entry-media {2894 max-width: 604px;2895 }2896 2897 2848 .attachment .image-navigation, 2898 2849 .attachment .entry-attachment .attachment { 2899 2850 max-width: 604px; … … 2911 2862 font-size: 30px; 2912 2863 } 2913 2864 2914 #content .entry-media,2915 2865 #content .entry-header, 2916 2866 #content .entry-content, 2917 2867 #content .entry-summary, … … 3027 2977 } 3028 2978 3029 2979 .format-quote blockquote small, 3030 .format-quote blockquote cite, 3031 .format-quote .quote-caption { 2980 .format-quote blockquote cite { 3032 2981 font-size: 13px; 3033 2982 } 3034 2983 … … 3069 3018 } 3070 3019 3071 3020 /* Audio */ 3021 .format-audio .entry-content:before { 3022 display: none; 3023 } 3024 3072 3025 .format-audio .audio-content { 3073 3026 background-image: none; 3074 3027 float: none; 3075 3028 padding-left: 0; 3076 3029 width: auto; 3077 3030 } 3078 3079 .format-audio .entry-media:before {3080 display: none;3081 }3082 3031 } 3083 3032 3084 3033 /* Mobile devices */ -
wp-content/themes/twentythirteen/functions.php
436 436 * @return string The Link format URL. 437 437 */ 438 438 function 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 ); 440 440 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() ); 442 442 } 443 443 444 if ( ! 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 */ 452 function 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 } 456 endif; 457 444 458 /** 445 459 * Sets the image size in featured galleries to large. 446 460 * … … 498 512 * @return void 499 513 */ 500 514 function twentythirteen_content_width() { 501 if ( has_post_format( 'video' ) ||is_attachment() ) {515 if ( is_attachment() ) { 502 516 global $content_width; 503 517 $content_width = 724; 504 518 } 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; 521 522 } 522 523 return $atts;524 523 } 525 add_action( 'embed_defaults', 'twentythirteen_video_width' ); 526 add_action( 'shortcode_atts_video', 'twentythirteen_video_width' ); 524 add_action( 'template_redirect', 'twentythirteen_content_width' ); 527 525 528 526 /** 529 527 * Switches default core markup for search form to output valid HTML5.