mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-11 18:56:10 +09:00
- reduced using get_the_time( 'U', $post_id ); and current_time( 'timestamp' );
This commit is contained in:
@@ -1280,7 +1280,7 @@ if ( ! class_exists( 'um\core\Uploader' ) ) {
|
||||
//move temporary file from temp directory to the correct user directory
|
||||
$temp_file_path = UM()->uploader()->get_core_temp_dir() . DIRECTORY_SEPARATOR . $filename;
|
||||
if ( file_exists( $temp_file_path ) ) {
|
||||
$extra_hash = hash( 'crc32b', current_time('timestamp') );
|
||||
$extra_hash = hash( 'crc32b', current_time( 'timestamp' ) );
|
||||
|
||||
if ( strpos( $filename , 'stream_photo_' ) !== false ) {
|
||||
$new_filename = str_replace("stream_photo_","stream_photo_{$extra_hash}_", $filename );
|
||||
|
||||
@@ -1523,7 +1523,6 @@ if ( ! class_exists( 'um\core\User' ) ) {
|
||||
update_user_meta( $this->id, '_um_last_login', current_time( 'timestamp' ) );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set user's account status
|
||||
*
|
||||
|
||||
@@ -838,7 +838,7 @@ function um_user_submited_display( $k, $title, $data = array(), $style = true )
|
||||
$v = um_user( $k );
|
||||
}
|
||||
|
||||
if ( strstr( $k, 'user_pass' ) || in_array( $k, array( 'g-recaptcha-response', 'request', '_wpnonce', '_wp_http_referer' ) ) ) {
|
||||
if ( strstr( $k, 'user_pass' ) || in_array( $k, array( 'g-recaptcha-response', 'request', '_wpnonce', '_wp_http_referer' ), true ) ) {
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* Page: "Profile"
|
||||
*
|
||||
* @version 2.6.1
|
||||
* @version 2.6.12
|
||||
*
|
||||
* @var object $post
|
||||
*/
|
||||
@@ -17,44 +17,49 @@ if ( ! defined( 'ABSPATH' ) ) {
|
||||
<div class="um-item">
|
||||
<div class="um-item-link">
|
||||
<i class="um-icon-ios-paper"></i>
|
||||
<a href="<?php echo esc_url( get_permalink( $post ) ); ?>"><?php echo get_the_title( $post ); ?></a>
|
||||
<a href="<?php echo esc_url( get_permalink( $post ) ); ?>"><?php echo wp_kses( get_the_title( $post ), UM()->get_allowed_html( 'templates' ) ); ?></a>
|
||||
</div>
|
||||
|
||||
<?php if ( has_post_thumbnail( $post->ID ) ) {
|
||||
$image_id = get_post_thumbnail_id( $post->ID );
|
||||
$image_url = wp_get_attachment_image_src( $image_id, 'full', true ); ?>
|
||||
|
||||
<?php
|
||||
if ( has_post_thumbnail( $post->ID ) ) {
|
||||
$image_id = get_post_thumbnail_id( $post->ID );
|
||||
$image_url = wp_get_attachment_image_src( $image_id, 'full', true );
|
||||
?>
|
||||
<div class="um-item-img">
|
||||
<a href="<?php echo esc_url( get_permalink( $post ) ); ?>">
|
||||
<?php echo get_the_post_thumbnail( $post->ID, 'medium' ); ?>
|
||||
</a>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
<?php } ?>
|
||||
$unix_published_date = get_post_datetime( $post, 'date', 'gmt' );
|
||||
?>
|
||||
|
||||
<div class="um-item-meta">
|
||||
<span>
|
||||
<?php
|
||||
// translators: %s: years.
|
||||
printf( __( '%s ago', 'ultimate-member' ), human_time_diff( get_the_time( 'U', $post->ID ), current_time( 'timestamp' ) ) );
|
||||
// translators: %s: human time diff.
|
||||
echo esc_html( sprintf( __( '%s ago', 'ultimate-member' ), human_time_diff( $unix_published_date->getTimestamp() ) ) );
|
||||
?>
|
||||
</span>
|
||||
<span>
|
||||
<?php _e( 'in', 'ultimate-member' ); ?>: <?php the_category( ', ', '', $post->ID ); ?>
|
||||
<?php
|
||||
// translators: %s: categories list.
|
||||
echo wp_kses( sprintf( __( 'in: %s', 'ultimate-member' ), get_the_category_list( ', ', '', $post->ID ) ), UM()->get_allowed_html( 'templates' ) );
|
||||
?>
|
||||
</span>
|
||||
<span>
|
||||
<?php $num_comments = get_comments_number( $post->ID );
|
||||
|
||||
if ( $num_comments == 0 ) {
|
||||
$comments = __( 'no comments', 'ultimate-member' );
|
||||
} elseif ( $num_comments > 1 ) {
|
||||
// translators: %s: coments number.
|
||||
$comments = sprintf( __( '%s comments', 'ultimate-member' ), $num_comments );
|
||||
<?php
|
||||
$num_comments = absint( get_comments_number( $post ) );
|
||||
if ( 0 === $num_comments ) {
|
||||
$comments_html = __( 'no comments', 'ultimate-member' );
|
||||
} else {
|
||||
$comments = __( '1 comment', 'ultimate-member' );
|
||||
} ?>
|
||||
|
||||
<a href="<?php echo esc_url( get_comments_link( $post->ID ) ); ?>"><?php echo $comments; ?></a>
|
||||
// translators: %s: comments number.
|
||||
$comments_html = sprintf( _n( '%s comment', '%s comments', $num_comments, 'ultimate-member' ), $num_comments );
|
||||
}
|
||||
?>
|
||||
<a href="<?php echo esc_url( get_comments_link( $post->ID ) ); ?>"><?php echo esc_html( $comments_html ); ?></a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user