Changeset 3513 for trunk/wp-admin/upgrade-schema.php
- Timestamp:
- 02/11/2006 09:56:02 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/upgrade-schema.php
r3510 r3513 245 245 246 246 function populate_roles() { 247 populate_roles_160(); 247 populate_roles_160(); 248 populate_roles_210(); 248 249 } 249 250 … … 337 338 } 338 339 340 function populate_roles_210() { 341 $roles = array('administrator', 'editor'); 342 foreach ($roles as $role) { 343 $role = get_role($role); 344 if ( empty($role) ) 345 continue; 346 347 $role->add_cap('edit_others_pages'); 348 $role->add_cap('edit_published_pages'); 349 $role->add_cap('publish_pages'); 350 $role->add_cap('delete_pages'); 351 $role->add_cap('delete_others_pages'); 352 $role->add_cap('delete_published_pages'); 353 $role->add_cap('delete_posts'); 354 $role->add_cap('delete_others_posts'); 355 $role->add_cap('delete_published_posts'); 356 } 357 358 $role = get_role('author'); 359 if ( ! empty($role) ) { 360 $role->add_cap('delete_posts'); 361 $role->add_cap('delete_published_posts'); 362 } 363 364 $role = get_role('contributor'); 365 if ( ! empty($role) ) { 366 $role->add_cap('delete_posts'); 367 } 368 } 369 339 370 ?>
Note: See TracChangeset
for help on using the changeset viewer.