Docs: Correct documentation for Heartbeat filters.

`$response` parameter is documented as an array or object, but only array is actually supported.

See #42777, #42505.
Built from https://develop.svn.wordpress.org/trunk@42720


git-svn-id: http://core.svn.wordpress.org/trunk@42548 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2018-02-19 21:46:33 +00:00
parent e6ccdf161f
commit dcf5eb07de
2 changed files with 13 additions and 13 deletions

View File

@ -37,20 +37,20 @@ function wp_ajax_nopriv_heartbeat() {
* *
* @since 3.6.0 * @since 3.6.0
* *
* @param array|object $response The no-priv Heartbeat response object or array. * @param array $response The no-priv Heartbeat response.
* @param array $data An array of data passed via $_POST. * @param array $data The $_POST data sent.
* @param string $screen_id The screen id. * @param string $screen_id The screen id.
*/ */
$response = apply_filters( 'heartbeat_nopriv_received', $response, $data, $screen_id ); $response = apply_filters( 'heartbeat_nopriv_received', $response, $data, $screen_id );
} }
/** /**
* Filters Heartbeat Ajax response when no data is passed. * Filters Heartbeat Ajax response in no-privilege environments when no data is passed.
* *
* @since 3.6.0 * @since 3.6.0
* *
* @param array|object $response The Heartbeat response object or array. * @param array $response The no-priv Heartbeat response.
* @param string $screen_id The screen id. * @param string $screen_id The screen id.
*/ */
$response = apply_filters( 'heartbeat_nopriv_send', $response, $screen_id ); $response = apply_filters( 'heartbeat_nopriv_send', $response, $screen_id );
@ -61,8 +61,8 @@ function wp_ajax_nopriv_heartbeat() {
* *
* @since 3.6.0 * @since 3.6.0
* *
* @param array|object $response The no-priv Heartbeat response. * @param array $response The no-priv Heartbeat response.
* @param string $screen_id The screen id. * @param string $screen_id The screen id.
*/ */
do_action( 'heartbeat_nopriv_tick', $response, $screen_id ); do_action( 'heartbeat_nopriv_tick', $response, $screen_id );
@ -3026,13 +3026,13 @@ function wp_ajax_heartbeat() {
if ( 1 !== $nonce_state ) { if ( 1 !== $nonce_state ) {
/** /**
* Filters the nonces to send to the editor. * Filters the nonces to send to the New/Edit Post screen.
* *
* @since 4.3.0 * @since 4.3.0
* *
* @param array|object $response The no-priv Heartbeat response object or array. * @param array $response The Heartbeat response.
* @param array $data An array of data passed via $_POST. * @param array $data The $_POST data sent.
* @param string $screen_id The screen id. * @param string $screen_id The screen id.
*/ */
$response = apply_filters( 'wp_refresh_nonces', $response, $data, $screen_id ); $response = apply_filters( 'wp_refresh_nonces', $response, $data, $screen_id );

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.0-alpha-42719'; $wp_version = '5.0-alpha-42720';
/** /**
* 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.