_bb_parse_time_function_args

The BuddyPress bb parse time function args function.

Description

_bb_parse_time_function_args( $args ); 

Parameters (1)

0. $args
The args.

Usage

  1. if ( !function_exists( '_bb_parse_time_function_args' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-forums/bbpress/bb-includes/functions.bb-template.php'; 
  3.  
  4. // The args. 
  5. $args = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = _bb_parse_time_function_args($args); 
  9.  

Defined (1)

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

/bp-forums/bbpress/bb-includes/functions.bb-template.php  
  1. function _bb_parse_time_function_args( $args ) { 
  2. if ( is_numeric($args) ) 
  3. $args = array('id' => $args); 
  4. elseif ( $args && is_string($args) && false === strpos($args, '=') ) 
  5. $args = array('format' => $args); 
  6.  
  7. $defaults = array( 'id' => 0, 'format' => 'since', 'more' => 0, 'localize' => true ); 
  8. return wp_parse_args( $args, $defaults );