Changeset 13146
- Timestamp:
- 02/14/2010 09:32:23 AM (15 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-content/themes/twentyten/archive.php
r13141 r13146 18 18 <?php rewind_posts(); ?> 19 19 20 <?php include 'loop.php'; ?>20 <?php get_generic_template( 'loop', 'archive' ); ?> 21 21 22 22 </div><!-- #content --> -
trunk/wp-content/themes/twentyten/author.php
r13141 r13146 22 22 <?php rewind_posts(); ?> 23 23 24 <?php include 'loop.php'; ?>24 <?php get_generic_template( 'loop', 'author' ); ?> 25 25 26 26 </div><!-- #content --> -
trunk/wp-content/themes/twentyten/category.php
r13141 r13146 11 11 <?php rewind_posts(); ?> 12 12 13 <?php include 'loop.php'; ?>13 <?php get_generic_template( 'loop', 'category' ); ?> 14 14 15 15 </div><!-- #content --> -
trunk/wp-content/themes/twentyten/index.php
r13141 r13146 5 5 6 6 <?php if ( have_posts() ) : 7 include 'loop.php';7 get_generic_template( 'loop', 'index' ); 8 8 else : ?> 9 9 <h2><?php _e( 'Not Found', 'twentyten' ); ?></h2> -
trunk/wp-content/themes/twentyten/search.php
r13141 r13146 6 6 <?php if ( have_posts() ) : ?> 7 7 <h1 class="page-title"><?php _e( 'Search Results for: ', 'twentyten' ); ?><span><?php the_search_query(); ?></span></h1> 8 <?php include 'loop.php'; ?>8 <?php get_generic_template( 'loop', 'search' ); ?> 9 9 <?php else : ?> 10 10 <div id="post-0" class="post no-results not-found"> -
trunk/wp-content/themes/twentyten/tag.php
r13141 r13146 10 10 <?php rewind_posts(); ?> 11 11 12 <?php include 'loop.php'; ?>12 <?php get_generic_template( 'loop', 'tag' ); ?> 13 13 14 14 </div><!-- #content --> -
trunk/wp-includes/general-template.php
r13143 r13146 92 92 if ('' == locate_template($templates, true)) 93 93 load_template( get_theme_root() . '/default/sidebar.php'); 94 } 95 96 /** 97 * Load a generic template. 98 * 99 * Includes the named template for a theme or if a name is specified then a 100 * specialised template will be included. If the theme contains no {slug}.php file 101 * then no template will be included. 102 * 103 * For the parameter, if the file is called "{slug}-special.php" then specify 104 * "special". 105 * 106 * @uses locate_template() 107 * @since 3.0.0 108 * @uses do_action() Calls 'get_generic_template_{$slug}' action. 109 * 110 * @param string $slug The slug name for the generic template. 111 * @param string $name The name of the specialised template. 112 */ 113 function get_generic_template( $slug, $name = null ) { 114 do_action( "get_generic_template_{$slug}", $name ); 115 116 $templates = array(); 117 if ( isset($name) ) 118 $templates[] = "{$slug}-{$name}.php"; 119 120 $templates[] = "{$slug}.php"; 121 122 locate_template($templates, true); 94 123 } 95 124
Note: See TracChangeset
for help on using the changeset viewer.