Skip to content

Commit 7474af7

Browse files
committed
Docs: Update inline docs for various general template functions.
Props dilipbheda, mukesh27. Fixes #63215. See #63166. git-svn-id: https://develop.svn.wordpress.org/trunk@60120 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 99186cb commit 7474af7

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

src/wp-includes/general-template.php

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
* @since 5.5.0 A return value was added.
2020
* @since 5.5.0 The `$args` parameter was added.
2121
*
22-
* @param string $name The name of the specialized header.
23-
* @param array $args Optional. Additional arguments passed to the header template.
24-
* Default empty array.
22+
* @param string|null $name The name of the specialized header. Default null.
23+
* @param array $args Optional. Additional arguments passed to the header template.
24+
* Default empty array.
2525
* @return void|false Void on success, false if the template does not exist.
2626
*/
2727
function get_header( $name = null, $args = array() ) {
@@ -63,9 +63,9 @@ function get_header( $name = null, $args = array() ) {
6363
* @since 5.5.0 A return value was added.
6464
* @since 5.5.0 The `$args` parameter was added.
6565
*
66-
* @param string $name The name of the specialized footer.
67-
* @param array $args Optional. Additional arguments passed to the footer template.
68-
* Default empty array.
66+
* @param string|null $name The name of the specialized footer. Default null.
67+
* @param array $args Optional. Additional arguments passed to the footer template.
68+
* Default empty array.
6969
* @return void|false Void on success, false if the template does not exist.
7070
*/
7171
function get_footer( $name = null, $args = array() ) {
@@ -107,9 +107,9 @@ function get_footer( $name = null, $args = array() ) {
107107
* @since 5.5.0 A return value was added.
108108
* @since 5.5.0 The `$args` parameter was added.
109109
*
110-
* @param string $name The name of the specialized sidebar.
111-
* @param array $args Optional. Additional arguments passed to the sidebar template.
112-
* Default empty array.
110+
* @param string|null $name The name of the specialized sidebar. Default null.
111+
* @param array $args Optional. Additional arguments passed to the sidebar template.
112+
* Default empty array.
113113
* @return void|false Void on success, false if the template does not exist.
114114
*/
115115
function get_sidebar( $name = null, $args = array() ) {
@@ -159,7 +159,7 @@ function get_sidebar( $name = null, $args = array() ) {
159159
* @since 5.5.0 The `$args` parameter was added.
160160
*
161161
* @param string $slug The slug name for the generic template.
162-
* @param string|null $name Optional. The name of the specialized template.
162+
* @param string|null $name Optional. The name of the specialized template. Default null.
163163
* @param array $args Optional. Additional arguments passed to the template.
164164
* Default empty array.
165165
* @return void|false Void on success, false if the template does not exist.
@@ -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 $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|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.
203203
*/
204204
do_action( 'get_template_part', $slug, $name, $templates, $args );
205205

@@ -1916,7 +1916,7 @@ function get_the_post_type_description() {
19161916
* @param string $format Optional. Can be 'link', 'option', 'html', or custom. Default 'html'.
19171917
* @param string $before Optional. Content to prepend to the description. Default empty.
19181918
* @param string $after Optional. Content to append to the description. Default empty.
1919-
* @param bool $selected Optional. Set to true if the current page is the selected archive page.
1919+
* @param bool $selected Optional. Set to true if the current page is the selected archive page. Default false.
19201920
* @return string HTML link content for archive.
19211921
*/
19221922
function get_archives_link( $url, $text, $format = 'html', $before = '', $after = '', $selected = false ) {

0 commit comments

Comments
 (0)