Changeset 16628
- Timestamp:
- 11/30/2010 08:29:25 PM (15 years ago)
- Location:
- branches/3.0/wp-content/themes/twentyten
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.0/wp-content/themes/twentyten/attachment.php
r15787 r16628 13 13 <div id="content" role="main"> 14 14 15 <?php 16 /* Run the loop to output the attachment. 17 * If you want to overload this in a child theme then include a file 18 * called loop-attachment.php and that will be used instead. 19 */ 20 get_template_part( 'loop', 'attachment' ); 21 ?> 15 <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?> 16 17 <?php if ( ! empty( $post->post_parent ) ) : ?> 18 <p class="page-title"><a href="<?php echo get_permalink( $post->post_parent ); ?>" title="<?php esc_attr( printf( __( 'Return to %s', 'twentyten' ), get_the_title( $post->post_parent ) ) ); ?>" rel="gallery"><?php 19 /* translators: %s - title of parent post */ 20 printf( __( '<span class="meta-nav">←</span> %s', 'twentyten' ), get_the_title( $post->post_parent ) ); 21 ?></a></p> 22 <?php endif; ?> 23 24 <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 25 <h2 class="entry-title"><?php the_title(); ?></h2> 26 27 <div class="entry-meta"> 28 <?php 29 printf(__('<span class="%1$s">By</span> %2$s', 'twentyten'), 30 'meta-prep meta-prep-author', 31 sprintf( '<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s">%3$s</a></span>', 32 get_author_posts_url( get_the_author_meta( 'ID' ) ), 33 sprintf( esc_attr__( 'View all posts by %s', 'twentyten' ), get_the_author() ), 34 get_the_author() 35 ) 36 ); 37 ?> 38 <span class="meta-sep">|</span> 39 <?php 40 printf( __('<span class="%1$s">Published</span> %2$s', 'twentyten'), 41 'meta-prep meta-prep-entry-date', 42 sprintf( '<span class="entry-date"><abbr class="published" title="%1$s">%2$s</abbr></span>', 43 esc_attr( get_the_time() ), 44 get_the_date() 45 ) 46 ); 47 if ( wp_attachment_is_image() ) { 48 echo ' <span class="meta-sep">|</span> '; 49 $metadata = wp_get_attachment_metadata(); 50 printf( __( 'Full size is %s pixels', 'twentyten'), 51 sprintf( '<a href="%1$s" title="%2$s">%3$s × %4$s</a>', 52 wp_get_attachment_url(), 53 esc_attr( __('Link to full-size image', 'twentyten') ), 54 $metadata['width'], 55 $metadata['height'] 56 ) 57 ); 58 } 59 ?> 60 <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?> 61 </div><!-- .entry-meta --> 62 63 <div class="entry-content"> 64 <div class="entry-attachment"> 65 <?php if ( wp_attachment_is_image() ) : 66 $attachments = array_values( get_children( array( 'post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) ) ); 67 foreach ( $attachments as $k => $attachment ) { 68 if ( $attachment->ID == $post->ID ) 69 break; 70 } 71 $k++; 72 // If there is more than 1 image attachment in a gallery 73 if ( count( $attachments ) > 1 ) { 74 if ( isset( $attachments[ $k ] ) ) 75 // get the URL of the next image attachment 76 $next_attachment_url = get_attachment_link( $attachments[ $k ]->ID ); 77 else 78 // or get the URL of the first image attachment 79 $next_attachment_url = get_attachment_link( $attachments[ 0 ]->ID ); 80 } else { 81 // or, if there's only 1 image attachment, get the URL of the image 82 $next_attachment_url = wp_get_attachment_url(); 83 } 84 ?> 85 <p class="attachment"><a href="<?php echo $next_attachment_url; ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php 86 $attachment_size = apply_filters( 'twentyten_attachment_size', 900 ); 87 echo wp_get_attachment_image( $post->ID, array( $attachment_size, 9999 ) ); // filterable image width with, essentially, no limit for image height. 88 ?></a></p> 89 90 <div id="nav-below" class="navigation"> 91 <div class="nav-previous"><?php previous_image_link( false ); ?></div> 92 <div class="nav-next"><?php next_image_link( false ); ?></div> 93 </div><!-- #nav-below --> 94 <?php else : ?> 95 <a href="<?php echo wp_get_attachment_url(); ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php echo basename( get_permalink() ); ?></a> 96 <?php endif; ?> 97 </div><!-- .entry-attachment --> 98 <div class="entry-caption"><?php if ( !empty( $post->post_excerpt ) ) the_excerpt(); ?></div> 99 100 <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); ?> 101 <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?> 102 103 </div><!-- .entry-content --> 104 105 <div class="entry-utility"> 106 <?php twentyten_posted_in(); ?> 107 <?php edit_post_link( __( 'Edit', 'twentyten' ), ' <span class="edit-link">', '</span>' ); ?> 108 </div><!-- .entry-utility --> 109 </div><!-- #post-## --> 110 111 <?php comments_template(); ?> 112 113 <?php endwhile; ?> 22 114 23 115 </div><!-- #content --> -
branches/3.0/wp-content/themes/twentyten/editor-style.css
r15786 r16628 1 1 /* 2 2 Theme Name: Twenty Ten 3 Description: Used to style the TinyMCE editor. 3 */ 4 /* 5 Used to style the TinyMCE editor. 4 6 */ 5 7 html .mceContentBody { 6 max-width: 8 max-width:640px; 7 9 } 8 10 * { 11 font-family: Georgia, "Bitstream Charter", serif; 9 12 color: #444; 10 font-family: Georgia, "Bitstream Charter", serif;11 13 line-height: 1.5; 12 14 } … … 39 41 hr { 40 42 background-color: #e7e7e7; 41 border: 0; 42 clear: both; 43 border:0; 43 44 height: 1px; 44 45 margin-bottom: 18px; 46 clear:both; 45 47 } 46 48 /* Text elements */ … … 57 59 } 58 60 ol ol { 59 list-style: 61 list-style:upper-alpha; 60 62 } 61 63 ol ol ol { 62 list-style: 64 list-style:lower-roman; 63 65 } 64 66 ol ol ol ol { 65 list-style: 67 list-style:lower-alpha; 66 68 } 67 69 ul ul, … … 69 71 ul ol, 70 72 ol ul { 71 margin-bottom: 73 margin-bottom:0; 72 74 } 73 75 dl { 74 margin: 76 margin:0 0 24px 0; 75 77 } 76 78 dt { … … 81 83 } 82 84 strong { 85 font-weight: bold; 83 86 color: #000; 84 font-weight: bold;85 87 } 86 88 cite, 87 89 em, 88 90 i { 91 font-style: italic; 89 92 border: none; 90 font-style: italic;91 93 } 92 94 big { … … 94 96 } 95 97 ins { 96 background: #ff c;98 background: #ffffcc; 97 99 border: none; 98 100 color: #333; … … 128 130 sup, 129 131 sub { 130 font-size: 10px;131 132 height: 0; 132 133 line-height: 1; 134 vertical-align: baseline; 133 135 position: relative; 134 vertical-align: baseline;136 font-size: 10px; 135 137 } 136 138 sup { … … 141 143 } 142 144 a:link { 143 color: #06c;145 color:#0066cc; 144 146 } 145 147 a:visited { 146 color: 148 color:#743399; 147 149 } 148 150 a:active, … … 156 158 pre, 157 159 hr { 158 margin-bottom: 160 margin-bottom:24px; 159 161 } 160 162 ul ul, … … 162 164 ul ol, 163 165 ol ul { 164 margin-bottom: 166 margin-bottom:0; 165 167 } 166 168 pre, … … 187 189 h6 { 188 190 color: #000; 191 margin: 0 0 20px 0; 192 line-height: 1.5em; 189 193 font-weight: normal; 190 line-height: 1.5em;191 margin: 0 0 20px 0;192 194 } 193 195 h1 { … … 211 213 table { 212 214 border: 1px solid #e7e7e7 !important; 215 text-align: left; 216 margin: 0 -1px 24px 0; 217 width: 100%; 213 218 border-collapse: collapse; 214 219 border-spacing: 0; 215 margin: 0 -1px 24px 0;216 text-align: left;217 width: 100%;218 220 } 219 221 tr th, … … 231 233 padding: 6px 24px; 232 234 } 235 236 233 237 img { 234 238 margin: 0; 235 } 236 img.size-auto, 237 img.size-large, 238 img.size-full, 239 img.size-medium { 240 max-width: 100%; 241 height: auto; 239 max-width: 640px; 242 240 } 243 241 .alignleft, … … 268 266 } 269 267 .wp-caption { 268 border: none; 270 269 background: #f1f1f1; 271 border: none; 270 color: #888; 271 font-size: 12px; 272 line-height: 18px; 273 text-align: center; 274 margin-bottom: 20px; 275 padding: 4px; 276 -moz-border-radius: 0; 272 277 -khtml-border-radius: 0; 273 -moz-border-radius: 0;274 278 -webkit-border-radius: 0; 275 279 border-radius: 0; 276 color: #888;277 font-size: 12px;278 line-height: 18px;279 margin-bottom: 20px;280 max-width: 632px !important; /* prevent too-wide images from breaking layout */281 padding: 4px;282 text-align: center;283 280 } 284 281 .wp-caption img { … … 289 286 } 290 287 .wp-smiley { 291 margin: 292 } 288 margin:0; 289 } -
branches/3.0/wp-content/themes/twentyten/header.php
r15783 r16628 74 74 // Houston, we have a new header image! 75 75 echo get_the_post_thumbnail( $post->ID, 'post-thumbnail' ); 76 else if ( get_header_image() ): ?>76 else : ?> 77 77 <img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="" /> 78 78 <?php endif; ?> -
branches/3.0/wp-content/themes/twentyten/onecolumn-page.php
r15787 r16628 18 18 <div id="content" role="main"> 19 19 20 <?php 21 /* Run the loop to output the page. 22 * If you want to overload this in a child theme then include a file 23 * called loop-page.php and that will be used instead. 24 */ 25 get_template_part( 'loop', 'page' ); 26 ?> 20 <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?> 21 22 <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 23 <h1 class="entry-title"><?php the_title(); ?></h1> 24 <div class="entry-content"> 25 <?php the_content(); ?> 26 <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?> 27 <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="edit-link">', '</span>' ); ?> 28 </div><!-- .entry-content --> 29 </div><!-- #post-## --> 30 31 <?php comments_template( '', true ); ?> 32 33 <?php endwhile; ?> 27 34 28 35 </div><!-- #content --> -
branches/3.0/wp-content/themes/twentyten/page.php
r15787 r16628 18 18 <div id="content" role="main"> 19 19 20 <?php 21 /* Run the loop to output the page. 22 * If you want to overload this in a child theme then include a file 23 * called loop-page.php and that will be used instead. 24 */ 25 get_template_part( 'loop', 'page' ); 26 ?> 20 <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?> 21 22 <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 23 <?php if ( is_front_page() ) { ?> 24 <h2 class="entry-title"><?php the_title(); ?></h2> 25 <?php } else { ?> 26 <h1 class="entry-title"><?php the_title(); ?></h1> 27 <?php } ?> 28 29 <div class="entry-content"> 30 <?php the_content(); ?> 31 <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?> 32 <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="edit-link">', '</span>' ); ?> 33 </div><!-- .entry-content --> 34 </div><!-- #post-## --> 35 36 <?php comments_template( '', true ); ?> 37 38 <?php endwhile; ?> 27 39 28 40 </div><!-- #content --> -
branches/3.0/wp-content/themes/twentyten/rtl.css
r15784 r16628 121 121 font-style: normal; 122 122 } 123 #branding img {124 float: right;125 }126 123 127 124 /* =Menu -
branches/3.0/wp-content/themes/twentyten/single.php
r15787 r16628 13 13 <div id="content" role="main"> 14 14 15 <?php 16 /* Run the loop to output the post. 17 * If you want to overload this in a child theme then include a file 18 * called loop-single.php and that will be used instead. 19 */ 20 get_template_part( 'loop', 'single' ); 21 ?> 15 <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?> 16 17 <div id="nav-above" class="navigation"> 18 <div class="nav-previous"><?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '←', 'Previous post link', 'twentyten' ) . '</span> %title' ); ?></div> 19 <div class="nav-next"><?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '→', 'Next post link', 'twentyten' ) . '</span>' ); ?></div> 20 </div><!-- #nav-above --> 21 22 <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 23 <h1 class="entry-title"><?php the_title(); ?></h1> 24 25 <div class="entry-meta"> 26 <?php twentyten_posted_on(); ?> 27 </div><!-- .entry-meta --> 28 29 <div class="entry-content"> 30 <?php the_content(); ?> 31 <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?> 32 </div><!-- .entry-content --> 33 34 <?php if ( get_the_author_meta( 'description' ) ) : // If a user has filled out their description, show a bio on their entries ?> 35 <div id="entry-author-info"> 36 <div id="author-avatar"> 37 <?php echo get_avatar( get_the_author_meta( 'user_email' ), apply_filters( 'twentyten_author_bio_avatar_size', 60 ) ); ?> 38 </div><!-- #author-avatar --> 39 <div id="author-description"> 40 <h2><?php printf( esc_attr__( 'About %s', 'twentyten' ), get_the_author() ); ?></h2> 41 <?php the_author_meta( 'description' ); ?> 42 <div id="author-link"> 43 <a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>"> 44 <?php printf( __( 'View all posts by %s <span class="meta-nav">→</span>', 'twentyten' ), get_the_author() ); ?> 45 </a> 46 </div><!-- #author-link --> 47 </div><!-- #author-description --> 48 </div><!-- #entry-author-info --> 49 <?php endif; ?> 50 51 <div class="entry-utility"> 52 <?php twentyten_posted_in(); ?> 53 <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="edit-link">', '</span>' ); ?> 54 </div><!-- .entry-utility --> 55 </div><!-- #post-## --> 56 57 <div id="nav-below" class="navigation"> 58 <div class="nav-previous"><?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '←', 'Previous post link', 'twentyten' ) . '</span> %title' ); ?></div> 59 <div class="nav-next"><?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '→', 'Next post link', 'twentyten' ) . '</span>' ); ?></div> 60 </div><!-- #nav-below --> 61 62 <?php comments_template( '', true ); ?> 63 64 <?php endwhile; // end of the loop. ?> 22 65 23 66 </div><!-- #content --> -
branches/3.0/wp-content/themes/twentyten/style.css
r16217 r16628 4 4 Description: The 2010 theme for WordPress is stylish, customizable, simple, and readable -- make it yours with a custom menu, header image, and background. Twenty Ten supports six widgetized areas (two in the sidebar, four in the footer) and featured images (thumbnails for gallery posts and custom header images for posts and pages). It includes stylesheets for print and the admin Visual Editor, special styles for posts in the "Asides" and "Gallery" categories, and has an optional one-column page template that removes the sidebar. 5 5 Author: the WordPress team 6 Version: 1. 2-RC17 Tags: black, blue, white, two-columns, fixed-width, custom-header, custom-background, threaded-comments, sticky-post, translation-ready, microformats, rtl-language-support, editor-style , custom-menu6 Version: 1.1 7 Tags: black, blue, white, two-columns, fixed-width, custom-header, custom-background, threaded-comments, sticky-post, translation-ready, microformats, rtl-language-support, editor-style 8 8 */ 9 9 … … 140 140 .reply, 141 141 .widget-title, 142 .wp-caption-text { 143 font-family: "Helvetica Neue", Arial, Helvetica, "Nimbus Sans L", sans-serif; 144 } 142 .wp-caption-text, 145 143 input[type=submit] { 146 144 font-family: "Helvetica Neue", Arial, Helvetica, "Nimbus Sans L", sans-serif; … … 353 351 float: right; 354 352 font-style: italic; 355 margin: 1 5px 0 18px 0;353 margin: 14px 0 18px 0; 356 354 width: 220px; 357 355 } … … 361 359 border-top: 4px solid #000; 362 360 border-bottom: 1px solid #000; 361 clear: both; 363 362 display: block; 364 float: left;365 363 } 366 364 … … 762 760 -------------------------------------------------------------- */ 763 761 764 /* 765 Resize images to fit the main content area. 766 - Applies only to images uploaded via WordPress by targeting size-* classes. 767 - Other images will be left alone. Use "size-auto" class to apply to other images. 768 */ 769 img.size-auto, 770 img.size-full, 771 img.size-large, 772 img.size-medium, 773 .attachment img { 774 max-width: 100%; /* When images are too wide for containing element, force them to fit. */ 775 height: auto; /* Override height to match resized width for correct aspect ratio. */ 776 } 777 .alignleft, 778 img.alignleft { 762 #content img { 763 margin: 0; 764 height: auto; 765 max-width: 640px; 766 width: auto; 767 } 768 #content .attachment img { 769 max-width: 900px; 770 } 771 #content .alignleft, 772 #content img.alignleft { 779 773 display: inline; 780 774 float: left; … … 782 776 margin-top: 4px; 783 777 } 784 .alignright,785 img.alignright {778 #content .alignright, 779 #content img.alignright { 786 780 display: inline; 787 781 float: right; … … 789 783 margin-top: 4px; 790 784 } 791 .aligncenter,792 img.aligncenter {785 #content .aligncenter, 786 #content img.aligncenter { 793 787 clear: both; 794 788 display: block; … … 796 790 margin-right: auto; 797 791 } 798 img.alignleft,799 img.alignright,800 img.aligncenter {792 #content img.alignleft, 793 #content img.alignright, 794 #content img.aligncenter { 801 795 margin-bottom: 12px; 802 796 } 803 .wp-caption {797 #content .wp-caption { 804 798 background: #f1f1f1; 805 799 line-height: 18px; 806 800 margin-bottom: 20px; 807 max-width: 632px !important; /* prevent too-wide images from breaking layout */808 801 padding: 4px; 809 802 text-align: center; 810 803 } 811 .wp-caption img {804 #content .wp-caption img { 812 805 margin: 5px 5px 0; 813 806 } 814 .wp-caption p.wp-caption-text {807 #content .wp-caption p.wp-caption-text { 815 808 color: #888; 816 809 font-size: 12px; 817 810 margin: 5px; 818 811 } 819 .wp-smiley {812 #content .wp-smiley { 820 813 margin: 0; 821 814 } 822 .gallery {815 #content .gallery { 823 816 margin: 0 auto 18px; 824 817 } 825 .gallery .gallery-item {818 #content .gallery .gallery-item { 826 819 float: left; 827 820 margin-top: 0; … … 829 822 width: 33%; 830 823 } 831 .gallery img {824 #content .gallery img { 832 825 border: 2px solid #cfcfcf; 833 826 } 834 .gallery .gallery-caption {827 #content .gallery .gallery-caption { 835 828 color: #888; 836 829 font-size: 12px; 837 830 margin: 0 0 12px; 838 831 } 839 .gallery dl {832 #content .gallery dl { 840 833 margin: 0; 841 834 } 842 .gallery img {835 #content .gallery img { 843 836 border: 10px solid #f1f1f1; 844 837 } 845 .gallery br+br {838 #content .gallery br+br { 846 839 display: none; 847 840 } 848 #content .attachment img { /* single attachment images should be centered */841 #content .attachment img { /* single attachment images should be centered */ 849 842 display: block; 850 843 margin: 0 auto; … … 1094 1087 list-style: square; 1095 1088 margin-left: 1.3em; 1096 }1097 .widget-area select {1098 max-width: 100%;1099 1089 } 1100 1090 .widget_search #s {/* This keeps the search inputs in line */
Note: See TracChangeset
for help on using the changeset viewer.