Making WordPress.org


Ignore:
Timestamp:
05/13/2016 04:29:38 PM (9 years ago)
Author:
obenland
Message:

Plugin Directory: Give authors/committers a role on the site.

Disabled until capabilities have been properly reviewed.

See https://wordpress.slack.com/archives/meta/p1463104152001314
See #1571.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/cli/class-import.php

    r3019 r3129  
    116116        update_post_meta( $plugin->ID, 'assets_banners_color', wp_slash( $banner_average_color ) );
    117117
     118        // Give committers a role on this site.
     119        foreach ( Tools::get_plugin_committers( $plugin_slug ) as $committer ) {
     120            // @todo: Enable.
     121            continue;
     122            $user = get_user_by( 'slug', $committer );
     123
     124            if ( ! user_can( $user, 'plugin_dashboard_access' ) ) {
     125                $user->add_role( 'plugin_committer' );
     126            }
     127        }
    118128    }
    119129
Note: See TracChangeset for help on using the changeset viewer.