From aaa61e80e4f605e45499a0eb591e8a34331d21c8 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Sat, 9 Jan 2016 01:36:45 +0000 Subject: [PATCH] Docs: Correct the parameter docs for various Heartbeat filters and functions. See #32246 git-svn-id: https://develop.svn.wordpress.org/trunk@36231 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/ajax-actions.php | 14 +++++++------- src/wp-admin/includes/misc.php | 19 +++++++++++++++++++ 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/src/wp-admin/includes/ajax-actions.php b/src/wp-admin/includes/ajax-actions.php index 29a11fc235..ec3e1e1057 100644 --- a/src/wp-admin/includes/ajax-actions.php +++ b/src/wp-admin/includes/ajax-actions.php @@ -2706,9 +2706,9 @@ function wp_ajax_heartbeat() { * * @since 3.6.0 * - * @param array|object $response The Heartbeat response object or array. - * @param array $data The $_POST data sent. - * @param string $screen_id The screen id. + * @param array $response The Heartbeat response. + * @param array $data The $_POST data sent. + * @param string $screen_id The screen id. */ $response = apply_filters( 'heartbeat_received', $response, $data, $screen_id ); } @@ -2718,8 +2718,8 @@ function wp_ajax_heartbeat() { * * @since 3.6.0 * - * @param array|object $response The Heartbeat response object or array. - * @param string $screen_id The screen id. + * @param array $response The Heartbeat response. + * @param string $screen_id The screen id. */ $response = apply_filters( 'heartbeat_send', $response, $screen_id ); @@ -2730,8 +2730,8 @@ function wp_ajax_heartbeat() { * * @since 3.6.0 * - * @param array|object $response The Heartbeat response object or array. - * @param string $screen_id The screen id. + * @param array $response The Heartbeat response. + * @param string $screen_id The screen id. */ do_action( 'heartbeat_tick', $response, $screen_id ); diff --git a/src/wp-admin/includes/misc.php b/src/wp-admin/includes/misc.php index d3d2d34279..9d54243975 100644 --- a/src/wp-admin/includes/misc.php +++ b/src/wp-admin/includes/misc.php @@ -729,6 +729,11 @@ function _ipad_meta() { * Check lock status for posts displayed on the Posts screen * * @since 3.6.0 + * + * @param array $response The Heartbeat response. + * @param array $data The $_POST data sent. + * @param string $screen_id The screen id. + * @return array The Heartbeat response. */ function wp_check_locked_posts( $response, $data, $screen_id ) { $checked = array(); @@ -759,6 +764,11 @@ function wp_check_locked_posts( $response, $data, $screen_id ) { * Check lock status on the New/Edit Post screen and refresh the lock * * @since 3.6.0 + * + * @param array $response The Heartbeat response. + * @param array $data The $_POST data sent. + * @param string $screen_id The screen id. + * @return array The Heartbeat response. */ function wp_refresh_post_lock( $response, $data, $screen_id ) { if ( array_key_exists( 'wp-refresh-post-lock', $data ) ) { @@ -797,6 +807,11 @@ function wp_refresh_post_lock( $response, $data, $screen_id ) { * Check nonce expiration on the New/Edit Post screen and refresh if needed * * @since 3.6.0 + * + * @param array $response The Heartbeat response. + * @param array $data The $_POST data sent. + * @param string $screen_id The screen id. + * @return array The Heartbeat response. */ function wp_refresh_post_nonces( $response, $data, $screen_id ) { if ( array_key_exists( 'wp-refresh-post-nonces', $data ) ) { @@ -850,6 +865,10 @@ function wp_heartbeat_set_suspension( $settings ) { * Autosave with heartbeat * * @since 3.9.0 + * + * @param array $response The Heartbeat response. + * @param array $data The $_POST data sent. + * @return array The Heartbeat response. */ function heartbeat_autosave( $response, $data ) { if ( ! empty( $data['wp_autosave'] ) ) {