Ticket #12695: twentytendoc.4.demetris.diff

File twentytendoc.4.demetris.diff, 18.1 KB (added by demetris, 3 years ago)

My first pass on jorbin’s first pass (twentytendoc.3.diff)

Line 
1Index: wp-content/themes/twentyten/404.php
2===================================================================
3--- wp-content/themes/twentyten/404.php (revision 13845)
4+++ wp-content/themes/twentyten/404.php (working copy)
5@@ -1,3 +1,13 @@
6+<?php
7+/**
8+ * The template for displaying 404 pages (Not Found)
9+ *
10+ * @since 0.7.0
11+ * @package WordPress
12+ * @subpackage 2010
13+ */
14+?>
15+
16 <?php get_header(); ?>
17 
18        <div id="container">
19Index: wp-content/themes/twentyten/archive.php
20===================================================================
21--- wp-content/themes/twentyten/archive.php     (revision 13845)
22+++ wp-content/themes/twentyten/archive.php     (working copy)
23@@ -1,3 +1,17 @@
24+<?php
25+/**
26+ * Generic template for Archive pages
27+ *
28+ * Used to display archive-type pages if nothing more specific matches a query.
29+ * E.g., puts together date-based pages if no date.php file exists.
30+ * Learn more: http://codex.wordpress.org/Template_Hierarchy
31+ *
32+ * @since 0.7.0
33+ * @package WordPress
34+ * @subpackage 2010
35+ */
36+?>
37+
38 <?php get_header(); ?>
39 
40                <div id="container">
41Index: wp-content/themes/twentyten/attachment.php
42===================================================================
43--- wp-content/themes/twentyten/attachment.php  (revision 13845)
44+++ wp-content/themes/twentyten/attachment.php  (working copy)
45@@ -1,3 +1,13 @@
46+<?php
47+/**
48+ * The template used to display Attachment-type pages
49+ *
50+ * @since 0.7.0
51+ * @package WordPress
52+ * @subpackage 2010
53+ */
54+?>
55+
56 <?php get_header(); ?>
57 
58                <div id="container">
59Index: wp-content/themes/twentyten/author.php
60===================================================================
61--- wp-content/themes/twentyten/author.php      (revision 13845)
62+++ wp-content/themes/twentyten/author.php      (working copy)
63@@ -1,3 +1,13 @@
64+<?php
65+/**
66+ * The template used to display Author Archive pages
67+ *
68+ * @since 0.7.0
69+ * @package WordPress
70+ * @subpackage 2010
71+ */
72+?>
73+
74 <?php get_header(); ?>
75 
76                <div id="container">
77Index: wp-content/themes/twentyten/category.php
78===================================================================
79--- wp-content/themes/twentyten/category.php    (revision 13845)
80+++ wp-content/themes/twentyten/category.php    (working copy)
81@@ -1,3 +1,13 @@
82+<?php
83+/**
84+ * The template used to display Category Archive pages
85+ *
86+ * @since 0.7.0
87+ * @package WordPress
88+ * @subpackage 2010
89+ */
90+?>
91+
92 <?php get_header(); ?>
93 
94                <div id="container">
95@@ -13,7 +23,7 @@
96                                 * If you want to overload this in a child theme then include a file
97                                 * called loop-category.php and that will be used instead.
98                                 */
99-                                get_template_part( 'loop', 'category' );
100+                               get_template_part( 'loop', 'category' );
101                                ?>
102 
103                        </div><!-- #content -->
104Index: wp-content/themes/twentyten/comments.php
105===================================================================
106--- wp-content/themes/twentyten/comments.php    (revision 13845)
107+++ wp-content/themes/twentyten/comments.php    (working copy)
108@@ -1,3 +1,18 @@
109+<?php
110+/**
111+ * The template used to display Comments
112+ *
113+ * The area of the page that contains both current comments
114+ * and the comment form.  The actual display of comments is
115+ * handled by a callback to twentyten_comment which is
116+ * located in the functions.php file
117+ *
118+ * @since 0.7.0
119+ * @package WordPress
120+ * @subpackage 2010
121+ */
122+?>
123+
124                        <div id="comments">
125 <?php if ( post_password_required() ) : ?>
126                                <div class="nopassword"><?php _e( 'This post is password protected. Enter the password to view any comments.', 'twentyten' ); ?></div>
127Index: wp-content/themes/twentyten/footer.php
128===================================================================
129--- wp-content/themes/twentyten/footer.php      (revision 13845)
130+++ wp-content/themes/twentyten/footer.php      (working copy)
131@@ -1,3 +1,16 @@
132+<?php
133+/**
134+ * The template used to display the footer
135+ *
136+ * Contains the closing of the id=main div and all content
137+ * after.  Calls sidebar-footer.php for bottom widgets
138+ *
139+ * @since 0.7.0
140+ * @package WordPress
141+ * @subpackage 2010
142+ */
143+?>
144+
145        </div><!-- #main -->
146 
147        <div id="footer">
148Index: wp-content/themes/twentyten/functions.php
149===================================================================
150--- wp-content/themes/twentyten/functions.php   (revision 13845)
151+++ wp-content/themes/twentyten/functions.php   (working copy)
152@@ -1,9 +1,36 @@
153 <?php
154+/**
155+ * TwentyTen functions and definitions
156+ *
157+ * Sets up the theme and provides some helper functions used
158+ * in other parts of the theme.  All functions are pluggable
159+ *
160+ * @since 0.7.0
161+ * @package WordPress
162+ * @subpackage 2010
163+ */
164 
165-// Set the content width based on the Theme CSS
166+// Set the content width based on the Theme CSS.  Can be overriden
167 if ( ! isset( $content_width ) )
168        $content_width = 640;
169 
170+
171+/**
172+ * Set up defaults for our theme.
173+ *
174+ * Sets up theme defaults and tells wordpress that this is a
175+ * theme that will take advantage of Post Thumbnails, Custom
176+ * Background, Nav Menus and automatic feed links.  To
177+ * override any of the settings in a child theme, create your
178+ * own twentyten_init function
179+ *
180+ * @uses add_theme_support()
181+ *
182+ * @since 0.7.0
183+ *
184+ *
185+ */
186+
187 if ( ! function_exists( 'twentyten_init' ) ) :
188 function twentyten_init() {
189        // Your Changeable header business starts here
190@@ -90,6 +117,12 @@
191 endif;
192 add_action( 'after_setup_theme', 'twentyten_init' );
193 
194+/**
195+ * Callback to style the header image inside the admin
196+ *
197+ *
198+ */
199+
200 if ( ! function_exists( 'twentyten_admin_header_style' ) ) :
201 function twentyten_admin_header_style() {
202 ?>
203@@ -106,7 +139,18 @@
204 }
205 endif;
206 
207-// Get the page number
208+
209+/**
210+ * Returns the page number currently being browsed
211+ *
212+ * Returns a vertical bar followed by page and the page
213+ * number.  Is pluggable
214+ *
215+ * @since 0.7.0
216+ * @retun string
217+ */
218+
219+
220 if ( ! function_exists( 'twentyten_get_page_number' ) ) :
221 function twentyten_get_page_number() {
222        if ( get_query_var( 'paged' ) )
223@@ -114,14 +158,27 @@
224 }
225 endif;
226 
227-// Echo the page number
228+/**
229+ * Echos the page number being browsed
230+ *
231+ * @since 0.7.0
232+ * @uses twentyten_get_page_number
233+ *
234+ */
235+
236 if ( ! function_exists( 'twentyten_the_page_number' ) ) :
237 function twentyten_the_page_number() {
238        echo twentyten_get_page_number();
239 }
240 endif;
241 
242-// Control excerpt length
243+/**
244+ * Sets the excerpt length to 40 charachters.  Is pluggable
245+ *
246+ * @since 0.7.0
247+ * @return int
248+ */
249+
250 if ( ! function_exists( 'twentyten_excerpt_length' ) ) :
251 function twentyten_excerpt_length( $length ) {
252        return 40;
253@@ -130,7 +187,13 @@
254 add_filter( 'excerpt_length', 'twentyten_excerpt_length' );
255 
256 
257-// Make a nice read more link on excerpts
258+/**
259+ * Sets the read more link for excerpts to something pretty
260+ *
261+ * @since 0.7.0
262+ * @return string
263+ *
264+ */
265 if ( ! function_exists( 'twentyten_excerpt_more' ) ) :
266 function twentyten_excerpt_more( $more ) {
267        return '&nbsp;&hellip; <a href="'. get_permalink() . '">' . __('Continue&nbsp;reading&nbsp;<span class="meta-nav">&rarr;</span>', 'twentyten') . '</a>';
268@@ -139,7 +202,14 @@
269 add_filter( 'excerpt_more', 'twentyten_excerpt_more' );
270 
271 
272-// Template for comments and pingbacks
273+/**
274+ * Template for comments and pingbacks
275+ *
276+ * Used as a callback by wp_list_comments for displaying the
277+ * comments.  Is pluggable
278+ *
279+ * @since 0.7.0
280+ */
281 if ( ! function_exists( 'twentyten_comment' ) ) :
282 function twentyten_comment( $comment, $args, $depth ) {
283        $GLOBALS ['comment'] = $comment; ?>
284@@ -171,7 +241,12 @@
285 }
286 endif;
287 
288-// Remove inline styles on gallery shortcode
289+/**
290+ * Remove inline styles on gallery shortcode
291+ *
292+ * @since 0.7.0
293+ * @return string
294+ */
295 if ( ! function_exists( 'twentyten_remove_gallery_css' ) ) :
296 function twentyten_remove_gallery_css( $css ) {
297        return preg_replace( "#<style type='text/css'>(.*?)</style>#s", '', $css );
298@@ -179,18 +254,52 @@
299 endif;
300 add_filter( 'gallery_style', 'twentyten_remove_gallery_css' );
301 
302+/**
303+ * Returns the list of categories
304+ *
305+ * Returns the list of categories based on if we are or are
306+ * not browsing a category archive page.
307+ *
308+ * @uses twentyten_term_list
309+ *
310+ * @since 0.7.0
311+ * @return string
312+ */
313+
314 if ( ! function_exists( 'twentyten_cat_list' ) ) :
315 function twentyten_cat_list() {
316        return twentyten_term_list( 'category', ', ', __( 'Posted in %s', 'twentyten' ), __( 'Also posted in %s', 'twentyten' ) );
317 }
318 endif;
319 
320+/**
321+ * Returns the list of tags
322+ *
323+ * Returns the list of tags based on if we are or are not
324+ * browsing a tag archive page
325+ *
326+ * @uses twentyten_term_list
327+ *
328+ * @since 0.7.0
329+ * @return string
330+ */
331 if ( ! function_exists( 'twentyten_tag_list' ) ) :
332 function twentyten_tag_list() {
333        return twentyten_term_list( 'post_tag', ', ', __( 'Tagged %s', 'twentyten' ), __( 'Also tagged %s', 'twentyten' ) );
334 }
335 endif;
336 
337+/**
338+ * Returns the list of taxonomy items in multiple ways
339+ *
340+ * Returns the list of taxonomy items differently based on
341+ * if we are browsing a term archive page or a different
342+ * type of page.  If browsing a term archive page and the
343+ * post has no other taxonomied terms, it returns empty
344+ *
345+ * @since 0.7.0
346+ * @return string
347+ */
348 if ( ! function_exists( 'twentyten_term_list' ) ) :
349 function twentyten_term_list( $taxonomy, $glue = ', ', $text = '', $also_text = '' ) {
350        global $wp_query, $post;
351@@ -219,7 +328,12 @@
352 }
353 endif;
354 
355-// Register widgetized areas
356+/**
357+ * Register widgetized areas
358+ *
359+ * @since 0.7.0
360+ * @uses register_sidebar
361+ */
362 if ( ! function_exists( 'twentyten_widgets_init' ) ) :
363 function twentyten_widgets_init() {
364        // Area 1
365Index: wp-content/themes/twentyten/header.php
366===================================================================
367--- wp-content/themes/twentyten/header.php      (revision 13845)
368+++ wp-content/themes/twentyten/header.php      (working copy)
369@@ -1,3 +1,15 @@
370+<?php
371+/**
372+ * The Header for our theme.
373+ *
374+ * Displays all of the <head> section and everything up till <div id="main">
375+ *
376+ * @since 0.7.0
377+ * @package WordPress
378+ * @subpackage 2010
379+ */
380+?>
381+
382 <!DOCTYPE html>
383 <html <?php language_attributes(); ?>>
384 <head>
385@@ -3,4 +15,5 @@
386        <meta charset="<?php bloginfo( 'charset' ); ?>" />
387     <title><?php
388+       // Returns the title based on the type of page being viewed
389         if ( is_single() ) {
390                        single_post_title(); echo ' | '; bloginfo( 'name' );
391Index: wp-content/themes/twentyten/index.php
392===================================================================
393--- wp-content/themes/twentyten/index.php       (revision 13845)
394+++ wp-content/themes/twentyten/index.php       (working copy)
395@@ -1,3 +1,21 @@
396+<?php
397+
398+/**
399+ * The main template file
400+ *
401+ * This is the most generic template file in a WordPress theme
402+ * and one of the two required files for a theme (the other being style.css).
403+ * It is used to display a page when nothing more specific matches a query.
404+ * E.g., it puts together the home page when no home.php file exists.
405+ * Learn more: http://codex.wordpress.org/Template_Hierarchy
406+ *
407+ * @since 0.7.0
408+ * @package WordPress
409+ * @subpackage 2010
410+ */
411+
412+?>
413+
414 <?php get_header(); ?>
415 
416                <div id="container">
417@@ -14,4 +32,4 @@
418                </div><!-- #container -->
419 
420 <?php get_sidebar(); ?>
421-<?php get_footer(); ?>
422+<?php get_footer(); ?>
423\ No newline at end of file
424Index: wp-content/themes/twentyten/loop.php
425===================================================================
426--- wp-content/themes/twentyten/loop.php        (revision 13845)
427+++ wp-content/themes/twentyten/loop.php        (working copy)
428@@ -1,3 +1,19 @@
429+<?php
430+/**
431+ * The loop that displays posts
432+ *
433+ * The loop displays the posts and the post content.  See
434+ * http://codex.wordpress.org/The_Loop to understand it and
435+ * http://codex.wordpress.org/Template_Tags to understand
436+ * the tags used in it.
437+ *
438+ * @since 0.7.0
439+ * @package WordPress
440+ * @subpackage 2010
441+ */
442+?>
443+
444+<?php /* Display navigation to next/previous pages when applicable  */ ?>
445 <?php if ( $wp_query->max_num_pages > 1 ) : ?>
446        <div id="nav-above" class="navigation">
447                <div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', 'twentyten' ) ); ?></div>
448@@ -5,6 +21,7 @@
449        </div><!-- #nav-above -->
450 <?php endif; ?>
451 
452+<?php /* If there are no posts to display, such as an empty archive page  */ ?>
453 <?php if ( ! have_posts() ) : ?>
454        <div id="post-0" class="post error404 not-found">
455                <h1 class="entry-title"><?php _e( 'Not Found', 'twentyten' ); ?></h1>
456@@ -15,7 +32,10 @@
457        </div><!-- #post-0 -->
458 <?php endif; ?>
459 
460+<?php /* Start the Loop  */ ?>
461 <?php while ( have_posts() ) : the_post(); ?>
462+
463+<?php /* How to Display posts in the Gallery Category  */ ?>
464        <?php if ( in_category( 'Gallery' ) ) : ?>
465                <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
466                        <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>
467@@ -62,7 +82,7 @@
468                        </div><!-- #entry-utility -->
469                </div>
470 
471-
472+<?php /* How to display posts in the asides category */ ?>
473        <?php elseif ( in_category( 'asides' ) ) : ?>
474                <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
475        <?php if ( is_archive() || is_search() ) : //Only display Excerpts for archives & search ?>
476@@ -92,7 +112,7 @@
477                        </div><!-- #entry-utility -->
478                </div><!-- #post-<?php the_ID(); ?> -->
479 
480-
481+<?php /* How to display all other posts  */ ?>
482        <?php else : ?>
483                <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
484                        <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>
485@@ -139,6 +159,7 @@
486        <?php endif; // if different categories queried ?>
487 <?php endwhile; ?>
488 
489+<?php /* Display navigation to next/previous pages when applicable  */ ?>
490 <?php if (  $wp_query->max_num_pages > 1 ) : ?>
491                                <div id="nav-below" class="navigation">
492                                        <div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', 'twentyten' ) ); ?></div>
493Index: wp-content/themes/twentyten/onecolumn-page.php
494===================================================================
495--- wp-content/themes/twentyten/onecolumn-page.php      (revision 13845)
496+++ wp-content/themes/twentyten/onecolumn-page.php      (working copy)
497@@ -1,11 +1,18 @@
498-
499 <?php
500-/*
501-Template Name: One column, no sidebar
502-Description: A template with no sidebar
503-*/
504-get_header(); ?>
505+/**
506+ * Template Name: One column, no sidebar
507+ *
508+ * A custom page template without sidebar.
509+ * Selectable from a dropdown menu on the edit page screen.
510+ *
511+ * @since 0.7.0
512+ * @package WordPress
513+ * @subpackage 2010
514+ */
515+?>
516 
517+<?php get_header(); ?>
518+
519                <div id="container" class="onecolumn">
520                        <div id="content">
521 
522Index: wp-content/themes/twentyten/page.php
523===================================================================
524--- wp-content/themes/twentyten/page.php        (revision 13845)
525+++ wp-content/themes/twentyten/page.php        (working copy)
526@@ -1,3 +1,18 @@
527+<?php
528+/**
529+ * The template used to display all pages
530+ *
531+ * This is the template that displays all pages by default.
532+ * Please note that this is the wordpress construct of pages
533+ * and that other 'pages' on your wordpress site will use a
534+ * different template.
535+ *
536+ * @since 0.7.0
537+ * @package WordPress
538+ * @subpackage 2010
539+ */
540+?>
541+
542 <?php get_header(); ?>
543 
544                <div id="container">
545Index: wp-content/themes/twentyten/search.php
546===================================================================
547--- wp-content/themes/twentyten/search.php      (revision 13845)
548+++ wp-content/themes/twentyten/search.php      (working copy)
549@@ -1,3 +1,13 @@
550+<?php
551+/**
552+ * The Search Results template
553+ *
554+ * @since 0.7.0
555+ * @package WordPress
556+ * @subpackage 2010
557+ */
558+?>
559+
560 <?php get_header(); ?>
561 
562                <div id="container">
563Index: wp-content/themes/twentyten/searchform.php
564===================================================================
565--- wp-content/themes/twentyten/searchform.php  (revision 13845)
566+++ wp-content/themes/twentyten/searchform.php  (working copy)
567@@ -1,3 +1,16 @@
568+<?php
569+/**
570+ * The Search Form
571+ *
572+ * Optional file that allows displaying a custom search form
573+ * when the get_search_form() template tag is used.
574+ *
575+ * @since 0.7.0
576+ * @package WordPress
577+ * @subpackage 2010
578+ */
579+?>
580+
581     <form id="searchform" name="searchform" method="get" action="<?php echo home_url(); ?>">
582                <div>
583                        <label for="s"><?php _e( 'Search', 'twentyten' ); ?></label>
584Index: wp-content/themes/twentyten/sidebar-footer.php
585===================================================================
586--- wp-content/themes/twentyten/sidebar-footer.php      (revision 13845)
587+++ wp-content/themes/twentyten/sidebar-footer.php      (working copy)
588@@ -1,4 +1,14 @@
589 <?php
590+/**
591+ * The Footer widget areas
592+ *
593+ * @since 0.7.0
594+ * @package WordPress
595+ * @subpackage 2010
596+ */
597+?>
598+
599+<?php
600        if (
601                is_active_sidebar( 'first-footer-widget-area' )  ||
602                is_active_sidebar( 'second-footer-widget-area' ) ||
603Index: wp-content/themes/twentyten/sidebar.php
604===================================================================
605--- wp-content/themes/twentyten/sidebar.php     (revision 13845)
606+++ wp-content/themes/twentyten/sidebar.php     (working copy)
607@@ -1,3 +1,13 @@
608+<?php
609+/**
610+ * The Sidebar containing the primary and secondary widget areas
611+ *
612+ * @since 0.7.0
613+ * @package WordPress
614+ * @subpackage 2010
615+ */
616+?>
617+
618                <div id="primary" class="widget-area">
619                        <ul class="xoxo">
620 <?php if ( ! dynamic_sidebar( 'primary-widget-area' ) ) : // begin primary widget area ?>
621Index: wp-content/themes/twentyten/single.php
622===================================================================
623--- wp-content/themes/twentyten/single.php      (revision 13845)
624+++ wp-content/themes/twentyten/single.php      (working copy)
625@@ -1,3 +1,13 @@
626+<?php
627+/**
628+ * The Template used to display all single posts
629+ *
630+ * @since 0.7.0
631+ * @package WordPress
632+ * @subpackage 2010
633+ */
634+?>
635+
636 <?php get_header(); ?>
637 
638                <div id="container">
639Index: wp-content/themes/twentyten/tag.php
640===================================================================
641--- wp-content/themes/twentyten/tag.php (revision 13845)
642+++ wp-content/themes/twentyten/tag.php (working copy)
643@@ -1,3 +1,13 @@
644+<?php
645+/**
646+ * The template used to display Tag Archive pages
647+ *
648+ * @since 0.7.0
649+ * @package WordPress
650+ * @subpackage 2010
651+ */
652+?>
653+
654 <?php get_header(); ?>
655 
656                <div id="container">