diff --git a/includes/core/class-uploader.php b/includes/core/class-uploader.php index 892ff986..0706002e 100644 --- a/includes/core/class-uploader.php +++ b/includes/core/class-uploader.php @@ -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 ); diff --git a/includes/core/class-user.php b/includes/core/class-user.php index 3bf706f1..f0dd02cc 100644 --- a/includes/core/class-user.php +++ b/includes/core/class-user.php @@ -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 * diff --git a/includes/um-short-functions.php b/includes/um-short-functions.php index 442151be..0e92a89a 100644 --- a/includes/um-short-functions.php +++ b/includes/um-short-functions.php @@ -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 ''; } diff --git a/templates/profile/posts-single.php b/templates/profile/posts-single.php index 37dc2d1b..4b597df6 100644 --- a/templates/profile/posts-single.php +++ b/templates/profile/posts-single.php @@ -6,7 +6,7 @@ * * Page: "Profile" * - * @version 2.6.1 + * @version 2.6.12 * * @var object $post */ @@ -17,44 +17,49 @@ if ( ! defined( 'ABSPATH' ) ) {
- ID ) ) { - $image_id = get_post_thumbnail_id( $post->ID ); - $image_url = wp_get_attachment_image_src( $image_id, 'full', true ); ?> - + ID ) ) { + $image_id = get_post_thumbnail_id( $post->ID ); + $image_url = wp_get_attachment_image_src( $image_id, 'full', true ); + ?>
ID, 'medium' ); ?>
+ + $unix_published_date = get_post_datetime( $post, 'date', 'gmt' ); + ?>
ID ), current_time( 'timestamp' ) ) ); + // translators: %s: human time diff. + echo esc_html( sprintf( __( '%s ago', 'ultimate-member' ), human_time_diff( $unix_published_date->getTimestamp() ) ) ); ?> - : ID ); ?> + ID ) ), UM()->get_allowed_html( 'templates' ) ); + ?> - 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 ); + - - + // translators: %s: comments number. + $comments_html = sprintf( _n( '%s comment', '%s comments', $num_comments, 'ultimate-member' ), $num_comments ); + } + ?> +