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:
parent
57ba9a2906
commit
f7338b347d
|
@ -651,7 +651,7 @@ function sanitize_comment_cookies() {
|
||||||
* @param bool $avoid_die When true, a disallowed comment will result in the function
|
* @param bool $avoid_die When true, a disallowed comment will result in the function
|
||||||
* returning a WP_Error object, rather than executing wp_die().
|
* returning a WP_Error object, rather than executing wp_die().
|
||||||
* Default false.
|
* 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.
|
* If `$avoid_die` is true, disallowed comments return a WP_Error.
|
||||||
*/
|
*/
|
||||||
function wp_allow_comment( $commentdata, $avoid_die = false ) {
|
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.
|
* Filters a comment's approval status before it is set.
|
||||||
*
|
*
|
||||||
* @since 2.1.0
|
* @since 2.1.0
|
||||||
* @since 4.9.0 Returning a WP_Error value from the filter will shortcircuit comment insertion and
|
* @since 4.9.0 Returning a WP_Error value from the filter will shortcircuit comment insertion
|
||||||
* allow skipping further processing.
|
* 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.
|
* @param array $commentdata Comment data.
|
||||||
*/
|
*/
|
||||||
$approved = apply_filters( 'pre_comment_approved', $approved, $commentdata );
|
return apply_filters( 'pre_comment_approved', $approved, $commentdata );
|
||||||
return $approved;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue