bp_docs_attachment_icon

Gets the markup for the paperclip icon in directories.

Description

bp_docs_attachment_icon(); 

Usage

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

Defined (1)

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

/includes/templatetags.php  
  1. function bp_docs_attachment_icon() { 
  2. $atts = bp_docs_get_doc_attachments( get_the_ID() ); 
  3.  
  4. if ( empty( $atts ) ) { 
  5. return; 
  6.  
  7. // $pc = plugins_url( BP_DOCS_PLUGIN_SLUG . '/includes/images/paperclip.png' ); 
  8.  
  9. $html = '<a class="bp-docs-attachment-clip" id="bp-docs-attachment-clip-' . get_the_ID() . '">' . bp_docs_get_genericon( 'attachment', get_the_ID() ) . '</a>'; 
  10.  
  11. echo $html;