Changeset 44678
- Timestamp:
- 01/21/2019 09:59:44 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/general-template.php
r44644 r44678 17 17 * 18 18 * @since 1.5.0 19 * @since 5.1.0 Added the return value. 19 20 * 20 21 * @param string $name The name of the specialised header. 22 * @return string The template filename if one is located. 21 23 */ 22 24 function get_header( $name = null ) { … … 39 41 $templates[] = 'header.php'; 40 42 41 locate_template( $templates, true );43 return locate_template( $templates, true ); 42 44 } 43 45 … … 52 54 * 53 55 * @since 1.5.0 56 * @since 5.1.0 Added the return value. 54 57 * 55 58 * @param string $name The name of the specialised footer. 59 * @return string The template filename if one is located. 56 60 */ 57 61 function get_footer( $name = null ) { … … 74 78 $templates[] = 'footer.php'; 75 79 76 locate_template( $templates, true );80 return locate_template( $templates, true ); 77 81 } 78 82 … … 87 91 * 88 92 * @since 1.5.0 93 * @since 5.1.0 Added the return value. 89 94 * 90 95 * @param string $name The name of the specialised sidebar. 96 * @return string The template filename if one is located. 91 97 */ 92 98 function get_sidebar( $name = null ) { … … 109 115 $templates[] = 'sidebar.php'; 110 116 111 locate_template( $templates, true );117 return locate_template( $templates, true ); 112 118 } 113 119 … … 129 135 * 130 136 * @since 3.0.0 137 * @since 5.1.0 Added the return value. 131 138 * 132 139 * @param string $slug The slug name for the generic template. 133 140 * @param string $name The name of the specialised template. 141 * @return string The template filename if one is located. 134 142 */ 135 143 function get_template_part( $slug, $name = null ) { … … 155 163 $templates[] = "{$slug}.php"; 156 164 157 locate_template( $templates, true, false );165 return locate_template( $templates, true, false ); 158 166 } 159 167
Note: See TracChangeset
for help on using the changeset viewer.