mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
Docs: Standardise the type name for booleans and integers.
This brings these docs inline with the documentation standards. Props ravipatel, justinahinon Fixes #51426 git-svn-id: https://develop.svn.wordpress.org/trunk@49120 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1244,7 +1244,7 @@ function rest_get_date_with_gmt( $date, $is_utc = false ) {
|
||||
*
|
||||
* @since 4.7.0
|
||||
*
|
||||
* @return integer 401 if the user is not logged in, 403 if the user is logged in.
|
||||
* @return int 401 if the user is not logged in, 403 if the user is logged in.
|
||||
*/
|
||||
function rest_authorization_required_code() {
|
||||
return is_user_logged_in() ? 403 : 401;
|
||||
@@ -1341,7 +1341,7 @@ function rest_is_ip_address( $ip ) {
|
||||
* @since 4.7.0
|
||||
*
|
||||
* @param bool|string|int $value The value being evaluated.
|
||||
* @return boolean Returns the proper associated boolean value.
|
||||
* @return bool Returns the proper associated boolean value.
|
||||
*/
|
||||
function rest_sanitize_boolean( $value ) {
|
||||
// String values are translated to `true`; make sure 'false' is false.
|
||||
@@ -1362,7 +1362,7 @@ function rest_sanitize_boolean( $value ) {
|
||||
* @since 4.7.0
|
||||
*
|
||||
* @param bool|string $maybe_bool The value being evaluated.
|
||||
* @return boolean True if a boolean, otherwise false.
|
||||
* @return bool True if a boolean, otherwise false.
|
||||
*/
|
||||
function rest_is_boolean( $maybe_bool ) {
|
||||
if ( is_bool( $maybe_bool ) ) {
|
||||
|
||||
Reference in New Issue
Block a user