Docs: Update @return tag for wp_allow_comment() with trash as a possible return value.

Props oakesjosh, jeremyfelt.
Fixes #49206.
Built from https://develop.svn.wordpress.org/trunk@47286


git-svn-id: http://core.svn.wordpress.org/trunk@47086 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2020-02-13 17:50:05 +00:00
parent 57ba9a2906
commit f7338b347d
2 changed files with 7 additions and 7 deletions

View File

@ -651,7 +651,7 @@ function sanitize_comment_cookies() {
* @param bool $avoid_die When true, a disallowed comment will result in the function
* returning a WP_Error object, rather than executing wp_die().
* Default false.
* @return int|string|WP_Error Allowed comments return the approval status (0|1|'spam').
* @return int|string|WP_Error Allowed comments return the approval status (0|1|'spam'|'trash').
* If `$avoid_die` is true, disallowed comments return a WP_Error.
*/
function wp_allow_comment( $commentdata, $avoid_die = false ) {
@ -817,14 +817,14 @@ function wp_allow_comment( $commentdata, $avoid_die = false ) {
* Filters a comment's approval status before it is set.
*
* @since 2.1.0
* @since 4.9.0 Returning a WP_Error value from the filter will shortcircuit comment insertion and
* allow skipping further processing.
* @since 4.9.0 Returning a WP_Error value from the filter will shortcircuit comment insertion
* and allow skipping further processing.
*
* @param int|string|WP_Error $approved The approval status. Accepts 1, 0, 'spam' or WP_Error.
* @param int|string|WP_Error $approved The approval status. Accepts 1, 0, 'spam', 'trash',
* or WP_Error.
* @param array $commentdata Comment data.
*/
$approved = apply_filters( 'pre_comment_approved', $approved, $commentdata );
return $approved;
return apply_filters( 'pre_comment_approved', $approved, $commentdata );
}
/**

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.4-beta1-47285';
$wp_version = '5.4-beta1-47286';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.