mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Docs: In various @return tags, list the expected type first, instead of false.
Follow-up to [46696]. See #48303. git-svn-id: https://develop.svn.wordpress.org/trunk@47060 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -37,7 +37,7 @@ function get_the_ID() { // phpcs:ignore WordPress.NamingConventions.ValidFunctio
|
||||
* @param string $before Optional. Markup to prepend to the title. Default empty.
|
||||
* @param string $after Optional. Markup to append to the title. Default empty.
|
||||
* @param bool $echo Optional. Whether to echo or return the title. Default true for echo.
|
||||
* @return string|void Current post title if $echo is false.
|
||||
* @return void|string Void if `$echo` argument is true, current post title if `$echo` is false.
|
||||
*/
|
||||
function the_title( $before = '', $after = '', $echo = true ) {
|
||||
$title = get_the_title();
|
||||
@@ -75,7 +75,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|void String when echo is false.
|
||||
* @return void|string Void if 'echo' argument is true, the title attribute if 'echo' is false.
|
||||
*/
|
||||
function the_title_attribute( $args = '' ) {
|
||||
$defaults = array(
|
||||
@@ -1062,7 +1062,8 @@ function _wp_link_page( $i ) {
|
||||
* @since 1.5.0
|
||||
*
|
||||
* @param string $key Meta data key name.
|
||||
* @return false|string|array Array of values or single value, if only one element exists. False will be returned if key does not exist.
|
||||
* @return array|string|false Array of values, or single value if only one element exists.
|
||||
* False if the key does not exist.
|
||||
*/
|
||||
function post_custom( $key = '' ) {
|
||||
$custom = get_post_custom();
|
||||
@@ -1153,7 +1154,7 @@ function the_meta() {
|
||||
* @type string $value_field Post field used to populate the 'value' attribute of the option
|
||||
* elements. Accepts any valid post field. Default 'ID'.
|
||||
* }
|
||||
* @return string HTML content, if not displaying.
|
||||
* @return string HTML dropdown list of pages.
|
||||
*/
|
||||
function wp_dropdown_pages( $args = '' ) {
|
||||
$defaults = array(
|
||||
@@ -1211,6 +1212,7 @@ function wp_dropdown_pages( $args = '' ) {
|
||||
if ( $parsed_args['echo'] ) {
|
||||
echo $html;
|
||||
}
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
@@ -1252,7 +1254,7 @@ function wp_dropdown_pages( $args = '' ) {
|
||||
* Default 'preserve'.
|
||||
* @type Walker $walker Walker instance to use for listing pages. Default empty (Walker_Page).
|
||||
* }
|
||||
* @return string|void HTML list of pages.
|
||||
* @return void|string Void if 'echo' argument is true, HTML list of pages if 'echo' is false.
|
||||
*/
|
||||
function wp_list_pages( $args = '' ) {
|
||||
$defaults = array(
|
||||
@@ -1373,7 +1375,7 @@ function wp_list_pages( $args = '' ) {
|
||||
* or 'discard'. Default 'discard'.
|
||||
* @type Walker $walker Walker instance to use for listing pages. Default empty (Walker_Page).
|
||||
* }
|
||||
* @return string|void HTML menu
|
||||
* @return void|string Void if 'echo' argument is true, HTML menu if 'echo' is false.
|
||||
*/
|
||||
function wp_page_menu( $args = array() ) {
|
||||
$defaults = array(
|
||||
@@ -1488,6 +1490,7 @@ function wp_page_menu( $args = array() ) {
|
||||
* @param array $args An array of arguments.
|
||||
*/
|
||||
$menu = apply_filters( 'wp_page_menu', $menu, $args );
|
||||
|
||||
if ( $args['echo'] ) {
|
||||
echo $menu;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user