コード例 #1
1
/**
 * Return the timestamp of the current notification.
 *
 * @since BuddyPress (1.9.0)
 *
 * @return string Timestamp of the current notification.
 */
function bp_get_the_notification_time_since()
{
    // Get the notified date
    $date_notified = bp_get_the_notification_date_notified();
    // Notified date has legitimate data
    if ('0000-00-00 00:00:00' !== $date_notified) {
        $retval = bp_core_time_since($date_notified);
        // Notified date is empty, so return a fun string
    } else {
        $retval = __('Date not found', 'buddypress');
    }
    /**
     * Filters the time since value of the current notification.
     *
     * @since BuddyPress (1.9.0)
     *
     * @param string $retval Time since value for current notification.
     */
    return apply_filters('bp_get_the_notification_time_since', $retval);
}
コード例 #2
0
/**
 * Return the timestamp of the current notification.
 *
 * @since BuddyPress (1.9.0)
 *
 * @return string Timestamp of the current notification.
 */
function bp_get_the_notification_time_since()
{
    // Get the notified date
    $date_notified = bp_get_the_notification_date_notified();
    // Notified date has legitimate data
    if ('0000-00-00 00:00:00' !== $date_notified) {
        $retval = bp_core_time_since($date_notified);
        // Notified date is empty, so return a fun string
    } else {
        $retval = __('Date not found', 'buddypress');
    }
    return apply_filters('bp_get_the_notification_time_since', $retval);
}