backpress_gmt_strtotime

The BuddyPress backpress gmt strtotime function.

Description

backpress_gmt_strtotime( $string ); 

Parameters (1)

0. $string
The string.

Usage

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

Defined (1)

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

/bp-forums/bbpress/bb-includes/backpress/functions.core.php  
  1. function backpress_gmt_strtotime( $string ) { 
  2. if ( is_numeric($string) ) 
  3. return $string; 
  4. if ( !is_string($string) ) 
  5. return -1; 
  6.  
  7. if ( stristr($string, 'utc') || stristr($string, 'gmt') || stristr($string, '+0000') ) 
  8. return strtotime($string); 
  9.  
  10. if ( -1 == $time = strtotime($string . ' +0000') ) 
  11. return strtotime($string); 
  12.  
  13. return $time;