WordPress.org

Make WordPress Core

Ticket #42777: #42777-wp_refresh_nonces-docs.patch

File #42777-wp_refresh_nonces-docs.patch, 1.0 KB (added by slushman, 2 years ago)

Adds PHPDocs to the wp_refresh_nonces filter.

  • wp-admin/includes/ajax-actions.php

    From 2664528361c688a757e88c83bb4e5733a2d63d39 Mon Sep 17 00:00:00 2001
    From: Chris Wilcoxson <chris@slushman.com>
    Date: Sun, 3 Dec 2017 11:44:47 -0600
    Subject: [PATCH] Adds PHPDocs documentation to the wp_refresh_nonces filter.
    
    ---
     wp-admin/includes/ajax-actions.php | 10 ++++++++++
     1 file changed, 10 insertions(+)
    
    diff --git a/wp-admin/includes/ajax-actions.php b/wp-admin/includes/ajax-actions.php
    index e05ec0a273..ca112fe2e0 100644
    a b function wp_ajax_heartbeat() { 
    30883088        }
    30893089
    30903090        if ( 1 !== $nonce_state ) {
     3091
     3092                /**
     3093                 * Filters the nonces to send to the editor.
     3094                 *
     3095                 * @since 4.3.0
     3096                 *
     3097                 * @param array|object $response The no-priv Heartbeat response object or array.
     3098                 * @param array $data An array of data passed via $_POST.
     3099                 * @param string $screen_id The screen id.
     3100                 */
    30913101                $response = apply_filters( 'wp_refresh_nonces', $response, $data, $screen_id );
    30923102
    30933103                if ( false === $nonce_state ) {