Ticket #12695: twentytendoc.3.diff
File twentytendoc.3.diff, 15.8 KB (added by , 14 years ago) |
---|
-
wp-content/themes/twentyten/searchform.php
1 <?php 2 /** 3 * The Search Form 4 * 5 * Displays the search form when the get_search_form() 6 * template tag is used. 7 * 8 * @package twenty-ten 9 */ 10 ?> 1 11 <form id="searchform" name="searchform" method="get" action="<?php echo home_url(); ?>"> 2 12 <div> 3 13 <label for="s"><?php _e( 'Search', 'twentyten' ); ?></label> -
wp-content/themes/twentyten/footer.php
1 <?php 2 /** 3 * The template used to display the footer 4 * 5 * Contains the closing of the id=main div and all content 6 * after. Calls sidebar-footer.php for bottom widgets 7 * 8 * @package twenty-ten 9 */ 10 ?> 1 11 </div><!-- #main --> 2 12 3 13 <div id="footer"> -
wp-content/themes/twentyten/author.php
1 <?php 2 /** 3 * The template used to display Author Archive pages 4 * 5 * @package twenty-ten 6 */ 7 ?> 1 8 <?php get_header(); ?> 2 9 3 10 <div id="container"> -
wp-content/themes/twentyten/search.php
1 <?php 2 /** 3 * The Search Results template 4 * 5 * @package twenty-ten 6 */ 7 ?> 1 8 <?php get_header(); ?> 2 9 3 10 <div id="container"> -
wp-content/themes/twentyten/sidebar-footer.php
1 1 <?php 2 /** 3 * The Footer widget areas 4 * 5 * @package twenty-ten 6 */ 7 ?> 8 <?php 2 9 if ( 3 10 is_active_sidebar( 'first-footer-widget-area' ) || 4 11 is_active_sidebar( 'second-footer-widget-area' ) || -
wp-content/themes/twentyten/404.php
1 <?php 2 /** 3 * The template for displaying a 404 page not found error 4 * 5 * @package twenty-ten 6 */ 7 ?> 1 8 <?php get_header(); ?> 2 9 3 10 <div id="container"> -
wp-content/themes/twentyten/functions.php
1 1 <?php 2 /** 3 * TwentyTen functions and definitions 4 * 5 * Sets up the theme and provides some helper functions used 6 * in other parts of the theme. All functions are pluggable 7 * 8 * @package twenty-ten 9 */ 2 10 3 // Set the content width based on the Theme CSS 11 // Set the content width based on the Theme CSS. Can be overriden 4 12 if ( ! isset( $content_width ) ) 5 13 $content_width = 640; 6 14 15 16 /** 17 * Set up defaults for our theme. 18 * 19 * Sets up theme defaults and tells wordpress that this is a 20 * theme that will take advantage of Post Thumbnails, Custom 21 * Background, Nav Menus and automatic feed links. To 22 * override any of the settings in a child theme, create your 23 * own twentyten_init function 24 * 25 * @uses add_theme_support() 26 * 27 * @since 0.7 28 * 29 * 30 */ 31 7 32 if ( ! function_exists( 'twentyten_init' ) ) : 8 33 function twentyten_init() { 9 34 // Your Changeable header business starts here … … 90 115 endif; 91 116 add_action( 'after_setup_theme', 'twentyten_init' ); 92 117 118 /** 119 * Callback to style the header image inside the admin 120 * 121 * 122 */ 123 93 124 if ( ! function_exists( 'twentyten_admin_header_style' ) ) : 94 125 function twentyten_admin_header_style() { 95 126 ?> … … 106 137 } 107 138 endif; 108 139 109 // Get the page number 140 141 /** 142 * Returns the page number currently being browsed 143 * 144 * Returns a vertical bar followed by page and the page 145 * number. Is pluggable 146 * 147 * @since 0.7 148 * @retun string 149 */ 150 151 110 152 if ( ! function_exists( 'twentyten_get_page_number' ) ) : 111 153 function twentyten_get_page_number() { 112 154 if ( get_query_var( 'paged' ) ) … … 114 156 } 115 157 endif; 116 158 117 // Echo the page number 159 /** 160 * Echos the page number being browsed 161 * 162 * @since 0.7 163 * @uses twentyten_get_page_number 164 * 165 */ 166 118 167 if ( ! function_exists( 'twentyten_the_page_number' ) ) : 119 168 function twentyten_the_page_number() { 120 169 echo twentyten_get_page_number(); 121 170 } 122 171 endif; 123 172 124 // Control excerpt length 173 /** 174 * Sets the excerpt length to 40 charachters. Is pluggable 175 * 176 * @since 0.7 177 * @return int 178 */ 179 125 180 if ( ! function_exists( 'twentyten_excerpt_length' ) ) : 126 181 function twentyten_excerpt_length( $length ) { 127 182 return 40; … … 130 185 add_filter( 'excerpt_length', 'twentyten_excerpt_length' ); 131 186 132 187 133 // Make a nice read more link on excerpts 188 /** 189 * Sets the read more link for excerpts to something pretty 190 * 191 * @since 0.7 192 * @return string 193 * 194 */ 134 195 if ( ! function_exists( 'twentyten_excerpt_more' ) ) : 135 196 function twentyten_excerpt_more( $more ) { 136 197 return ' … <a href="'. get_permalink() . '">' . __('Continue reading <span class="meta-nav">→</span>', 'twentyten') . '</a>'; … … 139 200 add_filter( 'excerpt_more', 'twentyten_excerpt_more' ); 140 201 141 202 142 // Template for comments and pingbacks 203 /** 204 * Template for comments and pingbacks 205 * 206 * Used as a callback by wp_list_comments for displaying the 207 * comments. Is pluggable 208 * 209 * @since 0.7 210 */ 143 211 if ( ! function_exists( 'twentyten_comment' ) ) : 144 212 function twentyten_comment( $comment, $args, $depth ) { 145 213 $GLOBALS ['comment'] = $comment; ?> … … 171 239 } 172 240 endif; 173 241 174 // Remove inline styles on gallery shortcode 242 /** 243 * Remove inline styles on gallery shortcode 244 * 245 * @since 0.7 246 * @return string 247 */ 175 248 if ( ! function_exists( 'twentyten_remove_gallery_css' ) ) : 176 249 function twentyten_remove_gallery_css( $css ) { 177 250 return preg_replace( "#<style type='text/css'>(.*?)</style>#s", '', $css ); … … 179 252 endif; 180 253 add_filter( 'gallery_style', 'twentyten_remove_gallery_css' ); 181 254 255 /** 256 * Returns the list of catagories 257 * 258 * Returns the list of catagories based on if we are or are 259 * not browsing a catagory archive page. 260 * 261 * @uses twentyten_term_list 262 * 263 * @since 0.7 264 * @return string 265 */ 266 182 267 if ( ! function_exists( 'twentyten_cat_list' ) ) : 183 268 function twentyten_cat_list() { 184 269 return twentyten_term_list( 'category', ', ', __( 'Posted in %s', 'twentyten' ), __( 'Also posted in %s', 'twentyten' ) ); 185 270 } 186 271 endif; 187 272 273 /** 274 * Returns the list of tags 275 * 276 * Returns the list of tags based on if we are or are not 277 * browsing a tag archive page 278 * 279 * @uses twentyten_term_list 280 * 281 * @since 0.7 282 * @return string 283 */ 188 284 if ( ! function_exists( 'twentyten_tag_list' ) ) : 189 285 function twentyten_tag_list() { 190 286 return twentyten_term_list( 'post_tag', ', ', __( 'Tagged %s', 'twentyten' ), __( 'Also tagged %s', 'twentyten' ) ); 191 287 } 192 288 endif; 193 289 290 /** 291 * Returns the list of taxonomy items in multiple ways 292 * 293 * Returns the list of taxonomy items differently based on 294 * if we are browsing a term archive page or a different 295 * type of page. If browsing a term archive page and the 296 * post has no other taxonomied terms, it returns empty 297 * 298 * @since 0.7 299 * @return string 300 */ 194 301 if ( ! function_exists( 'twentyten_term_list' ) ) : 195 302 function twentyten_term_list( $taxonomy, $glue = ', ', $text = '', $also_text = '' ) { 196 303 global $wp_query, $post; … … 219 326 } 220 327 endif; 221 328 222 // Register widgetized areas 329 /** 330 * Register widgetized areas 331 * 332 * @since 0.7 333 * @uses register_sidebar 334 */ 223 335 if ( ! function_exists( 'twentyten_widgets_init' ) ) : 224 336 function twentyten_widgets_init() { 225 337 // Area 1 -
wp-content/themes/twentyten/sidebar.php
1 <?php 2 /** 3 * The Sidebar containing the primary and secondary widget areas 4 * 5 * @package twenty-ten 6 */ 7 ?> 1 8 <div id="primary" class="widget-area"> 2 9 <ul class="xoxo"> 3 10 <?php if ( ! dynamic_sidebar( 'primary-widget-area' ) ) : // begin primary widget area ?> -
wp-content/themes/twentyten/onecolumn-page.php
1 2 1 <?php 2 /** 3 * A custom page template that doesn't use the sidebar 4 * 5 * A single column page template that can be selected from 6 * the dropdown menu on the edit page screen. 7 * 8 * @package twenty-ten 9 */ 10 ?> 11 <?php 3 12 /* 4 13 Template Name: One column, no sidebar 5 14 Description: A template with no sidebar -
wp-content/themes/twentyten/loop.php
1 <?php 2 /** 3 * The loop that displays posts 4 * 5 * The loop displays the posts and the post content. See 6 * http://codex.wordpress.org/The_Loop to understand it and 7 * http://codex.wordpress.org/Template_Tags to understand 8 * the tags used in it. 9 * 10 * @package twenty-ten 11 */ 12 ?> 13 <?php /* Display navigation to next/previous pages when applicable */ ?> 1 14 <?php if ( $wp_query->max_num_pages > 1 ) : ?> 2 15 <div id="nav-above" class="navigation"> 3 16 <div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">←</span> Older posts', 'twentyten' ) ); ?></div> … … 5 18 </div><!-- #nav-above --> 6 19 <?php endif; ?> 7 20 21 <?php /* If there are no posts to display, such as an empty archive page */ ?> 8 22 <?php if ( ! have_posts() ) : ?> 9 23 <div id="post-0" class="post error404 not-found"> 10 24 <h1 class="entry-title"><?php _e( 'Not Found', 'twentyten' ); ?></h1> … … 15 29 </div><!-- #post-0 --> 16 30 <?php endif; ?> 17 31 32 <?php /* Start the Loop */ ?> 18 33 <?php while ( have_posts() ) : the_post(); ?> 34 35 <?php /* How to Display posts in the Gallery Category */ ?> 19 36 <?php if ( in_category( 'Gallery' ) ) : ?> 20 37 <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 21 38 <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2> … … 62 79 </div><!-- #entry-utility --> 63 80 </div> 64 81 65 82 <?php /* How to display posts in the asides category */ ?> 66 83 <?php elseif ( in_category( 'asides' ) ) : ?> 67 84 <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 68 85 <?php if ( is_archive() || is_search() ) : //Only display Excerpts for archives & search ?> … … 92 109 </div><!-- #entry-utility --> 93 110 </div><!-- #post-<?php the_ID(); ?> --> 94 111 95 112 <?php /* How to display all other posts */ ?> 96 113 <?php else : ?> 97 114 <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 98 115 <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2> … … 139 156 <?php endif; // if different categories queried ?> 140 157 <?php endwhile; ?> 141 158 159 <?php /* Display navigation to next/previous pages when applicable */ ?> 142 160 <?php if ( $wp_query->max_num_pages > 1 ) : ?> 143 161 <div id="nav-below" class="navigation"> 144 162 <div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">←</span> Older posts', 'twentyten' ) ); ?></div> -
wp-content/themes/twentyten/tag.php
1 <?php 2 /** 3 * The template used to display Tag Archive pages 4 * 5 * @package twenty-ten 6 */ 7 ?> 1 8 <?php get_header(); ?> 2 9 3 10 <div id="container"> -
wp-content/themes/twentyten/page.php
1 <?php 2 /** 3 * The template used to display all pages 4 * 5 * This is the template that displays all pages by default. 6 * Please note that this is the wordpress construct of pages 7 * and that other 'pages' on your wordpress site will use a 8 * different template. 9 * 10 * @package twenty-ten 11 */ 12 ?> 1 13 <?php get_header(); ?> 2 14 3 15 <div id="container"> -
wp-content/themes/twentyten/category.php
1 <?php 2 /** 3 * The template used to display Catagory Archive pages 4 * 5 * @package twenty-ten 6 */ 7 ?> 1 8 <?php get_header(); ?> 2 9 3 10 <div id="container"> -
wp-content/themes/twentyten/archive.php
1 <?php 2 /** 3 * The template used in all date based archive pages 4 * 5 * @package twenty-ten 6 */ 7 ?> 1 8 <?php get_header(); ?> 2 9 3 10 <div id="container"> -
wp-content/themes/twentyten/single.php
1 <?php 2 /** 3 * The Template used to display all single posts 4 * 5 * @package twenty-ten 6 */ 7 ?> 1 8 <?php get_header(); ?> 2 9 3 10 <div id="container"> -
wp-content/themes/twentyten/comments.php
1 <?php 2 /** 3 * The template used to display Comments 4 * 5 * The area of the page that contains both current comments 6 * and the comment form. The actual display of comments is 7 * handled by a callback to twentyten_comment which is 8 * located in the functions.php file 9 * 10 * @package twenty-ten 11 */ 12 ?> 1 13 <div id="comments"> 2 14 <?php if ( post_password_required() ) : ?> 3 15 <div class="nopassword"><?php _e( 'This post is password protected. Enter the password to view any comments.', 'twentyten' ); ?></div> -
wp-content/themes/twentyten/header.php
1 <?php 2 /** 3 * The Header for our theme. 4 * 5 * Displays all of the <head> section and everything up till <div id="main"> 6 * 7 * @package twenty-ten 8 */ 9 ?> 1 10 <!DOCTYPE html> 2 11 <html <?php language_attributes(); ?>> 3 12 <head> … … 3 12 <meta charset="<?php bloginfo( 'charset' ); ?>" /> 4 13 <title><?php 14 // Returns the title based on the type of page being viewed 5 15 if ( is_single() ) { 6 16 single_post_title(); echo ' | '; bloginfo( 'name' ); -
wp-content/themes/twentyten/attachment.php
1 <?php 2 /** 3 * The template used to display Attachment type pages 4 * 5 * @package twenty-ten 6 */ 7 ?> 1 8 <?php get_header(); ?> 2 9 3 10 <div id="container">