NV

Size: a a a
NV
АП
NV
NV
АП
if( $comments = get_comments( $args ) ){
$comments = new WP_Query( array( 'orderby' => array( 'comment_parent' => 'comment_date' ) ) );
$comments = get_comments( array(
'search' => get_current_user_id(), // получаем посты текущего автора
'author__not_in' => get_current_user_id(), // исключаем свои комментарии
'number' => get_option('noticommhead'),
'status' => 'approve',
'order' => 'DESC',
'type' => '',
) );
АП
И
АП
И
<?php
$args = array(
'search' => get_current_user_id(),
);
if( $comments = get_comments( $args ) ){
$comments = new WP_Query( array( 'orderby' => array( 'comment_parent' => 'comment_date' ) ) );
$comments = get_comments( array(
'search' => get_current_user_id(), // получаем посты текущего автора
'author__not_in' => get_current_user_id(), // исключаем свои комментарии
'number' => get_option('noticommhead'),
'status' => 'approve',
'order' => 'DESC',
'type' => '',
) );
echo '<div class="nfblock">Уведомления</div>';
echo '<div class="nfscrl">';
foreach( $comments as $comment ){
$comment_post_title = mb_substr( get_the_title( $comment->comment_post_ID ), 0, 35 ) .'...';
$comm_short_txt = mb_substr( strip_tags( $comment->comment_content ), 0, 120 ) .'...';
echo '
<div id="commentlist-notification">
<div id="feed-comment-'.$comment->comment_post_ID.'" class="feedcomment-notification">
<div class="comments-avatar-box">'.get_avatar( $comment->comment_author_email, 36).'
<i class="fa fa-reply" aria-hidden="true"></i></div>
<div class="nfblock-info">
<span><b>'. $comment->comment_author .'</b> пишет:</span>
<p><i class="fa fa-quote-left" aria-hidden="true"></i>
'.$comm_short_txt.'
<i class="fa fa-quote-right" aria-hidden="true"></i></p>
<span>к записи: <a href="'.get_comment_link( $comment->comment_ID ).'">'.$comment_post_title.'</a></span>
<div class="time-comm-notification">'.human_time_diff(get_comment_time('U'), current_time('timestamp')) .' назад</div>
<a target="_blank" href="'.get_permalink( $comment->comment_post_ID ).'#comment-'.$comment->comment_ID.'">Ответить</a>
</div>
</div>
</div>
';
}
echo '</div>';
echo '<div class="nfblock-f">Бета версия</div>';
} else {
echo"
<div class='nfblock'>Уведомления</div>
<div id='commentlist-notification'>
<p class='not-found-notification'>Тут пока пусто.</p>
</div>
";
}
?>
И
И
BI
<?php
$args = array(
'search' => get_current_user_id(),
);
if( $comments = get_comments( $args ) ){
$comments = new WP_Query( array( 'orderby' => array( 'comment_parent' => 'comment_date' ) ) );
$comments = get_comments( array(
'search' => get_current_user_id(), // получаем посты текущего автора
'author__not_in' => get_current_user_id(), // исключаем свои комментарии
'number' => get_option('noticommhead'),
'status' => 'approve',
'order' => 'DESC',
'type' => '',
) );
echo '<div class="nfblock">Уведомления</div>';
echo '<div class="nfscrl">';
foreach( $comments as $comment ){
$comment_post_title = mb_substr( get_the_title( $comment->comment_post_ID ), 0, 35 ) .'...';
$comm_short_txt = mb_substr( strip_tags( $comment->comment_content ), 0, 120 ) .'...';
echo '
<div id="commentlist-notification">
<div id="feed-comment-'.$comment->comment_post_ID.'" class="feedcomment-notification">
<div class="comments-avatar-box">'.get_avatar( $comment->comment_author_email, 36).'
<i class="fa fa-reply" aria-hidden="true"></i></div>
<div class="nfblock-info">
<span><b>'. $comment->comment_author .'</b> пишет:</span>
<p><i class="fa fa-quote-left" aria-hidden="true"></i>
'.$comm_short_txt.'
<i class="fa fa-quote-right" aria-hidden="true"></i></p>
<span>к записи: <a href="'.get_comment_link( $comment->comment_ID ).'">'.$comment_post_title.'</a></span>
<div class="time-comm-notification">'.human_time_diff(get_comment_time('U'), current_time('timestamp')) .' назад</div>
<a target="_blank" href="'.get_permalink( $comment->comment_post_ID ).'#comment-'.$comment->comment_ID.'">Ответить</a>
</div>
</div>
</div>
';
}
echo '</div>';
echo '<div class="nfblock-f">Бета версия</div>';
} else {
echo"
<div class='nfblock'>Уведомления</div>
<div id='commentlist-notification'>
<p class='not-found-notification'>Тут пока пусто.</p>
</div>
";
}
?>
И
И
АП
BI
И
АП
<?php
$args = array(
'search' => get_current_user_id(),
);
if( $comments = get_comments( $args ) ){
$comments = new WP_Query( array( 'orderby' => array( 'comment_parent' => 'comment_date' ) ) );
$comments = get_comments( array(
'search' => get_current_user_id(), // получаем посты текущего автора
'author__not_in' => get_current_user_id(), // исключаем свои комментарии
'number' => get_option('noticommhead'),
'status' => 'approve',
'order' => 'DESC',
'type' => '',
) );
echo '<div class="nfblock">Уведомления</div>';
echo '<div class="nfscrl">';
foreach( $comments as $comment ){
$comment_post_title = mb_substr( get_the_title( $comment->comment_post_ID ), 0, 35 ) .'...';
$comm_short_txt = mb_substr( strip_tags( $comment->comment_content ), 0, 120 ) .'...';
echo '
<div id="commentlist-notification">
<div id="feed-comment-'.$comment->comment_post_ID.'" class="feedcomment-notification">
<div class="comments-avatar-box">'.get_avatar( $comment->comment_author_email, 36).'
<i class="fa fa-reply" aria-hidden="true"></i></div>
<div class="nfblock-info">
<span><b>'. $comment->comment_author .'</b> пишет:</span>
<p><i class="fa fa-quote-left" aria-hidden="true"></i>
'.$comm_short_txt.'
<i class="fa fa-quote-right" aria-hidden="true"></i></p>
<span>к записи: <a href="'.get_comment_link( $comment->comment_ID ).'">'.$comment_post_title.'</a></span>
<div class="time-comm-notification">'.human_time_diff(get_comment_time('U'), current_time('timestamp')) .' назад</div>
<a target="_blank" href="'.get_permalink( $comment->comment_post_ID ).'#comment-'.$comment->comment_ID.'">Ответить</a>
</div>
</div>
</div>
';
}
echo '</div>';
echo '<div class="nfblock-f">Бета версия</div>';
} else {
echo"
<div class='nfblock'>Уведомления</div>
<div id='commentlist-notification'>
<p class='not-found-notification'>Тут пока пусто.</p>
</div>
";
}
?>
И