Changeset 13112
- Timestamp:
- 02/13/2010 01:35:03 PM (15 years ago)
- Location:
- trunk/wp-content/themes/twentyten
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-content/themes/twentyten/functions.php
r13041 r13112 47 47 require_once($locale_file); 48 48 49 50 51 49 // Get the page number 52 50 function get_page_number() { 53 51 if ( get_query_var('paged') ) 54 print ' | ' . __( 'Page ' , 'twentyten') . get_query_var('paged'); 55 } // end get_page_number 56 57 52 echo ' | ' . __( 'Page ' , 'twentyten') . get_query_var('paged'); 53 } 58 54 59 55 // Control excerpt length … … 64 60 65 61 66 67 62 // Make a nice read more link on excerpts 68 63 function new_excerpt_more($more) { … … 70 65 } 71 66 add_filter('excerpt_more', 'new_excerpt_more'); 72 73 67 74 68 … … 80 74 <div id="comment-<?php comment_ID(); ?>"> 81 75 <div class="comment-author vcard"> 82 <?php echo get_avatar($comment, $size='40'); ?>76 <?php echo get_avatar($comment, 40); ?> 83 77 84 78 <?php printf(__('<cite class="fn">%s</cite> <span class="says">says:</span>'), get_comment_author_link()) ?> … … 89 83 <?php endif; ?> 90 84 91 <div class="comment-meta commentmetadata"><a href="<?php echo htmlspecialchars( get_comment_link( $comment->comment_ID ) ) ?>"><?php printf(__('%1$s at %2$s'), get_comment_date(), get_comment_time()) ?></a><?php edit_comment_link(__('(Edit)'),' ','') ?></div>85 <div class="comment-meta commentmetadata"><a href="<?php echo esc_url( get_comment_link( $comment->comment_ID ) ) ?>"><?php printf(__('%1$s at %2$s'), get_comment_date(), get_comment_time()) ?></a><?php edit_comment_link(__('(Edit)'),' ','') ?></div> 92 86 93 87 <div class="comment-body"><?php comment_text() ?></div> … … 104 98 } 105 99 106 107 108 100 // Make the Visual Editor styles match the theme's styles 109 add_filter('mce_css', 'my_editor_style'); 110 function my_editor_style($url) { 111 112 if ( !empty($url) ) 113 $url .= ','; 101 function my_editor_style($url) { 102 if ( !empty($url) ) 103 $url .= ','; 114 104 115 105 // Change the path here if using sub-directory … … 118 108 return $url; 119 109 } 120 121 110 add_filter('mce_css', 'my_editor_style'); 122 111 123 112 // Remove inline styles on gallery shortcode 124 125 113 function remove_gallery_css() { 126 114 return "<div class='gallery'>"; 127 115 } 128 116 add_filter('gallery_style', 'remove_gallery_css'); 129 130 131 117 132 118 // For category lists on category archives: Returns other categories except the current one (redundant) … … 147 133 } // end cats_meow 148 134 149 150 151 135 // For tag lists on tag archives: Returns other tags except the current one (redundant) 152 136 function tag_ur_it($glue) { … … 166 150 } // end tag_ur_it 167 151 168 169 152 // Register widgetized areas 170 153 function theme_widgets_init() { … … 237 220 } // end theme_widgets_init 238 221 239 240 241 222 // Add all the groovy widget areas 242 223 add_action( 'init', 'theme_widgets_init' ); -
trunk/wp-content/themes/twentyten/header.php
r13105 r13112 3 3 <head> 4 4 <title><?php 5 if ( is_single() ) { single_post_title(); print ' | '; bloginfo('name'); } 6 elseif ( is_home() || is_front_page() ) { bloginfo('name'); print ' | '; bloginfo('description'); get_page_number(); } 7 elseif ( is_page() ) { single_post_title(''); print ' | '; bloginfo('name'); } 8 elseif ( is_search() ) { print 'Search results for ' . esc_html($s); get_page_number(); print ' | '; bloginfo('name'); } 9 elseif ( is_404() ) { print 'Not Found | '; bloginfo('name'); } 10 else { bloginfo('name'); wp_title('|'); get_page_number(); } 5 if ( is_single() ) { 6 single_post_title(); echo ' | '; bloginfo('name'); 7 } elseif ( is_home() || is_front_page() ) { 8 bloginfo('name'); echo ' | '; bloginfo('description'); get_page_number(); 9 } elseif ( is_page() ) { 10 single_post_title(''); echo ' | '; bloginfo('name'); 11 } elseif ( is_search() ) { 12 printf(__('Search results for "%s"', 'twentyten'), esc_html($s)); get_page_number(); echo ' | '; bloginfo('name'); 13 } elseif ( is_404() ) { 14 _e('Not Found', 'twentyten'); echo ' | '; bloginfo('name'); 15 } else { 16 wp_title(''); echo ' | '; bloginfo('name'); get_page_number(); 17 } 11 18 ?></title> 12 19
Note: See TracChangeset
for help on using the changeset viewer.