Skip to content

Commit 6fe810d

Browse files
Docs: Correct the type of the $name parameter in get_template_part action.
The value cannot be `null` at this point, as it is converted to a string a few lines above. Follow-up to [45059], [55870], [60120]. See #63215, #63166. git-svn-id: https://develop.svn.wordpress.org/trunk@60121 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 7474af7 commit 6fe810d

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

src/wp-includes/general-template.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,8 @@ function get_template_part( $slug, $name = null, $args = array() ) {
175175
* @since 5.5.0 The `$args` parameter was added.
176176
*
177177
* @param string $slug The slug name for the generic template.
178-
* @param string|null $name The name of the specialized template or null if
179-
* there is none.
178+
* @param string|null $name The name of the specialized template
179+
* or null if there is none.
180180
* @param array $args Additional arguments passed to the template.
181181
*/
182182
do_action( "get_template_part_{$slug}", $slug, $name, $args );
@@ -195,11 +195,11 @@ function get_template_part( $slug, $name = null, $args = array() ) {
195195
* @since 5.2.0
196196
* @since 5.5.0 The `$args` parameter was added.
197197
*
198-
* @param string $slug The slug name for the generic template.
199-
* @param string|null $name The name of the specialized template or an empty
200-
* string if there is none.
201-
* @param string[] $templates Array of template files to search for, in order.
202-
* @param array $args Additional arguments passed to the template.
198+
* @param string $slug The slug name for the generic template.
199+
* @param string $name The name of the specialized template
200+
* or an empty string if there is none.
201+
* @param string[] $templates Array of template files to search for, in order.
202+
* @param array $args Additional arguments passed to the template.
203203
*/
204204
do_action( 'get_template_part', $slug, $name, $templates, $args );
205205

0 commit comments

Comments
 (0)