bp_core_time_since_unknown_text

  • apply_filters( 'bp_core_time_since_unknown_text',   __( 'sometime',  'buddypress' ) )

    Source Reference:

    • Component: BuddyPress :: bp-core
      File: /bp-core/bp-core-functions.php :: Trac Source Line: 599
       *
       * @package BuddyPress Core
       * @param $older_date int Unix timestamp of date you want to calculate the time since for
       * @param $newer_date int Unix timestamp of date to compare older date to. Default false (current time).
       * @return str The time since.
       */
      function bp_core_time_since( $older_date, $newer_date = false ) {
      
      	// Setup the strings
      	$unknown_text   = apply_filters( 'bp_core_time_since_unknown_text',   __( 'sometime',  'buddypress' ) );
      	$right_now_text = apply_filters( 'bp_core_time_since_right_now_text', __( 'right now', 'buddypress' ) );
      	$ago_text       = apply_filters( 'bp_core_time_since_ago_text',       __( '%s ago',    'buddypress' ) );
      
      	// array of time period chunks
      	$chunks = array(
      		array( 60 * 60 * 24 * 365 , __( 'year',   'buddypress' ), __( 'years',   'buddypress' ) ),
      		array( 60 * 60 * 24 * 30 ,  __( 'month',  'buddypress' ), __( 'months',  'buddypress' ) ),
      		array( 60 * 60 * 24 * 7,    __( 'week',   'buddypress' ), __( 'weeks',   'buddypress' ) ),
      		array( 60 * 60 * 24 ,       __( 'day',    'buddypress' ), __( 'days',    'buddypress' ) ),
      		array( 60 * 60 ,            __( 'hour',   'buddypress' ), __( 'hours',   'buddypress' ) ),
      

Comments are closed.