bp_docs_excerpt_length

Reduces the length of excerpts on the BP Docs doc list.

Description

(int) bp_docs_excerpt_length( (int) $length ); 

Returns (int)

$length The filtered excerpt length

Parameters (1)

0. $length (int)
WordPress's default excerpt length

Usage

  1. if ( !function_exists( 'bp_docs_excerpt_length' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress-docs/includes/formatting.php'; 
  3.  
  4. // WordPress's default excerpt length 
  5. $length = -1; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bp_docs_excerpt_length($length); 
  9.  

Defined (1)

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

/includes/formatting.php  
  1. function bp_docs_excerpt_length( $length ) { 
  2.  
  3. return $length;