rtmedia_edit_allowed

Checking if edit media is allowed.

Description

rtmedia_edit_allowed(); 

Usage

  1. if ( !function_exists( 'rtmedia_edit_allowed' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'rtmedia-for-wordpress-buddypress-and-bbpress/app/main/controllers/template/rtmedia-functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = rtmedia_edit_allowed(); 
  7.  

Defined (1)

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

/app/main/controllers/template/rtmedia-functions.php  
  1. function rtmedia_edit_allowed() { 
  2.  
  3. global $rtmedia_media; 
  4.  
  5. $flag = intval( $rtmedia_media->media_author ) === get_current_user_id(); 
  6.  
  7. if ( ! $flag ) { 
  8. $flag = is_super_admin(); 
  9.  
  10. $flag = apply_filters( 'rtmedia_media_edit_priv', $flag ); 
  11.  
  12. return $flag; 
  13.