diff --git a/wp-includes/post-template.php b/wp-includes/post-template.php index 2a6569f298..fe3afdd510 100644 --- a/wp-includes/post-template.php +++ b/wp-includes/post-template.php @@ -22,7 +22,7 @@ function the_ID() { * * @since 2.1.0 * - * @return int|bool The ID of the current item in the WordPress Loop. False if $post is not set. + * @return int|false The ID of the current item in the WordPress Loop. False if $post is not set. */ function get_the_ID() { $post = get_post(); @@ -35,11 +35,11 @@ function get_the_ID() { * @since 0.71 * * @param string $before Optional. Content to prepend to the title. - * @param string $after Optional. Content to append to the title. - * @param bool $echo Optional, default to true.Whether to display or return. - * @return null|string Null on no title. String if $echo parameter is false. + * @param string $after Optional. Content to append to the title. + * @param bool $echo Optional, default to true.Whether to display or return. + * @return string|void String if $echo parameter is false. */ -function the_title($before = '', $after = '', $echo = true) { +function the_title( $before = '', $after = '', $echo = true ) { $title = get_the_title(); if ( strlen($title) == 0 ) @@ -73,7 +73,7 @@ function the_title($before = '', $after = '', $echo = true) { * @type bool $echo Whether to echo or return the title. Default true for echo. * @type WP_Post $post Current post object to retrieve the title for. * } - * @return string|null Null on failure or display. String when echo is false. + * @return string|void String when echo is false. */ function the_title_attribute( $args = '' ) { $defaults = array( 'before' => '', 'after' => '', 'echo' => true, 'post' => get_post() ); @@ -237,6 +237,12 @@ function the_content( $more_link_text = null, $strip_teaser = false) { * * @since 0.71 * + * @global int $page + * @global int $more + * @global bool $preview + * @global array $pages + * @global int $multipage + * * @param string $more_link_text Optional. Content for when there is more text. * @param bool $strip_teaser Optional. Strip teaser content before the more text. Default is false. * @return string @@ -521,6 +527,9 @@ function body_class( $class = '' ) { * * @since 2.8.0 * + * @global WP_Query $wp_query + * @global wpdb $wpdb + * * @param string|array $class One or more classes to add to the class list. * @return array Array of classes. */ @@ -726,7 +735,7 @@ function get_body_class( $class = '' ) { * * @since 2.7.0 * - * @param int|WP_Post $post An optional post. Global $post used if not provided. + * @param int|WP_Post|null $post An optional post. Global $post used if not provided. * @return bool false if a password is not required or the correct password cookie is present, true otherwise. */ function post_password_required( $post = null ) { @@ -760,6 +769,11 @@ function post_password_required( $post = null ) { * * @since 1.2.0 * + * @global int $page + * @global int $numpages + * @global int $multipage + * @global int $more + * * @param string|array $args { * Optional. Array or string of default arguments. * @@ -782,6 +796,8 @@ function post_password_required( $post = null ) { * @return string Formatted output in HTML. */ function wp_link_pages( $args = '' ) { + global $page, $numpages, $multipage, $more; + $defaults = array( 'before' => '

' . __( 'Pages:' ), 'after' => '

', @@ -806,8 +822,6 @@ function wp_link_pages( $args = '' ) { */ $r = apply_filters( 'wp_link_pages_args', $params ); - global $page, $numpages, $multipage, $more; - $output = ''; if ( $multipage ) { if ( 'number' == $r['next_or_number'] ) { @@ -877,6 +891,8 @@ function wp_link_pages( $args = '' ) { * @since 3.1.0 * @access private * + * @global WP_Rewrite $wp_rewrite + * * @param int $i Page number. * @return string Link. */ @@ -921,7 +937,7 @@ function _wp_link_page( $i ) { * @since 1.5.0 * * @param string $key Meta data key name. - * @return bool|string|array Array of values or single value, if only one element exists. False will be returned if key does not exist. + * @return false|string|array Array of values or single value, if only one element exists. False will be returned if key does not exist. */ function post_custom( $key = '' ) { $custom = get_post_custom(); @@ -1048,6 +1064,8 @@ function wp_dropdown_pages( $args = '' ) { * * @see get_pages() * + * @global WP_Query $wp_query + * * @param array|string $args { * Array or string of arguments. Optional. * @@ -1074,7 +1092,7 @@ function wp_dropdown_pages( $args = '' ) { * will not be wrapped with unordered list `