Ticket #12695: twentytendoc.4.diff
File twentytendoc.4.diff, 19.0 KB (added by , 15 years ago) |
---|
-
wp-content/themes/twentyten/searchform.php
1 <?php 2 /** 3 * The Search Form 4 * 5 * Optional file that allows displaying a custom search form 6 * when the get_search_form() template tag is used. 7 * 8 * @since 0.7.0 9 * @package WordPress 10 * @subpackage 2010 11 */ 12 ?> 13 1 14 <form id="searchform" name="searchform" method="get" action="<?php echo home_url(); ?>"> 2 15 <div> 3 16 <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 * @since 0.7.0 9 * @package WordPress 10 * @subpackage 2010 11 */ 12 ?> 13 1 14 </div><!-- #main --> 2 15 3 16 <div id="footer"> -
wp-content/themes/twentyten/author.php
1 <?php 2 /** 3 * The template used to display Author Archive pages 4 * 5 * @since 0.7.0 6 * @package WordPress 7 * @subpackage 2010 8 */ 9 ?> 10 1 11 <?php get_header(); ?> 2 12 3 13 <div id="container"> -
wp-content/themes/twentyten/search.php
1 <?php 2 /** 3 * The Search Results template 4 * 5 * @since 0.7.0 6 * @package WordPress 7 * @subpackage 2010 8 */ 9 ?> 10 1 11 <?php get_header(); ?> 2 12 3 13 <div id="container"> -
wp-content/themes/twentyten/sidebar-footer.php
1 1 <?php 2 /** 3 * The Footer widget areas 4 * 5 * @since 0.7.0 6 * @package WordPress 7 * @subpackage 2010 8 */ 9 ?> 10 11 <?php 2 12 if ( 3 13 is_active_sidebar( 'first-footer-widget-area' ) || 4 14 is_active_sidebar( 'second-footer-widget-area' ) || -
wp-content/themes/twentyten/index.php
1 <?php 2 3 /** 4 * The main template file 5 * 6 * This is the most generic template file in a WordPress theme 7 * and one of the two required files for a theme (the other being style.css). 8 * It is used to display a page when nothing more specific matches a query. 9 * E.g., it puts together the home page when no home.php file exists. 10 * Learn more: http://codex.wordpress.org/Template_Hierarchy 11 * 12 * @since 0.7.0 13 * @package WordPress 14 * @subpackage 2010 15 */ 16 17 ?> 18 1 19 <?php get_header(); ?> 2 20 3 21 <div id="container"> -
wp-content/themes/twentyten/404.php
1 <?php 2 /** 3 * The template for displaying 404 pages (Not Found) 4 * 5 * @since 0.7.0 6 * @package WordPress 7 * @subpackage 2010 8 */ 9 ?> 10 1 11 <?php get_header(); ?> 2 12 3 13 <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 * @since 0.7.0 9 * @package WordPress 10 * @subpackage 2010 11 */ 2 12 3 // Set the content width based on the Theme CSS 13 /** 14 * Set the content width based on the Theme CSS. Can be overriden 15 * 16 * Used in attachment.php to set the width of images. Should 17 * be equal to the width set for .onecolumn #content in style.css 18 * 19 * 20 */ 4 21 if ( ! isset( $content_width ) ) 5 22 $content_width = 640; 6 23 24 25 /** 26 * Set up defaults for our theme. 27 * 28 * Sets up theme defaults and tells wordpress that this is a 29 * theme that will take advantage of Post Thumbnails, Custom 30 * Background, Nav Menus and automatic feed links. To 31 * override any of the settings in a child theme, create your 32 * own twentyten_init function 33 * 34 * @uses add_theme_support() 35 * 36 * @since 0.7.0 37 * 38 * 39 */ 40 7 41 if ( ! function_exists( 'twentyten_init' ) ) : 8 42 function twentyten_init() { 9 43 // Your Changeable header business starts here 10 44 // No CSS, just IMG call 11 45 define( 'HEADER_TEXTCOLOR', '' ); 12 46 define( 'HEADER_IMAGE', '%s/images/headers/forestfloor.jpg' ); // %s is theme dir uri 47 48 // Add a filter to twentyten_header_image_width and twentyten_header_image_height to change these values 13 49 define( 'HEADER_IMAGE_WIDTH', apply_filters( 'twentyten_header_image_width', 940 ) ); 14 50 define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'twentyten_header_image_height', 198 ) ); 51 15 52 define( 'NO_HEADER_TEXT', true ); 16 53 17 54 add_custom_image_header( '', 'twentyten_admin_header_style' ); 18 55 // and thus ends the changeable header business 19 56 57 // Default custom headers. %s is a placeholder for the theme template directory 58 20 59 register_default_headers( array ( 21 60 'berries' => array ( 22 61 'url' => '%s/images/headers/berries.jpg', … … 60 99 ) 61 100 ) ); 62 101 102 // This theme allows users to set a custom background 63 103 add_custom_background(); 64 104 65 105 // This theme styles the visual editor with editor-style.css to match the theme style. … … 90 130 endif; 91 131 add_action( 'after_setup_theme', 'twentyten_init' ); 92 132 133 /** 134 * Callback to style the header image inside the admin 135 * 136 * 137 */ 138 93 139 if ( ! function_exists( 'twentyten_admin_header_style' ) ) : 94 140 function twentyten_admin_header_style() { 95 141 ?> … … 106 152 } 107 153 endif; 108 154 109 // Get the page number 155 156 /** 157 * Returns the page number currently being browsed 158 * 159 * Returns a vertical bar followed by page and the page 160 * number. Is pluggable 161 * 162 * @since 0.7.0 163 * @retun string 164 */ 165 166 110 167 if ( ! function_exists( 'twentyten_get_page_number' ) ) : 111 168 function twentyten_get_page_number() { 112 169 if ( get_query_var( 'paged' ) ) … … 114 171 } 115 172 endif; 116 173 117 // Echo the page number 174 /** 175 * Echos the page number being browsed 176 * 177 * @since 0.7.0 178 * @uses twentyten_get_page_number 179 * 180 */ 181 118 182 if ( ! function_exists( 'twentyten_the_page_number' ) ) : 119 183 function twentyten_the_page_number() { 120 184 echo twentyten_get_page_number(); 121 185 } 122 186 endif; 123 187 124 // Control excerpt length 188 /** 189 * Sets the excerpt length to 40 charachters. Is pluggable 190 * 191 * @since 0.7.0 192 * @return int 193 */ 194 125 195 if ( ! function_exists( 'twentyten_excerpt_length' ) ) : 126 196 function twentyten_excerpt_length( $length ) { 127 197 return 40; … … 130 200 add_filter( 'excerpt_length', 'twentyten_excerpt_length' ); 131 201 132 202 133 // Make a nice read more link on excerpts 203 /** 204 * Sets the read more link for excerpts to something pretty 205 * 206 * @since 0.7.0 207 * @return string 208 * 209 */ 134 210 if ( ! function_exists( 'twentyten_excerpt_more' ) ) : 135 211 function twentyten_excerpt_more( $more ) { 136 212 return ' … <a href="'. get_permalink() . '">' . __('Continue reading <span class="meta-nav">→</span>', 'twentyten') . '</a>'; … … 139 215 add_filter( 'excerpt_more', 'twentyten_excerpt_more' ); 140 216 141 217 142 // Template for comments and pingbacks 218 /** 219 * Template for comments and pingbacks 220 * 221 * Used as a callback by wp_list_comments for displaying the 222 * comments. Is pluggable 223 * 224 * @since 0.7.0 225 */ 143 226 if ( ! function_exists( 'twentyten_comment' ) ) : 144 227 function twentyten_comment( $comment, $args, $depth ) { 145 228 $GLOBALS ['comment'] = $comment; ?> … … 171 254 } 172 255 endif; 173 256 174 // Remove inline styles on gallery shortcode 257 /** 258 * Remove inline styles on gallery shortcode 259 * 260 * @since 0.7.0 261 * @return string 262 */ 175 263 if ( ! function_exists( 'twentyten_remove_gallery_css' ) ) : 176 264 function twentyten_remove_gallery_css( $css ) { 177 265 return preg_replace( "#<style type='text/css'>(.*?)</style>#s", '', $css ); … … 179 267 endif; 180 268 add_filter( 'gallery_style', 'twentyten_remove_gallery_css' ); 181 269 270 /** 271 * Returns the list of categories 272 * 273 * Returns the list of categories based on if we are or are 274 * not browsing a category archive page. 275 * 276 * @uses twentyten_term_list 277 * 278 * @since 0.7.0 279 * @return string 280 */ 281 182 282 if ( ! function_exists( 'twentyten_cat_list' ) ) : 183 283 function twentyten_cat_list() { 184 284 return twentyten_term_list( 'category', ', ', __( 'Posted in %s', 'twentyten' ), __( 'Also posted in %s', 'twentyten' ) ); 185 285 } 186 286 endif; 187 287 288 /** 289 * Returns the list of tags 290 * 291 * Returns the list of tags based on if we are or are not 292 * browsing a tag archive page 293 * 294 * @uses twentyten_term_list 295 * 296 * @since 0.7.0 297 * @return string 298 */ 188 299 if ( ! function_exists( 'twentyten_tag_list' ) ) : 189 300 function twentyten_tag_list() { 190 301 return twentyten_term_list( 'post_tag', ', ', __( 'Tagged %s', 'twentyten' ), __( 'Also tagged %s', 'twentyten' ) ); 191 302 } 192 303 endif; 193 304 305 /** 306 * Returns the list of taxonomy items in multiple ways 307 * 308 * Returns the list of taxonomy items differently based on 309 * if we are browsing a term archive page or a different 310 * type of page. If browsing a term archive page and the 311 * post has no other taxonomied terms, it returns empty 312 * 313 * @since 0.7.0 314 * @return string 315 */ 194 316 if ( ! function_exists( 'twentyten_term_list' ) ) : 195 317 function twentyten_term_list( $taxonomy, $glue = ', ', $text = '', $also_text = '' ) { 196 318 global $wp_query, $post; … … 219 341 } 220 342 endif; 221 343 222 // Register widgetized areas 344 /** 345 * Register widgetized areas 346 * 347 * @since 0.7.0 348 * @uses register_sidebar 349 */ 223 350 if ( ! function_exists( 'twentyten_widgets_init' ) ) : 224 351 function twentyten_widgets_init() { 225 352 // Area 1 -
wp-content/themes/twentyten/sidebar.php
1 <?php 2 /** 3 * The Sidebar containing the primary and secondary widget areas 4 * 5 * @since 0.7.0 6 * @package WordPress 7 * @subpackage 2010 8 */ 9 ?> 10 1 11 <div id="primary" class="widget-area"> 2 12 <ul class="xoxo"> 3 13 <?php if ( ! dynamic_sidebar( 'primary-widget-area' ) ) : // begin primary widget area ?> -
wp-content/themes/twentyten/onecolumn-page.php
1 2 1 <?php 3 /* 4 Template Name: One column, no sidebar 5 Description: A template with no sidebar 6 */ 7 get_header(); ?> 2 /** 3 * Template Name: One column, no sidebar 4 * 5 * A custom page template without sidebar. 6 * Selectable from a dropdown menu on the edit page screen. 7 * 8 * @since 0.7.0 9 * @package WordPress 10 * @subpackage 2010 11 */ 12 ?> 8 13 14 <?php get_header(); ?> 15 9 16 <div id="container" class="onecolumn"> 10 17 <div id="content"> 11 18 -
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 * @since 0.7.0 11 * @package WordPress 12 * @subpackage 2010 13 */ 14 ?> 15 16 <?php /* Display navigation to next/previous pages when applicable */ ?> 1 17 <?php if ( $wp_query->max_num_pages > 1 ) : ?> 2 18 <div id="nav-above" class="navigation"> 3 19 <div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">←</span> Older posts', 'twentyten' ) ); ?></div> … … 5 21 </div><!-- #nav-above --> 6 22 <?php endif; ?> 7 23 24 <?php /* If there are no posts to display, such as an empty archive page */ ?> 8 25 <?php if ( ! have_posts() ) : ?> 9 26 <div id="post-0" class="post error404 not-found"> 10 27 <h1 class="entry-title"><?php _e( 'Not Found', 'twentyten' ); ?></h1> … … 15 32 </div><!-- #post-0 --> 16 33 <?php endif; ?> 17 34 35 <?php /* Start the Loop */ ?> 18 36 <?php while ( have_posts() ) : the_post(); ?> 37 38 <?php /* How to Display posts in the Gallery Category */ ?> 19 39 <?php if ( in_category( 'Gallery' ) ) : ?> 20 40 <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 21 41 <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 82 </div><!-- #entry-utility --> 63 83 </div> 64 84 65 85 <?php /* How to display posts in the asides category */ ?> 66 86 <?php elseif ( in_category( 'asides' ) ) : ?> 67 87 <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 68 88 <?php if ( is_archive() || is_search() ) : //Only display Excerpts for archives & search ?> … … 92 112 </div><!-- #entry-utility --> 93 113 </div><!-- #post-<?php the_ID(); ?> --> 94 114 95 115 <?php /* How to display all other posts */ ?> 96 116 <?php else : ?> 97 117 <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 98 118 <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 159 <?php endif; // if different categories queried ?> 140 160 <?php endwhile; ?> 141 161 162 <?php /* Display navigation to next/previous pages when applicable */ ?> 142 163 <?php if ( $wp_query->max_num_pages > 1 ) : ?> 143 164 <div id="nav-below" class="navigation"> 144 165 <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 * @since 0.7.0 6 * @package WordPress 7 * @subpackage 2010 8 */ 9 ?> 10 1 11 <?php get_header(); ?> 2 12 3 13 <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 * @since 0.7.0 11 * @package WordPress 12 * @subpackage 2010 13 */ 14 ?> 15 1 16 <?php get_header(); ?> 2 17 3 18 <div id="container"> -
wp-content/themes/twentyten/category.php
1 <?php 2 /** 3 * The template used to display Category Archive pages 4 * 5 * @since 0.7.0 6 * @package WordPress 7 * @subpackage 2010 8 */ 9 ?> 10 1 11 <?php get_header(); ?> 2 12 3 13 <div id="container"> … … 13 23 * If you want to overload this in a child theme then include a file 14 24 * called loop-category.php and that will be used instead. 15 25 */ 16 26 get_template_part( 'loop', 'category' ); 17 27 ?> 18 28 19 29 </div><!-- #content --> -
wp-content/themes/twentyten/archive.php
1 <?php 2 /** 3 * Generic template for Archive pages 4 * 5 * Used to display archive-type pages if nothing more specific matches a query. 6 * E.g., puts together date-based pages if no date.php file exists. 7 * Learn more: http://codex.wordpress.org/Template_Hierarchy 8 * 9 * @since 0.7.0 10 * @package WordPress 11 * @subpackage 2010 12 */ 13 ?> 14 1 15 <?php get_header(); ?> 2 16 3 17 <div id="container"> -
wp-content/themes/twentyten/single.php
1 <?php 2 /** 3 * The Template used to display all single posts 4 * 5 * @since 0.7.0 6 * @package WordPress 7 * @subpackage 2010 8 */ 9 ?> 10 1 11 <?php get_header(); ?> 2 12 3 13 <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 * @since 0.7.0 11 * @package WordPress 12 * @subpackage 2010 13 */ 14 ?> 15 1 16 <div id="comments"> 2 17 <?php if ( post_password_required() ) : ?> 3 18 <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 * @since 0.7.0 8 * @package WordPress 9 * @subpackage 2010 10 */ 11 ?> 12 1 13 <!DOCTYPE html> 2 14 <html <?php language_attributes(); ?>> 3 15 <head> … … 3 15 <meta charset="<?php bloginfo( 'charset' ); ?>" /> 4 16 <title><?php 17 // Returns the title based on the type of page being viewed 5 18 if ( is_single() ) { 6 19 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 * @since 0.7.0 6 * @package WordPress 7 * @subpackage 2010 8 */ 9 ?> 10 1 11 <?php get_header(); ?> 2 12 3 13 <div id="container">