Docs: Promote many `bool` types to `true` or `false` where only that value is used.

See #51800

Built from https://develop.svn.wordpress.org/trunk@49927


git-svn-id: http://core.svn.wordpress.org/trunk@49626 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
John Blackbourn 2021-01-03 22:04:04 +00:00
parent 53da9208dd
commit dfe1f9b322
60 changed files with 170 additions and 170 deletions

View File

@ -29,7 +29,7 @@ class WP_Community_Events {
*
* @since 4.8.0
*
* @var bool|array
* @var false|array
*/
protected $user_location = false;
@ -306,7 +306,7 @@ class WP_Community_Events {
* @since 4.8.0
*
* @param array $location Should contain 'latitude' and 'longitude' indexes.
* @return bool|string false on failure, or a string on success.
* @return false|string false on failure, or a string on success.
*/
protected function get_events_transient_key( $location ) {
$key = false;
@ -325,8 +325,8 @@ class WP_Community_Events {
*
* @since 4.8.0
*
* @param array $events Response body from the API request.
* @param int|bool $expiration Optional. Amount of time to cache the events. Defaults to false.
* @param array $events Response body from the API request.
* @param int|false $expiration Optional. Amount of time to cache the events. Defaults to false.
* @return bool true if events were cached; false if not.
*/
protected function cache_events( $events, $expiration = false ) {

View File

@ -128,7 +128,7 @@ class WP_Site_Health_Auto_Updates {
*
* @since 5.3.0
*
* @return array|bool The test results. False if auto-updates are enabled.
* @return array|false The test results. False if auto-updates are enabled.
*/
public function test_wp_automatic_updates_disabled() {
if ( ! class_exists( 'WP_Automatic_Updater' ) ) {
@ -152,7 +152,7 @@ class WP_Site_Health_Auto_Updates {
*
* @since 5.2.0
*
* @return array|bool The test results. False if the auto-updates failed.
* @return array|false The test results. False if the auto-updates failed.
*/
function test_if_failed_update() {
$failed = get_site_option( 'auto_core_update_failed' );
@ -302,7 +302,7 @@ class WP_Site_Health_Auto_Updates {
*
* @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass.
*
* @return array|bool The test results. False if they're not writeable.
* @return array|false The test results. False if they're not writeable.
*/
function test_all_files_writable() {
global $wp_filesystem;
@ -387,7 +387,7 @@ class WP_Site_Health_Auto_Updates {
*
* @since 5.2.0
*
* @return array|bool The test results. False if it isn't a development version.
* @return array|false The test results. False if it isn't a development version.
*/
function test_accepts_dev_updates() {
require ABSPATH . WPINC . '/version.php'; // $wp_version; // x.y.z

View File

@ -1680,7 +1680,7 @@ function dashboard_browser_nag_class( $classes ) {
*
* @since 3.2.0
*
* @return array|bool Array of browser data on success, false on failure.
* @return array|false Array of browser data on success, false on failure.
*/
function wp_check_browser_version() {
if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) {

View File

@ -247,7 +247,7 @@ function get_author_user_ids() {
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param int $user_id User ID.
* @return array|bool List of editable authors. False if no editable users.
* @return array|false List of editable authors. False if no editable users.
*/
function get_editable_authors( $user_id ) {
_deprecated_function( __FUNCTION__, '3.1.0', 'get_users()' );

View File

@ -130,7 +130,7 @@ function get_home_path() {
* @param string $folder Optional. Full path to folder. Default empty.
* @param int $levels Optional. Levels of folders to follow, Default 100 (PHP Loop limit).
* @param string[] $exclusions Optional. List of folders and files to skip.
* @return bool|string[] False on failure, else array of files.
* @return false|string[] False on failure, else array of files.
*/
function list_files( $folder = '', $levels = 100, $exclusions = array() ) {
if ( empty( $folder ) ) {
@ -998,11 +998,11 @@ function _wp_handle_upload( &$file, $overrides, $time, $action ) {
*
* @see _wp_handle_upload()
*
* @param array $file Reference to a single element of `$_FILES`.
* Call the function once for each uploaded file.
* @param array|bool $overrides Optional. An associative array of names => values
* to override default variables. Default false.
* @param string $time Optional. Time formatted in 'yyyy/mm'. Default null.
* @param array $file Reference to a single element of `$_FILES`.
* Call the function once for each uploaded file.
* @param array|false $overrides Optional. An associative array of names => values
* to override default variables. Default false.
* @param string $time Optional. Time formatted in 'yyyy/mm'. Default null.
* @return array On success, returns an associative array of file attributes.
* On failure, returns `$overrides['upload_error_handler']( &$file, $message )`
* or `array( 'error' => $message )`.
@ -1029,11 +1029,11 @@ function wp_handle_upload( &$file, $overrides = false, $time = null ) {
*
* @see _wp_handle_upload()
*
* @param array $file Reference to a single element of `$_FILES`.
* Call the function once for each uploaded file.
* @param array|bool $overrides Optional. An associative array of names => values
* to override default variables. Default false.
* @param string $time Optional. Time formatted in 'yyyy/mm'. Default null.
* @param array $file Reference to a single element of `$_FILES`.
* Call the function once for each uploaded file.
* @param array|false $overrides Optional. An associative array of names => values
* to override default variables. Default false.
* @param string $time Optional. Time formatted in 'yyyy/mm'. Default null.
* @return array On success, returns an associative array of file attributes.
* On failure, returns `$overrides['upload_error_handler']( &$file, $message )`
* or `array( 'error' => $message )`.

View File

@ -11,9 +11,9 @@
*
* @since 2.9.0
*
* @param int $post_id Attachment post ID.
* @param bool|object $msg Optional. Message to display for image editor updates or errors.
* Default false.
* @param int $post_id Attachment post ID.
* @param false|object $msg Optional. Message to display for image editor updates or errors.
* Default false.
*/
function wp_image_editor( $post_id, $msg = false ) {
$nonce = wp_create_nonce( "image_editor-$post_id" );

View File

@ -680,7 +680,7 @@ function wp_exif_date2ts( $str ) {
* @since 2.5.0
*
* @param string $file
* @return bool|array False on failure. Image metadata array on success.
* @return false|array False on failure. Image metadata array on success.
*/
function wp_read_image_metadata( $file ) {
if ( ! file_exists( $file ) ) {
@ -1027,7 +1027,7 @@ function _load_image_to_edit_path( $attachment_id, $size = 'full' ) {
*
* @since 2.9.0
*
* @param string|bool $filepath File path or URL to current image, or false.
* @param string|false $filepath File path or URL to current image, or false.
* @param int $attachment_id Attachment ID.
* @param string|int[] $size Requested image size. Can be any registered image size name, or
* an array of width and height values in pixels (in that order).

View File

@ -17,7 +17,7 @@
*
* @param string $class The type of the list table, which is the class name.
* @param array $args Optional. Arguments to pass to the class. Accepts 'screen'.
* @return WP_List_Table|bool List table object on success, false if the class does not exist.
* @return WP_List_Table|false List table object on success, false if the class does not exist.
*/
function _get_list_table( $class, $args = array() ) {
$core_classes = array(

View File

@ -3526,7 +3526,7 @@ function wp_add_id3_tag_data( &$metadata, $data ) {
* @since 3.6.0
*
* @param string $file Path to file.
* @return array|bool Returns array of metadata, if found.
* @return array|false Returns array of metadata, if found.
*/
function wp_read_video_metadata( $file ) {
if ( ! file_exists( $file ) ) {
@ -3637,7 +3637,7 @@ function wp_read_video_metadata( $file ) {
* @since 3.6.0
*
* @param string $file Path to file.
* @return array|bool Returns array of metadata, if found.
* @return array|false Returns array of metadata, if found.
*/
function wp_read_audio_metadata( $file ) {
if ( ! file_exists( $file ) ) {
@ -3706,8 +3706,8 @@ function wp_read_audio_metadata( $file ) {
* @link https://github.com/JamesHeinrich/getID3/blob/master/structure.txt
*
* @param array $metadata The metadata returned by getID3::analyze().
* @return int|bool A UNIX timestamp for the media's creation date if available
* or a boolean FALSE if a timestamp could not be determined.
* @return int|false A UNIX timestamp for the media's creation date if available
* or a boolean FALSE if a timestamp could not be determined.
*/
function wp_get_media_creation_timestamp( $metadata ) {
$creation_date = false;

View File

@ -311,7 +311,7 @@ function upload_space_setting( $id ) {
* @since 3.0.0
*
* @param int $id The user ID.
* @return bool|int The ID of the refreshed user or false if the user does not exist.
* @return false|int The ID of the refreshed user or false if the user does not exist.
*/
function refresh_user_details( $id ) {
$id = (int) $id;

View File

@ -1763,7 +1763,7 @@ function add_comments_page( $page_title, $menu_title, $capability, $menu_slug, $
* @global array $menu
*
* @param string $menu_slug The slug of the menu.
* @return array|bool The removed menu on success, false if not found.
* @return array|false The removed menu on success, false if not found.
*/
function remove_menu_page( $menu_slug ) {
global $menu;
@ -1787,7 +1787,7 @@ function remove_menu_page( $menu_slug ) {
*
* @param string $menu_slug The slug for the parent menu.
* @param string $submenu_slug The slug of the submenu.
* @return array|bool The removed submenu on success, false if not found.
* @return array|false The removed submenu on success, false if not found.
*/
function remove_submenu_page( $menu_slug, $submenu_slug ) {
global $submenu;

View File

@ -1115,7 +1115,7 @@ function get_available_post_statuses( $type = 'post' ) {
*
* @since 2.5.0
*
* @param array|bool $q Array of query variables to use to build the query or false to use $_GET superglobal.
* @param array|false $q Array of query variables to use to build the query or false to use $_GET superglobal.
* @return array
*/
function wp_edit_posts_query( $q = false ) {

View File

@ -13,7 +13,7 @@
* @access private
*
* @param int $request_id Request ID.
* @return bool|WP_Error Returns true if sending the email was successful, or a WP_Error object.
* @return true|WP_Error Returns true if sending the email was successful, or a WP_Error object.
*/
function _wp_privacy_resend_request( $request_id ) {
$request_id = absint( $request_id );

View File

@ -15,7 +15,7 @@
* @param WP_Post|int $post The post object or post ID.
* @param int $compare_from The revision ID to compare from.
* @param int $compare_to The revision ID to come to.
* @return array|bool Associative array of a post's revisioned fields and their diffs.
* @return array|false Associative array of a post's revisioned fields and their diffs.
* Or, false on failure.
*/
function wp_get_revision_ui_diff( $post, $compare_from, $compare_to ) {

View File

@ -183,7 +183,7 @@ function wp_insert_category( $catarr, $wp_error = false ) {
* @since 2.0.0
*
* @param array $catarr The 'cat_ID' value is required. All other keys are optional.
* @return int|bool The ID number of the new or updated Category on success. Zero or FALSE on failure.
* @return int|false The ID number of the new or updated Category on success. Zero or FALSE on failure.
*/
function wp_update_category( $catarr ) {
$cat_ID = (int) $catarr['cat_ID'];
@ -240,7 +240,7 @@ function wp_create_tag( $tag_name ) {
*
* @param int $post_id
* @param string $taxonomy Optional. The taxonomy for which to retrieve terms. Default 'post_tag'.
* @return string|bool|WP_Error
* @return string|false|WP_Error
*/
function get_tags_to_edit( $post_id, $taxonomy = 'post_tag' ) {
return get_terms_to_edit( $post_id, $taxonomy );
@ -253,7 +253,7 @@ function get_tags_to_edit( $post_id, $taxonomy = 'post_tag' ) {
*
* @param int $post_id
* @param string $taxonomy Optional. The taxonomy for which to retrieve terms. Default 'post_tag'.
* @return string|bool|WP_Error
* @return string|false|WP_Error
*/
function get_terms_to_edit( $post_id, $taxonomy = 'post_tag' ) {
$post_id = (int) $post_id;

View File

@ -206,8 +206,8 @@ function wp_install_language_form( $languages ) {
* @see wp_get_available_translations()
*
* @param string $download Language code to download.
* @return string|bool Returns the language code if successfully downloaded
* (or already installed), or false on failure.
* @return string|false Returns the language code if successfully downloaded
* (or already installed), or false on failure.
*/
function wp_download_language_pack( $download ) {
// Check if the translation is already installed.

View File

@ -280,7 +280,7 @@ function get_editable_roles() {
* @since 2.0.5
*
* @param int $user_id User ID.
* @return WP_User|bool WP_User object on success, false on failure.
* @return WP_User|false WP_User object on success, false on failure.
*/
function get_user_to_edit( $user_id ) {
$user = get_userdata( $user_id );

View File

@ -99,8 +99,8 @@ function generate_block_asset_handle( $block_name, $field_name ) {
*
* @param array $metadata Block metadata.
* @param string $field_name Field name to pick from metadata.
* @return string|bool Script handle provided directly or created through
* script's registration, or false on failure.
* @return string|false Script handle provided directly or created through
* script's registration, or false on failure.
*/
function register_block_script_handle( $metadata, $field_name ) {
if ( empty( $metadata[ $field_name ] ) ) {
@ -146,8 +146,8 @@ function register_block_script_handle( $metadata, $field_name ) {
*
* @param array $metadata Block metadata.
* @param string $field_name Field name to pick from metadata.
* @return string|boolean Style handle provided directly or created through
* style's registration, or false on failure.
* @return string|false Style handle provided directly or created through
* style's registration, or false on failure.
*/
function register_block_style_handle( $metadata, $field_name ) {
if ( empty( $metadata[ $field_name ] ) ) {

View File

@ -1076,7 +1076,7 @@ class WP_Http {
* @since 3.7.0
*
* @param string $maybe_ip A suspected IP address.
* @return int|bool Upon success, '4' or '6' to represent a IPv4 or IPv6 address, false upon failure
* @return int|false Upon success, '4' or '6' to represent a IPv4 or IPv6 address, false upon failure
*/
public static function is_ip_address( $maybe_ip ) {
if ( preg_match( '/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/', $maybe_ip ) ) {

View File

@ -319,7 +319,7 @@ final class WP_Comment {
* @since 4.4.0
*
* @param int $child_id ID of the child.
* @return WP_Comment|bool Returns the comment object if found, otherwise false.
* @return WP_Comment|false Returns the comment object if found, otherwise false.
*/
public function get_child( $child_id ) {
if ( isset( $this->children[ $child_id ] ) ) {

View File

@ -95,10 +95,10 @@ final class WP_Hook implements Iterator, ArrayAccess {
*
* @since 4.7.0
*
* @param bool|int $new_priority Optional. The priority of the new filter being added. Default false,
* for no priority being added.
* @param bool $priority_existed Optional. Flag for whether the priority already existed before the new
* filter was added. Default false.
* @param false|int $new_priority Optional. The priority of the new filter being added. Default false,
* for no priority being added.
* @param bool $priority_existed Optional. Flag for whether the priority already existed before the new
* filter was added. Default false.
*/
private function resort_active_iterations( $new_priority = false, $priority_existed = false ) {
$new_priorities = array_keys( $this->callbacks );
@ -192,9 +192,9 @@ final class WP_Hook implements Iterator, ArrayAccess {
*
* @since 4.7.0
*
* @param string $tag Optional. The name of the filter hook. Default empty.
* @param callable|bool $function_to_check Optional. The callback to check for. Default false.
* @return bool|int The priority of that hook is returned, or false if the function is not attached.
* @param string $tag Optional. The name of the filter hook. Default empty.
* @param callable|false $function_to_check Optional. The callback to check for. Default false.
* @return false|int The priority of that hook is returned, or false if the function is not attached.
*/
public function has_filter( $tag = '', $function_to_check = false ) {
if ( false === $function_to_check ) {
@ -236,7 +236,7 @@ final class WP_Hook implements Iterator, ArrayAccess {
*
* @since 4.7.0
*
* @param int|bool $priority Optional. The priority number to remove. Default false.
* @param int|false $priority Optional. The priority number to remove. Default false.
*/
public function remove_all_filters( $priority = false ) {
if ( ! $this->callbacks ) {

View File

@ -45,7 +45,7 @@ class WP_Http_Encoding {
*
* @param string $compressed String to decompress.
* @param int $length The optional length of the compressed data.
* @return string|bool False on failure.
* @return string|false False on failure.
*/
public static function decompress( $compressed, $length = null ) {
@ -98,7 +98,7 @@ class WP_Http_Encoding {
* @link https://www.php.net/manual/en/function.gzinflate.php#77336
*
* @param string $gzData String to decompress.
* @return string|bool False on failure.
* @return string|false False on failure.
*/
public static function compatible_gzinflate( $gzData ) {

View File

@ -13,10 +13,10 @@ class WP_HTTP_IXR_Client extends IXR_Client {
public $error;
/**
* @param string $server
* @param string|bool $path
* @param int|bool $port
* @param int $timeout
* @param string $server
* @param string|false $path
* @param int|false $port
* @param int $timeout
*/
public function __construct( $server, $path = false, $port = false, $timeout = 15 ) {
if ( ! $path ) {

View File

@ -79,7 +79,7 @@ class WP_Image_Editor_GD extends WP_Image_Editor {
*
* @since 3.5.0
*
* @return bool|WP_Error True if loaded successfully; WP_Error on failure.
* @return true|WP_Error True if loaded successfully; WP_Error on failure.
*/
public function load() {
if ( $this->image ) {
@ -311,7 +311,7 @@ class WP_Image_Editor_GD extends WP_Image_Editor {
* @param int $dst_w Optional. The destination width.
* @param int $dst_h Optional. The destination height.
* @param bool $src_abs Optional. If the source crop points are absolute.
* @return bool|WP_Error
* @return true|WP_Error
*/
public function crop( $src_x, $src_y, $src_w, $src_h, $dst_w = null, $dst_h = null, $src_abs = false ) {
// If destination width/height isn't specified,

View File

@ -252,7 +252,7 @@ class WP_Image_Editor_Imagick extends WP_Image_Editor {
* @param int|null $max_w Image width.
* @param int|null $max_h Image height.
* @param bool $crop
* @return bool|WP_Error
* @return true|WP_Error
*/
public function resize( $max_w, $max_h, $crop = false ) {
if ( ( $this->size['width'] == $max_w ) && ( $this->size['height'] == $max_h ) ) {
@ -524,7 +524,7 @@ class WP_Image_Editor_Imagick extends WP_Image_Editor {
* @param int $dst_w Optional. The destination width.
* @param int $dst_h Optional. The destination height.
* @param bool $src_abs Optional. If the source crop points are absolute.
* @return bool|WP_Error
* @return true|WP_Error
*/
public function crop( $src_x, $src_y, $src_w, $src_h, $dst_w = null, $dst_h = null, $src_abs = false ) {
if ( $src_abs ) {
@ -775,7 +775,7 @@ class WP_Image_Editor_Imagick extends WP_Image_Editor {
* @since 3.5.0
*
* @param string $mime_type The mime type of the image.
* @return bool|WP_Error True on success, WP_Error object on failure.
* @return true|WP_Error True on success, WP_Error object on failure.
*/
public function stream( $mime_type = null ) {
list( $filename, $extension, $mime_type ) = $this->get_output_format( null, $mime_type );

View File

@ -64,7 +64,7 @@ abstract class WP_Image_Editor {
* @since 3.5.0
* @abstract
*
* @return bool|WP_Error True if loaded; WP_Error on failure.
* @return true|WP_Error True if loaded; WP_Error on failure.
*/
abstract public function load();
@ -93,7 +93,7 @@ abstract class WP_Image_Editor {
* @param int|null $max_w Image width.
* @param int|null $max_h Image height.
* @param bool $crop
* @return bool|WP_Error
* @return true|WP_Error
*/
abstract public function resize( $max_w, $max_h, $crop = false );
@ -129,7 +129,7 @@ abstract class WP_Image_Editor {
* @param int $dst_w Optional. The destination width.
* @param int $dst_h Optional. The destination height.
* @param bool $src_abs Optional. If the source crop points are absolute.
* @return bool|WP_Error
* @return true|WP_Error
*/
abstract public function crop( $src_x, $src_y, $src_w, $src_h, $dst_w = null, $dst_h = null, $src_abs = false );
@ -140,7 +140,7 @@ abstract class WP_Image_Editor {
* @abstract
*
* @param float $angle
* @return bool|WP_Error
* @return true|WP_Error
*/
abstract public function rotate( $angle );
@ -152,7 +152,7 @@ abstract class WP_Image_Editor {
*
* @param bool $horz Flip along Horizontal Axis
* @param bool $vert Flip along Vertical Axis
* @return bool|WP_Error
* @return true|WP_Error
*/
abstract public function flip( $horz, $vert );
@ -163,7 +163,7 @@ abstract class WP_Image_Editor {
* @abstract
*
* @param string $mime_type The mime type of the image.
* @return bool|WP_Error True on success, WP_Error object or false on failure.
* @return true|WP_Error True on success, WP_Error object on failure.
*/
abstract public function stream( $mime_type = null );

View File

@ -822,7 +822,7 @@ class WP_Meta_Query {
*
* @since 4.1.0
*
* @param string|bool $alias Table alias, or false if none was found.
* @param string|false $alias Table alias, or false if none was found.
* @param array $clause First-order query clause.
* @param array $parent_query Parent of $clause.
* @param WP_Meta_Query $this WP_Meta_Query object.

View File

@ -89,7 +89,7 @@ class WP_Network {
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param int $network_id The ID of the network to retrieve.
* @return WP_Network|bool The network's object if found. False if not.
* @return WP_Network|false The network's object if found. False if not.
*/
public static function get_instance( $network_id ) {
global $wpdb;
@ -326,7 +326,7 @@ class WP_Network {
* @param string $domain Domain to check.
* @param string $path Path to check.
* @param int|null $segments Path segments to use. Defaults to null, or the full path.
* @return WP_Network|bool Network object if successful. False when no network is found.
* @return WP_Network|false Network object if successful. False when no network is found.
*/
public static function get_by_path( $domain = '', $path = '', $segments = null ) {
$domains = array( $domain );
@ -407,7 +407,7 @@ class WP_Network {
*
* @since 3.9.0
*
* @param null|bool|WP_Network $network Network value to return by path. Default null
* @param null|false|WP_Network $network Network value to return by path. Default null
* to continue retrieving the network.
* @param string $domain The requested domain.
* @param string $path The requested path, in full.

View File

@ -220,7 +220,7 @@ class WP_oEmbed {
*
* @param string $name Method to call.
* @param array $arguments Arguments to pass when calling.
* @return mixed|bool Return value of the callback, false otherwise.
* @return mixed|false Return value of the callback, false otherwise.
*/
public function __call( $name, $arguments ) {
if ( in_array( $name, $this->compat_methods, true ) ) {

View File

@ -4330,7 +4330,7 @@ class WP_Query {
* @since 5.2.0
*
* @param WP_Post|object|int $post WP_Post instance or Post ID/object.
* @return array|bool Elements of post or false on failure.
* @return array|false Elements of post or false on failure.
*/
public function generate_postdata( $post ) {

View File

@ -289,7 +289,7 @@ When seeking help with this issue, you may be asked for some of the following in
* @since 5.3.0
*
* @param array $extension The extension that caused the error.
* @return bool|array A plugin array {@see get_plugins()} or `false` if no plugin was found.
* @return false|array A plugin array {@see get_plugins()} or `false` if no plugin was found.
*/
private function get_plugin( $extension ) {
if ( ! function_exists( 'get_plugins' ) ) {

View File

@ -228,7 +228,7 @@ class wp_xmlrpc_server extends IXR_Server {
*
* @param string $username User's username.
* @param string $password User's password.
* @return WP_User|bool WP_User object if authentication passed, false otherwise
* @return WP_User|false WP_User object if authentication passed, false otherwise
*/
public function login( $username, $password ) {
/*
@ -2231,7 +2231,7 @@ class wp_xmlrpc_server extends IXR_Server {
* @type string $taxnomy_name Taxonomy name.
* @type int $term_id Term ID.
* }
* @return bool|IXR_Error True on success, IXR_Error instance on failure.
* @return true|IXR_Error True on success, IXR_Error instance on failure.
*/
public function wp_deleteTerm( $args ) {
if ( ! $this->minimum_args( $args, 5 ) ) {
@ -5653,7 +5653,7 @@ class wp_xmlrpc_server extends IXR_Server {
* @type array $content_struct
* @type int $publish
* }
* @return bool|IXR_Error True on success.
* @return true|IXR_Error True on success.
*/
public function mw_editPost( $args ) {
$this->escape( $args );

View File

@ -454,7 +454,7 @@ function get_comment_count( $post_id = 0 ) {
* @param mixed $meta_value Metadata value. Must be serializable if non-scalar.
* @param bool $unique Optional. Whether the same key should not be added.
* Default false.
* @return int|bool Meta ID on success, false on failure.
* @return int|false Meta ID on success, false on failure.
*/
function add_comment_meta( $comment_id, $meta_key, $meta_value, $unique = false ) {
return add_metadata( 'comment', $comment_id, $meta_key, $meta_value, $unique );

View File

@ -754,8 +754,8 @@ function spawn_cron( $gmt_time = 0 ) {
* @since 2.1.0
* @since 5.1.0 Return value added to indicate success or failure.
*
* @return bool|int On success an integer indicating number of events spawned (0 indicates no
* events needed to be spawned), false if spawning fails for one or more events.
* @return false|int On success an integer indicating number of events spawned (0 indicates no
* events needed to be spawned), false if spawning fails for one or more events.
*/
function wp_cron() {
// Prevent infinite loops caused by lack of wp-cron.php.
@ -880,9 +880,9 @@ function wp_get_schedule( $hook, $args = array() ) {
*
* @since 5.1.0
*
* @param string|bool $schedule Schedule for the hook. False if not found.
* @param string $hook Action hook to execute when cron is run.
* @param array $args Optional. Arguments to pass to the hook's callback function.
* @param string|false $schedule Schedule for the hook. False if not found.
* @param string $hook Action hook to execute when cron is run.
* @param array $args Optional. Arguments to pass to the hook's callback function.
*/
return apply_filters( 'get_schedule', $schedule, $hook, $args );
}

View File

@ -3585,7 +3585,7 @@ function iso8601_timezone_to_offset( $timezone ) {
*
* @param string $date_string Date and time in ISO 8601 format {@link https://en.wikipedia.org/wiki/ISO_8601}.
* @param string $timezone Optional. If set to 'gmt' returns the result in UTC. Default 'user'.
* @return string|bool The date and time in MySQL DateTime format - Y-m-d H:i:s, or false on failure.
* @return string|false The date and time in MySQL DateTime format - Y-m-d H:i:s, or false on failure.
*/
function iso8601_to_datetime( $date_string, $timezone = 'user' ) {
$timezone = strtolower( $timezone );

View File

@ -938,7 +938,7 @@ function do_enclose( $content, $post ) {
*
* @param string $url URL to retrieve HTTP headers from.
* @param bool $deprecated Not Used.
* @return bool|string False on failure, headers on success.
* @return false|string False on failure, headers on success.
*/
function wp_get_http_headers( $url, $deprecated = false ) {
if ( ! empty( $deprecated ) ) {
@ -3014,18 +3014,18 @@ function wp_check_filetype_and_ext( $file, $filename, $mimes = null ) {
* @since 3.0.0
* @since 5.1.0 The $real_mime parameter was added.
*
* @param array $wp_check_filetype_and_ext {
* @param array $wp_check_filetype_and_ext {
* Values for the extension, mime type, and corrected filename.
*
* @type string|false $ext File extension, or false if the file doesn't match a mime type.
* @type string|false $type File mime type, or false if the file doesn't match a mime type.
* @type string|false $proper_filename File name with its correct extension, or false if it cannot be determined.
* }
* @param string $file Full path to the file.
* @param string $filename The name of the file (may differ from $file due to
* $file being in a tmp directory).
* @param string[] $mimes Array of mime types keyed by their file extension regex.
* @param string|bool $real_mime The actual mime type or false if the type cannot be determined.
* @param string $file Full path to the file.
* @param string $filename The name of the file (may differ from $file due to
* $file being in a tmp directory).
* @param string[] $mimes Array of mime types keyed by their file extension regex.
* @param string|false $real_mime The actual mime type or false if the type cannot be determined.
*/
return apply_filters( 'wp_check_filetype_and_ext', compact( 'ext', 'type', 'proper_filename' ), $file, $filename, $mimes, $real_mime );
}
@ -6914,7 +6914,7 @@ function mysql_to_rfc3339( $date_string ) {
* 'image', or an arbitrary other context. If an arbitrary context is passed,
* the similarly arbitrary {@see '$context_memory_limit'} filter will be
* invoked. Default 'admin'.
* @return bool|int|string The limit that was set or false on failure.
* @return false|int|string The limit that was set or false on failure.
*/
function wp_raise_memory_limit( $context = 'admin' ) {
// Exit early if the limit cannot be changed.

View File

@ -39,7 +39,7 @@
* @see wp_kses_allowed_html()
* @since 1.2.0
*
* @var array[]|bool Array of default allowable HTML tags, or false to use the defaults.
* @var array[]|false Array of default allowable HTML tags, or false to use the defaults.
*/
if ( ! defined( 'CUSTOM_TAGS' ) ) {
define( 'CUSTOM_TAGS', false );
@ -1411,7 +1411,7 @@ function wp_kses_hair( $attr, $allowed_protocols ) {
* @since 4.2.3
*
* @param string $element HTML element.
* @return array|bool List of attributes found in the element. Returns false on failure.
* @return array|false List of attributes found in the element. Returns false on failure.
*/
function wp_kses_attr_parse( $element ) {
$valid = preg_match( '%^(<\s*)(/\s*)?([a-zA-Z0-9]+\s*)([^>]*)(>?)$%', $element, $matches );
@ -1462,7 +1462,7 @@ function wp_kses_attr_parse( $element ) {
* @since 4.2.3
*
* @param string $attr Attribute list from HTML element to closing HTML element tag.
* @return array|bool List of attributes found in $attr. Returns false on failure.
* @return array|false List of attributes found in $attr. Returns false on failure.
*/
function wp_kses_hair_parse( $attr ) {
if ( '' === $attr ) {

View File

@ -1201,7 +1201,7 @@ function _wp_get_image_size_from_meta( $size_name, $image_meta ) {
* width and height values in pixels (in that order). Default 'medium'.
* @param array $image_meta Optional. The image meta data as returned by 'wp_get_attachment_metadata()'.
* Default null.
* @return string|bool A 'srcset' value string or false.
* @return string|false A 'srcset' value string or false.
*/
function wp_get_attachment_image_srcset( $attachment_id, $size = 'medium', $image_meta = null ) {
$image = wp_get_attachment_image_src( $attachment_id, $size );
@ -1442,7 +1442,7 @@ function wp_calculate_image_srcset( $size_array, $image_src, $image_meta, $attac
* width and height values in pixels (in that order). Default 'medium'.
* @param array $image_meta Optional. The image meta data as returned by 'wp_get_attachment_metadata()'.
* Default null.
* @return string|bool A valid source size value for use in a 'sizes' attribute or false.
* @return string|false A valid source size value for use in a 'sizes' attribute or false.
*/
function wp_get_attachment_image_sizes( $attachment_id, $size = 'medium', $image_meta = null ) {
$image = wp_get_attachment_image_src( $attachment_id, $size );

View File

@ -771,11 +771,11 @@ function get_metadata_by_mid( $meta_type, $meta_id ) {
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param string $meta_type Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user',
* or any other object type with an associated meta table.
* @param int $meta_id ID for a specific meta row.
* @param string $meta_value Metadata value. Must be serializable if non-scalar.
* @param string $meta_key Optional. You can provide a meta key to update it. Default false.
* @param string $meta_type Type of object metadata is for. Accepts 'post', 'comment', 'term', 'user',
* or any other object type with an associated meta table.
* @param int $meta_id ID for a specific meta row.
* @param string $meta_value Metadata value. Must be serializable if non-scalar.
* @param string|false $meta_key Optional. You can provide a meta key to update it. Default false.
* @return bool True on successful update, false on failure.
*/
function update_metadata_by_mid( $meta_type, $meta_id, $meta_value, $meta_key = false ) {
@ -808,10 +808,10 @@ function update_metadata_by_mid( $meta_type, $meta_id, $meta_value, $meta_key =
*
* @since 5.0.0
*
* @param null|bool $check Whether to allow updating metadata for the given type.
* @param int $meta_id Meta ID.
* @param mixed $meta_value Meta value. Must be serializable if non-scalar.
* @param string|bool $meta_key Meta key, if provided.
* @param null|bool $check Whether to allow updating metadata for the given type.
* @param int $meta_id Meta ID.
* @param mixed $meta_value Meta value. Must be serializable if non-scalar.
* @param string|false $meta_key Meta key, if provided.
*/
$check = apply_filters( "update_{$meta_type}_metadata_by_mid", null, $meta_id, $meta_value, $meta_key );
if ( null !== $check ) {

View File

@ -928,13 +928,13 @@ function wpmu_signup_blog_notification( $domain, $path, $title, $user_login, $us
*
* @since MU (3.0.0)
*
* @param string|bool $domain Site domain.
* @param string $path Site path.
* @param string $title Site title.
* @param string $user_login User login name.
* @param string $user_email User email address.
* @param string $key Activation key created in wpmu_signup_blog().
* @param array $meta Signup meta data. By default, contains the requested privacy setting and lang_id.
* @param string|false $domain Site domain, or false to prevent the email from sending.
* @param string $path Site path.
* @param string $title Site title.
* @param string $user_login User login name.
* @param string $user_email User email address.
* @param string $key Activation key created in wpmu_signup_blog().
* @param array $meta Signup meta data. By default, contains the requested privacy setting and lang_id.
*/
if ( ! apply_filters( 'wpmu_signup_blog_notification', $domain, $path, $title, $user_login, $user_email, $key, $meta ) ) {
return false;
@ -1601,11 +1601,11 @@ function wpmu_welcome_notification( $blog_id, $user_id, $password, $title, $meta
*
* @since MU (3.0.0)
*
* @param int|bool $blog_id Site ID.
* @param int $user_id User ID of the site administrator.
* @param string $password User password, or "N/A" if the user account is not new.
* @param string $title Site title.
* @param array $meta Signup meta data. By default, contains the requested privacy setting and lang_id.
* @param int|false $blog_id Site ID, or false to prevent the email from sending.
* @param int $user_id User ID of the site administrator.
* @param string $password User password, or "N/A" if the user account is not new.
* @param string $title Site title.
* @param array $meta Signup meta data. By default, contains the requested privacy setting and lang_id.
*/
if ( ! apply_filters( 'wpmu_welcome_notification', $blog_id, $user_id, $password, $title, $meta ) ) {
return false;

View File

@ -668,7 +668,7 @@ function wp_validate_site_data( $errors, $data, $old_site = null ) {
* @type array $meta Custom site metadata $key => $value pairs to use.
* Default empty array.
* }
* @return bool|WP_Error True on success, or error object on failure.
* @return true|WP_Error True on success, or error object on failure.
*/
function wp_initialize_site( $site_id, array $args = array() ) {
global $wpdb, $wp_roles;
@ -799,7 +799,7 @@ function wp_initialize_site( $site_id, array $args = array() ) {
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param int|WP_Site $site_id Site ID or object.
* @return bool|WP_Error True on success, or error object on failure.
* @return true|WP_Error True on success, or error object on failure.
*/
function wp_uninitialize_site( $site_id ) {
global $wpdb;

View File

@ -33,7 +33,7 @@ require_once ABSPATH . WPINC . '/class-walker-nav-menu.php';
* @type string $container_id The ID that is applied to the container. Default empty.
* @type string $container_aria_label The aria-label attribute that is applied to the container
* when it's a nav element. Default empty.
* @type callable|bool $fallback_cb If the menu doesn't exist, a callback function will fire.
* @type callable|false $fallback_cb If the menu doesn't exist, a callback function will fire.
* Default is 'wp_page_menu'. Set to false for no fallback.
* @type string $before Text before the link markup. Default empty.
* @type string $after Text after the link markup. Default empty.

View File

@ -127,8 +127,8 @@ function add_filter( $tag, $function_to_add, $priority = 10, $accepted_args = 1
*
* @global WP_Hook[] $wp_filter Stores all of the filters and actions.
*
* @param string $tag The name of the filter hook.
* @param callable|bool $function_to_check Optional. The callback to check for. Default false.
* @param string $tag The name of the filter hook.
* @param callable|false $function_to_check Optional. The callback to check for. Default false.
* @return false|int If $function_to_check is omitted, returns boolean for whether the hook has
* anything registered. When checking a specific function, the priority of that
* hook is returned, or false if the function is not attached. When using the
@ -300,8 +300,8 @@ function remove_filter( $tag, $function_to_remove, $priority = 10 ) {
*
* @global WP_Hook[] $wp_filter Stores all of the filters and actions.
*
* @param string $tag The filter to remove hooks from.
* @param int|bool $priority Optional. The priority number to remove. Default false.
* @param string $tag The filter to remove hooks from.
* @param int|false $priority Optional. The priority number to remove. Default false.
* @return true True when finished.
*/
function remove_all_filters( $tag, $priority = false ) {
@ -560,8 +560,8 @@ function do_action_ref_array( $tag, $args ) {
*
* @see has_filter() has_action() is an alias of has_filter().
*
* @param string $tag The name of the action hook.
* @param callable|bool $function_to_check Optional. The callback to check for. Default false.
* @param string $tag The name of the action hook.
* @param callable|false $function_to_check Optional. The callback to check for. Default false.
* @return bool|int If $function_to_check is omitted, returns boolean for whether the hook has
* anything registered. When checking a specific function, the priority of that
* hook is returned, or false if the function is not attached. When using the
@ -596,8 +596,8 @@ function remove_action( $tag, $function_to_remove, $priority = 10 ) {
*
* @since 2.7.0
*
* @param string $tag The action to remove hooks from.
* @param int|bool $priority The priority number to remove them from. Default false.
* @param string $tag The action to remove hooks from.
* @param int|false $priority The priority number to remove them from. Default false.
* @return true True when finished.
*/
function remove_all_actions( $tag, $priority = false ) {

View File

@ -1645,7 +1645,7 @@ function wp_get_attachment_link( $id = 0, $size = 'thumbnail', $permalink = fals
* an array of width and height values in pixels (in that order).
* @param bool $permalink Whether to add permalink to image. Default false.
* @param bool $icon Whether to include an icon.
* @param string|bool $text If string, will be link text.
* @param string|false $text If string, will be link text.
* @param array|string $attr Array or string of attributes.
*/
return apply_filters( 'wp_get_attachment_link', "<a href='" . esc_url( $url ) . "'>$link_text</a>", $id, $size, $permalink, $icon, $text, $attr );

View File

@ -1476,7 +1476,7 @@ function register_post_type( $post_type, $args = array() ) {
* @global array $wp_post_types List of post types.
*
* @param string $post_type Post type to unregister.
* @return bool|WP_Error True on success, WP_Error on failure or if the post type doesn't exist.
* @return true|WP_Error True on success, WP_Error on failure or if the post type doesn't exist.
*/
function unregister_post_type( $post_type ) {
global $wp_post_types;
@ -5060,7 +5060,7 @@ function get_enclosed( $post_id ) {
* @since 4.7.0 `$post_id` can be a WP_Post object.
*
* @param int|WP_Post $post_id Post ID or object.
* @return bool|string[] Array of URLs already pinged for the given post, false if the post is not found.
* @return false|string[] Array of URLs already pinged for the given post, false if the post is not found.
*/
function get_pung( $post_id ) {
$post = get_post( $post_id );
@ -6116,7 +6116,7 @@ function wp_get_attachment_metadata( $attachment_id = 0, $unfiltered = false ) {
*
* @param int $attachment_id Attachment post ID.
* @param array $data Attachment meta data.
* @return int|bool False if $post is invalid.
* @return int|false False if $post is invalid.
*/
function wp_update_attachment_metadata( $attachment_id, $data ) {
$attachment_id = (int) $attachment_id;

View File

@ -1186,7 +1186,7 @@ function setup_postdata( $post ) {
* @global WP_Query $wp_query WordPress Query object.
*
* @param WP_Post|object|int $post WP_Post instance or Post ID/object.
* @return array|bool Elements of post, or false on failure.
* @return array|false Elements of post, or false on failure.
*/
function generate_postdata( $post ) {
global $wp_query;

View File

@ -855,7 +855,7 @@ class WP_REST_Request implements ArrayAccess {
*
* @since 4.4.0
*
* @return bool|WP_Error True if there are no parameters to validate or if all pass validation,
* @return true|WP_Error True if there are no parameters to validate or if all pass validation,
* WP_Error if required parameters are missing.
*/
public function has_valid_params() {

View File

@ -1203,7 +1203,7 @@ class WP_REST_Server {
*
* @since 4.4.0
*
* @return bool|string Boolean false or string error message.
* @return false|string Boolean false or string error message.
*/
protected function get_json_last_error() {
$last_error_code = json_last_error();

View File

@ -50,7 +50,7 @@ class WP_REST_Block_Directory_Controller extends WP_REST_Controller {
*
* @param WP_REST_Request $request Full details about the request.
*
* @return WP_Error|bool True if the request has permission, WP_Error object otherwise.
* @return WP_Error|true True if the request has permission, WP_Error object otherwise.
*/
public function get_items_permissions_check( $request ) {
if ( ! current_user_can( 'install_plugins' ) || ! current_user_can( 'activate_plugins' ) ) {

View File

@ -114,7 +114,7 @@ class WP_REST_Block_Types_Controller extends WP_REST_Controller {
* @since 5.5.0
*
* @param WP_REST_Request $request Full details about the request.
* @return WP_Error|bool True if the request has read access, WP_Error object otherwise.
* @return WP_Error|true True if the request has read access, WP_Error object otherwise.
*/
public function get_items_permissions_check( $request ) {
return $this->check_read_permission();
@ -160,7 +160,7 @@ class WP_REST_Block_Types_Controller extends WP_REST_Controller {
* @since 5.5.0
*
* @param WP_REST_Request $request Full details about the request.
* @return WP_Error|bool True if the request has read access for the item, WP_Error object otherwise.
* @return WP_Error|true True if the request has read access for the item, WP_Error object otherwise.
*/
public function get_item_permissions_check( $request ) {
$check = $this->check_read_permission();
@ -181,7 +181,7 @@ class WP_REST_Block_Types_Controller extends WP_REST_Controller {
*
* @since 5.5.0
*
* @return WP_Error|bool True if the block type is visible, WP_Error otherwise.
* @return WP_Error|true True if the block type is visible, WP_Error otherwise.
*/
protected function check_read_permission() {
if ( current_user_can( 'edit_posts' ) ) {

View File

@ -443,7 +443,7 @@ abstract class WP_REST_Controller {
*
* @param object $object Data model like WP_Term or WP_Post.
* @param WP_REST_Request $request Full details about the request.
* @return bool|WP_Error True on success, WP_Error object if a field cannot be updated.
* @return true|WP_Error True on success, WP_Error object if a field cannot be updated.
*/
protected function update_additional_fields_for_object( $object, $request ) {
$additional_fields = $this->get_additional_fields();

View File

@ -426,7 +426,7 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
* @since 4.7.0
*
* @param WP_REST_Request $request Full details about the request.
* @return bool|WP_Error True if the request has read access for the item, WP_Error object otherwise.
* @return true|WP_Error True if the request has read access for the item, WP_Error object otherwise.
*/
public function get_item_permissions_check( $request ) {
$post = $this->get_post( $request['id'] );

View File

@ -362,7 +362,7 @@ class WP_REST_Revisions_Controller extends WP_REST_Controller {
* @since 4.7.0
*
* @param WP_REST_Request $request Full details about the request.
* @return bool|WP_Error True if the request has read access for the item, WP_Error object otherwise.
* @return true|WP_Error True if the request has read access for the item, WP_Error object otherwise.
*/
public function get_item_permissions_check( $request ) {
return $this->get_items_permissions_check( $request );
@ -397,7 +397,7 @@ class WP_REST_Revisions_Controller extends WP_REST_Controller {
* @since 4.7.0
*
* @param WP_REST_Request $request Full details about the request.
* @return bool|WP_Error True if the request has access to delete the item, WP_Error object otherwise.
* @return true|WP_Error True if the request has access to delete the item, WP_Error object otherwise.
*/
public function delete_item_permissions_check( $request ) {
$parent = $this->get_parent( $request['parent'] );

View File

@ -140,7 +140,7 @@ class WP_REST_Terms_Controller extends WP_REST_Controller {
* @since 4.7.0
*
* @param WP_REST_Request $request Full details about the request.
* @return bool|WP_Error True if the request has read access, otherwise false or WP_Error object.
* @return true|WP_Error True if the request has read access, otherwise false or WP_Error object.
*/
public function get_items_permissions_check( $request ) {
$tax_obj = get_taxonomy( $this->taxonomy );
@ -347,7 +347,7 @@ class WP_REST_Terms_Controller extends WP_REST_Controller {
* @since 4.7.0
*
* @param WP_REST_Request $request Full details about the request.
* @return bool|WP_Error True if the request has read access for the item, otherwise false or WP_Error object.
* @return true|WP_Error True if the request has read access for the item, otherwise false or WP_Error object.
*/
public function get_item_permissions_check( $request ) {
$term = $this->get_term( $request['id'] );
@ -392,7 +392,7 @@ class WP_REST_Terms_Controller extends WP_REST_Controller {
* @since 4.7.0
*
* @param WP_REST_Request $request Full details about the request.
* @return bool|WP_Error True if the request has access to create items, false or WP_Error object otherwise.
* @return true|WP_Error True if the request has access to create items, false or WP_Error object otherwise.
*/
public function create_item_permissions_check( $request ) {
@ -528,7 +528,7 @@ class WP_REST_Terms_Controller extends WP_REST_Controller {
* @since 4.7.0
*
* @param WP_REST_Request $request Full details about the request.
* @return bool|WP_Error True if the request has access to update the item, false or WP_Error object otherwise.
* @return true|WP_Error True if the request has access to update the item, false or WP_Error object otherwise.
*/
public function update_item_permissions_check( $request ) {
$term = $this->get_term( $request['id'] );
@ -629,7 +629,7 @@ class WP_REST_Terms_Controller extends WP_REST_Controller {
* @since 4.7.0
*
* @param WP_REST_Request $request Full details about the request.
* @return bool|WP_Error True if the request has access to delete the item, otherwise false or WP_Error object.
* @return true|WP_Error True if the request has access to delete the item, otherwise false or WP_Error object.
*/
public function delete_item_permissions_check( $request ) {
$term = $this->get_term( $request['id'] );

View File

@ -213,7 +213,7 @@ abstract class WP_REST_Meta_Fields {
* @param int $object_id Object ID the field belongs to.
* @param string $meta_key Key for the field.
* @param string $name Name for the field that is exposed in the REST API.
* @return bool|WP_Error True if meta field is deleted, WP_Error otherwise.
* @return true|WP_Error True if meta field is deleted, WP_Error otherwise.
*/
protected function delete_meta_value( $object_id, $meta_key, $name ) {
$meta_type = $this->get_meta_type();
@ -255,7 +255,7 @@ abstract class WP_REST_Meta_Fields {
* @param string $meta_key Key for the custom field.
* @param string $name Name for the field that is exposed in the REST API.
* @param array $values List of values to update to.
* @return bool|WP_Error True if meta fields are updated, WP_Error otherwise.
* @return true|WP_Error True if meta fields are updated, WP_Error otherwise.
*/
protected function update_multi_meta_value( $object_id, $meta_key, $name, $values ) {
$meta_type = $this->get_meta_type();
@ -350,7 +350,7 @@ abstract class WP_REST_Meta_Fields {
* @param string $meta_key Key for the custom field.
* @param string $name Name for the field that is exposed in the REST API.
* @param mixed $value Updated value.
* @return bool|WP_Error True if the meta field was updated, WP_Error otherwise.
* @return true|WP_Error True if the meta field was updated, WP_Error otherwise.
*/
protected function update_meta_value( $object_id, $meta_key, $name, $value ) {
$meta_type = $this->get_meta_type();

View File

@ -404,7 +404,7 @@ if ( !function_exists('fetch_rss') ) :
* @subpackage MagpieRSS
*
* @param string $url URL to retrieve feed
* @return bool|MagpieRSS false on failure or MagpieRSS object on success.
* @return false|MagpieRSS false on failure or MagpieRSS object on success.
*/
function fetch_rss ($url) {
// initialize constants

View File

@ -487,7 +487,7 @@ function register_taxonomy( $taxonomy, $object_type, $args = array() ) {
* @global array $wp_taxonomies List of taxonomies.
*
* @param string $taxonomy Taxonomy name.
* @return bool|WP_Error True on success, WP_Error on failure or if the taxonomy doesn't exist.
* @return true|WP_Error True on success, WP_Error on failure or if the taxonomy doesn't exist.
*/
function unregister_taxonomy( $taxonomy ) {
if ( ! taxonomy_exists( $taxonomy ) ) {

View File

@ -2492,7 +2492,7 @@ function get_theme_starter_content() {
* 'disable-custom-font-sizes', 'editor-color-palette', 'editor-font-sizes',
* 'editor-styles', 'wp-block-styles', and 'core-block-patterns'.
* @param mixed ...$args Optional extra arguments to pass along with certain features.
* @return void|bool False on failure, void otherwise.
* @return void|false False on failure, void otherwise.
*/
function add_theme_support( $feature, ...$args ) {
global $_wp_theme_features;

View File

@ -449,8 +449,8 @@ function wp_authenticate_application_password( $input_user, $username, $password
*
* @since 5.6.0
*
* @param int|bool $input_user User ID if one has been determined, false otherwise.
* @return int|bool The authenticated user ID if successful, false otherwise.
* @param int|false $input_user User ID if one has been determined, false otherwise.
* @return int|false The authenticated user ID if successful, false otherwise.
*/
function wp_validate_application_password( $input_user ) {
// Don't authenticate twice.
@ -515,8 +515,8 @@ function wp_authenticate_spam_check( $user ) {
*
* @since 3.9.0
*
* @param int|bool $user_id The user ID (or false) as received from
* the `determine_current_user` filter.
* @param int|false $user_id The user ID (or false) as received from
* the `determine_current_user` filter.
* @return int|false User ID if validated, false otherwise. If a user ID from
* an earlier filter callback is received, that value is returned.
*/
@ -2978,7 +2978,7 @@ function _wp_get_current_user() {
*
* @since 3.9.0
*
* @param int|bool $user_id User ID if one has been determined, false otherwise.
* @param int|false $user_id User ID if one has been determined, false otherwise.
*/
$user_id = apply_filters( 'determine_current_user', false );
if ( ! $user_id ) {
@ -3866,7 +3866,7 @@ function wp_user_request_action_description( $action_name ) {
* @since 4.9.6
*
* @param string $request_id ID of the request created via wp_create_user_request().
* @return bool|WP_Error True on success, `WP_Error` on failure.
* @return true|WP_Error True on success, `WP_Error` on failure.
*/
function wp_send_user_request( $request_id ) {
$request_id = absint( $request_id );
@ -4050,7 +4050,7 @@ function wp_generate_user_request_key( $request_id ) {
*
* @param string $request_id ID of the request being confirmed.
* @param string $key Provided key to validate.
* @return bool|WP_Error True on success, WP_Error on failure.
* @return true|WP_Error True on success, WP_Error on failure.
*/
function wp_validate_user_request_key( $request_id, $key ) {
global $wp_hasher;

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.7-alpha-49926';
$wp_version = '5.7-alpha-49927';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.