WordPress.org

Make WordPress Core

Changeset 42720


Ignore:
Timestamp:
02/19/2018 09:45:03 PM (2 years ago)
Author:
SergeyBiryukov
Message:

Docs: Correct documentation for Heartbeat filters.

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

See #42777, #42505.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/ajax-actions.php

    r42717 r42720  
    3838         * @since 3.6.0
    3939         *
    40          * @param array|object $response  The no-priv Heartbeat response object or array.
    41          * @param array        $data      An array of data passed via $_POST.
    42          * @param string       $screen_id The screen id.
     40         * @param array  $response  The no-priv Heartbeat response.
     41         * @param array  $data      The $_POST data sent.
     42         * @param string $screen_id The screen id.
    4343         */
    4444        $response = apply_filters( 'heartbeat_nopriv_received', $response, $data, $screen_id );
     
    4646
    4747    /**
    48      * Filters Heartbeat Ajax response when no data is passed.
     48     * Filters Heartbeat Ajax response in no-privilege environments when no data is passed.
    4949     *
    5050     * @since 3.6.0
    5151     *
    52      * @param array|object $response  The Heartbeat response object or array.
    53      * @param string       $screen_id The screen id.
     52     * @param array  $response  The no-priv Heartbeat response.
     53     * @param string $screen_id The screen id.
    5454     */
    5555    $response = apply_filters( 'heartbeat_nopriv_send', $response, $screen_id );
     
    6262     * @since 3.6.0
    6363     *
    64      * @param array|object $response  The no-priv Heartbeat response.
    65      * @param string       $screen_id The screen id.
     64     * @param array  $response  The no-priv Heartbeat response.
     65     * @param string $screen_id The screen id.
    6666     */
    6767    do_action( 'heartbeat_nopriv_tick', $response, $screen_id );
     
    30273027    if ( 1 !== $nonce_state ) {
    30283028        /**
    3029          * Filters the nonces to send to the editor.
     3029         * Filters the nonces to send to the New/Edit Post screen.
    30303030         *
    30313031         * @since 4.3.0
    30323032         *
    3033          * @param array|object $response  The no-priv Heartbeat response object or array.
    3034          * @param array        $data      An array of data passed via $_POST.
    3035          * @param string       $screen_id The screen id.
     3033         * @param array  $response  The Heartbeat response.
     3034         * @param array  $data      The $_POST data sent.
     3035         * @param string $screen_id The screen id.
    30363036         */
    30373037        $response = apply_filters( 'wp_refresh_nonces', $response, $data, $screen_id );
Note: See TracChangeset for help on using the changeset viewer.