Changeset 13815
- Timestamp:
- 03/25/2010 10:02:45 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/general-template.php
r13658 r13815 95 95 96 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 97 * Load a template part into a template 98 * 99 * Makes it easy for a theme to reuse sections of code in a easy to overload way 100 * for child themes. 101 * 102 * Includes the named template part for a theme or if a name is specified then a 103 * specialised part will be included. If the theme contains no {slug}.php file 101 104 * then no template will be included. 102 105 * … … 106 109 * @uses locate_template() 107 110 * @since 3.0.0 108 * @uses do_action() Calls 'get_ generic_template_{$slug}' action.111 * @uses do_action() Calls 'get_template_part{$slug}' action. 109 112 * 110 113 * @param string $slug The slug name for the generic template. 111 114 * @param string $name The name of the specialised template. 112 115 */ 113 function get_ generic_template( $slug, $name = null ) {114 do_action( "get_ generic_template_{$slug}", $name );116 function get_template_part( $slug, $name = null ) { 117 do_action( "get_template_part{$slug}", $name ); 115 118 116 119 $templates = array();
Note: See TracChangeset
for help on using the changeset viewer.