Make WordPress Core

Ticket #23148: 23148.2.diff

File 23148.2.diff, 669 bytes (added by costdev, 3 years ago)

Patch refreshed against trunk and a docblock added.

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

    diff --git a/src/wp-admin/includes/ajax-actions.php b/src/wp-admin/includes/ajax-actions.php
    index 995433eaba..2fd1662800 100644
    a b function wp_ajax_save_attachment() { 
    31443144                wp_delete_post( $id );
    31453145        } else {
    31463146                wp_update_post( $post );
     3147
     3148                /**
     3149                 * Fires after an attachment has been updated and before
     3150                 * the JSON response is sent.
     3151                 *
     3152                 * @since 6.2.0
     3153                 *
     3154                 * @param array $post    The attachment.
     3155                 * @param array $changes An array of changes.
     3156                 */
     3157                do_action( 'wp_ajax_save_attachment', $post, $changes );
    31473158        }
    31483159
    31493160        wp_send_json_success();