aiosp_add_cap

The All In One SEO Pack aiosp add cap function.

Description

aiosp_add_cap(); 

Usage

  1. if ( !function_exists( 'aiosp_add_cap' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'all-in-one-seo-pack/all_in_one_seo_pack.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = aiosp_add_cap(); 
  7.  

Defined (1)

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

/all_in_one_seo_pack.php  
  1. function aiosp_add_cap() { 
  2. /** 
  3. TODO we should put this into an install script. We just need to make sure it runs soon enough and we need to make 
  4. sure people updating from previous versions have access to it. 
  5. */ 
  6.  
  7. $role = get_role( 'administrator' ); 
  8. if ( is_object( $role ) ) { 
  9. $role->add_cap( 'aiosp_manage_seo' );