Making WordPress.org


Ignore:
Timestamp:
04/02/2020 02:23:28 AM (4 years ago)
Author:
dd32
Message:

Plugin Directory: Add audit log entries for plugin committer/support reps addition/removal.

Fixes #2717.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/api/routes/class-plugin-self-close.php

    r9674 r9682  
    7474
    7575        // Add an audit-log entry as to why this has happened.
    76         $user = wp_get_current_user();
    77         wp_insert_comment( [
    78             'comment_author'       => $user->display_name,
    79             'comment_author_email' => $user->user_email,
    80             'comment_author_url'   => $user->user_url,
    81             'comment_type'         => 'internal-note',
    82             'comment_post_ID'      => $plugin->ID,
    83             'user_id'              => get_current_user_id(),
    84             'comment_content'      => sprintf( 'Plugin closed. Reason: Author Self-close Request from %s', $_SERVER['REMOTE_ADDR'] ),
    85         ] );
     76        Tools::audit_log(
     77            $plugin,
     78            sprintf( 'Plugin closed. Reason: Author Self-close Request from %s', $_SERVER['REMOTE_ADDR'] )
     79        );
    8680
    8781        // Email all Plugin Committers.
Note: See TracChangeset for help on using the changeset viewer.