rtmedia_permalink

Echo parmalink of the media.

Description

rtmedia_permalink( (bool) $media_id = false ); 

Parameters (1)

0. $media_id — Optional. (bool) => false
The media id.

Usage

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

Defined (1)

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

/app/main/controllers/template/rtmedia-functions.php  
  1. function rtmedia_permalink( $media_id = false ) { 
  2.  
  3. global $rtmedia_backbone; 
  4.  
  5. if ( $rtmedia_backbone['backbone'] ) { 
  6. echo '<%= rt_permalink %>'; 
  7. } else { 
  8. echo esc_url( get_rtmedia_permalink( rtmedia_id( $media_id ) ) ); 
  9.