bp_docs_doc_row_classes

Add classes to a row in the document list table.

Description

bp_docs_doc_row_classes(); 

Currently supports: bp-doc-trashed-doc


Usage

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

Defined (1)

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

/includes/templatetags.php  
  1. function bp_docs_doc_row_classes() { 
  2. $classes = array(); 
  3.  
  4. if ( get_post_status( get_the_ID() ) == 'trash' ) { 
  5. $classes[] = 'bp-doc-trashed-doc'; 
  6.  
  7. // Pass the classes out as an array for easy unsetting or adding new elements 
  8. $classes = apply_filters( 'bp_docs_doc_row_classes', $classes ); 
  9.  
  10. if ( ! empty( $classes ) ) { 
  11. $classes = implode( ' ', $classes ); 
  12. echo ' class="' . esc_attr( $classes ) . '"';