Понятно, тогда, скорее всего, в вашем шаблоне для вывода комментариев используются нестандартные функции, т.е. вместо функции comment_text() используется ее замена, а это автоматически отключает все хуки и фильтры цепляющиеся к стандартным функциям вывода комментария. Это предположение, но пока больше причин не вижу.
шаблон может использовать свою функцию для вывода списка всех комментариев к публикации, надо смотреть что находится внутри этой функции и в нужном месте, где выводится непосредственно текст комментария дописать строчку
apply_filters('comment_text',$comment_text,$comment);
тогда все что требуется прицепиться к этому фильтру и начнет работать.
Спасибо.
<?php if ( post_password_required() ) : ?>
<p class="nopassword"><?php _e( 'This post is password protected. Enter the password to view any comments.', 'twentyten' ); ?></p>
</div><!-- #comments -->
<?php
/* Stop the rest of comments.php from being processed,
* but don't kill the script entirely -- we still have
* to fully load the template.
*/
return;
endif;
?>
<?php
// You can start editing here -- including this comment!
?>
<?php if ( have_comments() ) : ?>
<div class="list_category unique_margin_bottom">
<div class="heading"><h2><?php
printf( _n( '1 Комментарий', 'Комментариев: %1$s ', get_comments_number(), 'skyali' ),
number_format_i18n( get_comments_number() ), '<em>' . get_the_title() . '</em>' ); ?>
</h2></div>
</div><!-- #list_category -->
<ol id="comments"><!-- main holder -->
<?php wp_list_comments( array( 'callback' => 'skyali_comment' ) ); ?>
</ol>
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?>
<div id="entries">
<div class="old_entries"><?php previous_comments_link( __( '<span class="meta-nav">«</span> Previous', 'skyali' ) ); ?></div>
<div class="new_entries"><?php next_comments_link( __( 'Newer <span class="meta-nav">»</span>', 'skyali' ) ); ?></div>
</div><!-- .navigation -->
<?php endif; // check for comment navigation ?>
<?php else : // or, if we don't have comments:
/* If there are no comments and comments are closed,
* let's leave a little note, shall we?
*/
if ( ! comments_open() ) :
?>
<p class="nocomments"><?php _e( 'Комментирование закрыто.<BR><BR>', 'skyali' ); ?></p>
<?php endif; // end ! comments_open() ?>
<?php endif; // end have_comments() ?>
<div class="list_category unique_margin_bottom">
<div class="heading"><h2><?php _e('Оставьте комментарий:', 'skyali'); ?></h2></div>
</div><!-- #list_category -->
<?php comment_form(); ?>
Куда тут вставить эту строчку? Не могу понять
Вот, наверно, нашел:
if ( ! function_exists( 'skyali_comment' ) ) :
/* Template for comments and pingbacks. */
function skyali_comment( $comment, $args, $depth ) {
$GLOBALS['comment'] = $comment;
switch ( $comment->comment_type ) :
case '' :
?>
<li>
<div class="comment"><!-- start of new comment goes inside the li -->
<div class="avatar">
<?php echo get_avatar( $comment, 75 ); ?>
</div><!-- #avatar -->
<?php if ( $comment->comment_approved == '0' ) : ?>
<div id="comment-pending"><?php _e( 'Your comment is awaiting moderation.', 'skyali' ); ?></div>
<?php endif; ?>
<div class="comment_holder">
<?php _e('', 'skyali'); printf( __( '%s', 'skyali' ), sprintf( '<h5>%s</h5><!-- Comment Maker Name -->', get_comment_author_link() ) ); _e('', 'skyali'); ?>
<?php _e('<span class="date">'); printf( __( '%1$s at %2$s', 'skyali' ), get_comment_date(), get_comment_time() ); ?><?php edit_comment_link( __( ' - (Edit)', 'skyali' ), '' ); _e('</span><!-- #comment date -->', 'skyali');
?>
<div class="comment_box"><p class="no_margin_bottom"><?php echo $comment->comment_content; ?></p></div><!-- #comment box -->
<div class="button"><?php comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?></div><!-- #button -->
</div><!-- #comment_holder -->
</div><!-- #comment -->
<?php
break;
case 'pingback' :
case 'trackback' :
?>
<li class="post pingback">
<p><?php _e( 'Pingback:', 'skyali' ); ?> <?php comment_author_link(); ?><?php edit_comment_link( __('(Edit)', 'skyali'), ' ' ); ?></p>
<?php
break;
endswitch;
}
endif;
Тема закрыта. Публикация новых сообщений запрещена.
