Ticket #12695: twentytendoc.3.diff

File twentytendoc.3.diff, 15.8 KB (added by jorbin, 3 years ago)

.2 wasn't patching correctly. try this one.

  • 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?> 
    111    <form id="searchform" name="searchform" method="get" action="<?php echo home_url(); ?>"> 
    212                <div> 
    313                        <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?> 
    111        </div><!-- #main --> 
    212 
    313        <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?> 
    18<?php get_header(); ?> 
    29 
    310                <div id="container"> 
  • wp-content/themes/twentyten/search.php

     
     1<?php 
     2/** 
     3 * The Search Results template 
     4 * 
     5 * @package twenty-ten 
     6 */ 
     7?> 
    18<?php get_header(); ?> 
    29 
    310                <div id="container"> 
  • wp-content/themes/twentyten/sidebar-footer.php

     
    11<?php 
     2/** 
     3 * The Footer widget areas 
     4 * 
     5 * @package twenty-ten 
     6 */ 
     7?> 
     8<?php 
    29        if ( 
    310                is_active_sidebar( 'first-footer-widget-area' )  || 
    411                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?> 
    18<?php get_header(); ?> 
    29 
    310        <div id="container"> 
  • wp-content/themes/twentyten/functions.php

     
    11<?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 */ 
    210 
    3 // Set the content width based on the Theme CSS 
     11// Set the content width based on the Theme CSS.  Can be overriden 
    412if ( ! isset( $content_width ) ) 
    513        $content_width = 640; 
    614 
     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 
    732if ( ! function_exists( 'twentyten_init' ) ) : 
    833function twentyten_init() { 
    934        // Your Changeable header business starts here 
     
    90115endif; 
    91116add_action( 'after_setup_theme', 'twentyten_init' ); 
    92117 
     118/** 
     119 * Callback to style the header image inside the admin 
     120 * 
     121 * 
     122 */ 
     123 
    93124if ( ! function_exists( 'twentyten_admin_header_style' ) ) : 
    94125function twentyten_admin_header_style() { 
    95126?> 
     
    106137} 
    107138endif; 
    108139 
    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 
    110152if ( ! function_exists( 'twentyten_get_page_number' ) ) : 
    111153function twentyten_get_page_number() { 
    112154        if ( get_query_var( 'paged' ) ) 
     
    114156} 
    115157endif; 
    116158 
    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 
    118167if ( ! function_exists( 'twentyten_the_page_number' ) ) : 
    119168function twentyten_the_page_number() { 
    120169        echo twentyten_get_page_number(); 
    121170} 
    122171endif; 
    123172 
    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 
    125180if ( ! function_exists( 'twentyten_excerpt_length' ) ) : 
    126181function twentyten_excerpt_length( $length ) { 
    127182        return 40; 
     
    130185add_filter( 'excerpt_length', 'twentyten_excerpt_length' ); 
    131186 
    132187 
    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 */ 
    134195if ( ! function_exists( 'twentyten_excerpt_more' ) ) : 
    135196function twentyten_excerpt_more( $more ) { 
    136197        return '&nbsp;&hellip; <a href="'. get_permalink() . '">' . __('Continue&nbsp;reading&nbsp;<span class="meta-nav">&rarr;</span>', 'twentyten') . '</a>'; 
     
    139200add_filter( 'excerpt_more', 'twentyten_excerpt_more' ); 
    140201 
    141202 
    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 */ 
    143211if ( ! function_exists( 'twentyten_comment' ) ) : 
    144212function twentyten_comment( $comment, $args, $depth ) { 
    145213        $GLOBALS ['comment'] = $comment; ?> 
     
    171239} 
    172240endif; 
    173241 
    174 // Remove inline styles on gallery shortcode 
     242/** 
     243 * Remove inline styles on gallery shortcode 
     244 * 
     245 * @since 0.7 
     246 * @return string 
     247 */ 
    175248if ( ! function_exists( 'twentyten_remove_gallery_css' ) ) : 
    176249function twentyten_remove_gallery_css( $css ) { 
    177250        return preg_replace( "#<style type='text/css'>(.*?)</style>#s", '', $css ); 
     
    179252endif; 
    180253add_filter( 'gallery_style', 'twentyten_remove_gallery_css' ); 
    181254 
     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 
    182267if ( ! function_exists( 'twentyten_cat_list' ) ) : 
    183268function twentyten_cat_list() { 
    184269        return twentyten_term_list( 'category', ', ', __( 'Posted in %s', 'twentyten' ), __( 'Also posted in %s', 'twentyten' ) ); 
    185270} 
    186271endif; 
    187272 
     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 */ 
    188284if ( ! function_exists( 'twentyten_tag_list' ) ) : 
    189285function twentyten_tag_list() { 
    190286        return twentyten_term_list( 'post_tag', ', ', __( 'Tagged %s', 'twentyten' ), __( 'Also tagged %s', 'twentyten' ) ); 
    191287} 
    192288endif; 
    193289 
     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 */ 
    194301if ( ! function_exists( 'twentyten_term_list' ) ) : 
    195302function twentyten_term_list( $taxonomy, $glue = ', ', $text = '', $also_text = '' ) { 
    196303        global $wp_query, $post; 
     
    219326} 
    220327endif; 
    221328 
    222 // Register widgetized areas 
     329/** 
     330 * Register widgetized areas 
     331 * 
     332 * @since 0.7 
     333 * @uses register_sidebar 
     334 */ 
    223335if ( ! function_exists( 'twentyten_widgets_init' ) ) : 
    224336function twentyten_widgets_init() { 
    225337        // 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?> 
    18                <div id="primary" class="widget-area"> 
    29                        <ul class="xoxo"> 
    310<?php if ( ! dynamic_sidebar( 'primary-widget-area' ) ) : // begin primary widget area ?> 
  • wp-content/themes/twentyten/onecolumn-page.php

     
    1  
    21<?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 
    312/* 
    413Template Name: One column, no sidebar 
    514Description: 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  */ ?> 
    114<?php if ( $wp_query->max_num_pages > 1 ) : ?> 
    215        <div id="nav-above" class="navigation"> 
    316                <div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', 'twentyten' ) ); ?></div> 
     
    518        </div><!-- #nav-above --> 
    619<?php endif; ?> 
    720 
     21<?php /* If there are no posts to display, such as an empty archive page  */ ?> 
    822<?php if ( ! have_posts() ) : ?> 
    923        <div id="post-0" class="post error404 not-found"> 
    1024                <h1 class="entry-title"><?php _e( 'Not Found', 'twentyten' ); ?></h1> 
     
    1529        </div><!-- #post-0 --> 
    1630<?php endif; ?> 
    1731 
     32<?php /* Start the Loop  */ ?> 
    1833<?php while ( have_posts() ) : the_post(); ?> 
     34 
     35<?php /* How to Display posts in the Gallery Category  */ ?> 
    1936        <?php if ( in_category( 'Gallery' ) ) : ?> 
    2037                <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 
    2138                        <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> 
     
    6279                        </div><!-- #entry-utility --> 
    6380                </div> 
    6481 
    65  
     82<?php /* How to display posts in the asides category */ ?> 
    6683        <?php elseif ( in_category( 'asides' ) ) : ?> 
    6784                <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 
    6885        <?php if ( is_archive() || is_search() ) : //Only display Excerpts for archives & search ?> 
     
    92109                        </div><!-- #entry-utility --> 
    93110                </div><!-- #post-<?php the_ID(); ?> --> 
    94111 
    95  
     112<?php /* How to display all other posts  */ ?> 
    96113        <?php else : ?> 
    97114                <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 
    98115                        <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> 
     
    139156        <?php endif; // if different categories queried ?> 
    140157<?php endwhile; ?> 
    141158 
     159<?php /* Display navigation to next/previous pages when applicable  */ ?> 
    142160<?php if (  $wp_query->max_num_pages > 1 ) : ?> 
    143161                                <div id="nav-below" class="navigation"> 
    144162                                        <div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">&larr;</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?> 
    18<?php get_header(); ?> 
    29 
    310                <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?> 
    113<?php get_header(); ?> 
    214 
    315                <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?> 
    18<?php get_header(); ?> 
    29 
    310                <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?> 
    18<?php get_header(); ?> 
    29 
    310                <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?> 
    18<?php get_header(); ?> 
    29 
    310                <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?> 
    113                        <div id="comments"> 
    214<?php if ( post_password_required() ) : ?> 
    315                                <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?> 
    110<!DOCTYPE html> 
    211<html <?php language_attributes(); ?>> 
    312<head> 
     
    312        <meta charset="<?php bloginfo( 'charset' ); ?>" /> 
    413    <title><?php 
     14        // Returns the title based on the type of page being viewed 
    515        if ( is_single() ) { 
    616                        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?> 
    18<?php get_header(); ?> 
    29 
    310                <div id="container">