bp_docs_attachment_url

Get the URL for an attachment download.

Description

bp_docs_attachment_url( (int) $attachment_id ); 

Is sensitive to whether Docs can be directly downloaded.

Parameters (1)

0. $attachment_id (int)
The attachment id.

Usage

  1. if ( !function_exists( 'bp_docs_attachment_url' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress-docs/includes/templatetags.php'; 
  3.  
  4. // The attachment id. 
  5. $attachment_id = -1; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bp_docs_attachment_url($attachment_id); 
  9.  

Defined (1)

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

/includes/templatetags.php  
  1. function bp_docs_attachment_url( $attachment_id ) { 
  2. echo bp_docs_get_attachment_url( $attachment_id );