Docs: Improve the docs for `the_title()` and make them more consistent with `the_title_attribute()`.
Props ixkaito, swissspidy. Fixes #37732. git-svn-id: https://develop.svn.wordpress.org/trunk@38348 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
47e8c055ef
commit
8d490e9d83
|
@ -30,14 +30,14 @@ function get_the_ID() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Display or retrieve the current post title with optional content.
|
* Display or retrieve the current post title with optional markup.
|
||||||
*
|
*
|
||||||
* @since 0.71
|
* @since 0.71
|
||||||
*
|
*
|
||||||
* @param string $before Optional. Content to prepend to the title.
|
* @param string $before Optional. Markup to prepend to the title. Default empty.
|
||||||
* @param string $after Optional. Content to append to the title.
|
* @param string $after Optional. Markup to append to the title. Default empty.
|
||||||
* @param bool $echo Optional, default to true.Whether to display or return.
|
* @param bool $echo Optional. Whether to echo or return the title. Default true for echo.
|
||||||
* @return string|void String if $echo parameter is false.
|
* @return string|void Current post title if $echo is false.
|
||||||
*/
|
*/
|
||||||
function the_title( $before = '', $after = '', $echo = true ) {
|
function the_title( $before = '', $after = '', $echo = true ) {
|
||||||
$title = get_the_title();
|
$title = get_the_title();
|
||||||
|
|
Loading…
Reference in New Issue