mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
Comments: Pass comment data to the comment_post
filter.
Props dshanske. See #34141. Built from https://develop.svn.wordpress.org/trunk@36660 git-svn-id: http://core.svn.wordpress.org/trunk@36627 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ab0eb71d21
commit
74f707ff6b
@ -1812,11 +1812,13 @@ function wp_new_comment( $commentdata ) {
|
|||||||
* Fires immediately after a comment is inserted into the database.
|
* Fires immediately after a comment is inserted into the database.
|
||||||
*
|
*
|
||||||
* @since 1.2.0
|
* @since 1.2.0
|
||||||
|
* @since 4.5.0 The `$commentdata` parameter was added.
|
||||||
*
|
*
|
||||||
* @param int $comment_ID The comment ID.
|
* @param int $comment_ID The comment ID.
|
||||||
* @param int|string $comment_approved 1 if the comment is approved, 0 if not, 'spam' if spam.
|
* @param int|string $comment_approved 1 if the comment is approved, 0 if not, 'spam' if spam.
|
||||||
|
* @param array $commentdata Comment data.
|
||||||
*/
|
*/
|
||||||
do_action( 'comment_post', $comment_ID, $commentdata['comment_approved'] );
|
do_action( 'comment_post', $comment_ID, $commentdata['comment_approved'], $commentdata );
|
||||||
|
|
||||||
return $comment_ID;
|
return $comment_ID;
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.5-alpha-36659';
|
$wp_version = '4.5-alpha-36660';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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
Block a user