[wp-trac] [WordPress Trac] #14520: Introduce edit_comment meta cap

WordPress Trac wp-trac at lists.automattic.com
Thu Sep 29 14:10:31 UTC 2011


#14520: Introduce edit_comment meta cap
------------------------------+---------------------
 Reporter:  scribu            |       Owner:
     Type:  enhancement       |      Status:  closed
 Priority:  normal            |   Milestone:  3.1
Component:  Comments          |     Version:
 Severity:  normal            |  Resolution:  fixed
 Keywords:  has-patch commit  |
------------------------------+---------------------

Comment (by nestor_at_mash):

 Hi all,
 The edit_comment capability has not been defined on wp-
 admin\includes\schema.php
 I think, something like the following should be added to schema.php:
 populate_roles_310(){

         $roles = array('administrator', 'editor', 'author',
 'contributor');
         foreach ($roles as $role) {
                 $role =& get_role($role);
                 if ( empty($role) )
                         continue;

                 $role->add_cap( 'edit_comment' );
         }

 }

 and add the line:
         populate_roles_310();
 to the populate_roles() function



 Note: I couldn't decide to reopen this ticket or start a new one ... so I
 am just adding this comment here in hopes that the author of this fix can
 implement this.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/14520#comment:13>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list