wpseo_add_capabilities

Add the bulk edit capability to the proper default roles.

Description

wpseo_add_capabilities(); 

Usage

  1. if ( !function_exists( 'wpseo_add_capabilities' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'yoast-seo/inc/wpseo-functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = wpseo_add_capabilities(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/inc/wpseo-functions.php  
  1. function wpseo_add_capabilities() { 
  2. $roles = array( 
  3. 'administrator',  
  4. 'editor',  
  5. ); 
  6.  
  7. $roles = apply_filters( 'wpseo_bulk_edit_roles', $roles ); 
  8.  
  9. foreach ( $roles as $role ) { 
  10. $r = get_role( $role ); 
  11. if ( $r ) { 
  12. $r->add_cap( 'wpseo_bulk_edit' );