Ticket #40969: 40969.3.diff
File 40969.3.diff, 2.0 KB (added by , 6 years ago) |
---|
-
src/wp-includes/general-template.php
16 16 * "special". 17 17 * 18 18 * @since 1.5.0 19 * @since x.y.z 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 ) { 23 25 /** … … 38 40 39 41 $templates[] = 'header.php'; 40 42 41 locate_template( $templates, true );43 return locate_template( $templates, true ); 42 44 } 43 45 44 46 /** … … 51 53 * "special". 52 54 * 53 55 * @since 1.5.0 56 * @since x.y.z 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 ) { 58 62 /** … … 73 77 74 78 $templates[] = 'footer.php'; 75 79 76 locate_template( $templates, true );80 return locate_template( $templates, true ); 77 81 } 78 82 79 83 /** … … 86 90 * "special". 87 91 * 88 92 * @since 1.5.0 93 * @since x.y.z 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 ) { 93 99 /** … … 108 114 109 115 $templates[] = 'sidebar.php'; 110 116 111 locate_template( $templates, true );117 return locate_template( $templates, true ); 112 118 } 113 119 114 120 /** … … 128 134 * "special". 129 135 * 130 136 * @since 3.0.0 137 * @since x.y.z 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 ) { 136 144 /** … … 154 162 155 163 $templates[] = "{$slug}.php"; 156 164 157 locate_template( $templates, true, false );165 return locate_template( $templates, true, false ); 158 166 } 159 167 160 168 /**