WordPress.org

Making WordPress.org

Changeset 3029


Ignore:
Timestamp:
04/27/2016 10:55:35 PM (3 years ago)
Author:
obenland
Message:

Plugin Directory: Promote authors without a role.

Gives authors access to manage their plugin(s) if they don't have that already.

See #1570, #1571.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/class-status-transitions.php

    r3026 r3029  
    108108        Tools::grant_plugin_committer( $post->post_name, $plugin_author );
    109109
     110        // Promote author if they don't have access yet.
     111        if ( ! user_can( $plugin_author, 'plugin_dashboard_access' ) ) {
     112            $plugin_author->add_role( 'plugin_committer' );
     113        }
     114
    110115        // Send email.
    111116        $subject = sprintf( __( '[WordPress Plugins] %s has been approved!', 'wporg-plugins' ), $post->post_title );
Note: See TracChangeset for help on using the changeset viewer.