如何在Wordpress facebook插件中为commnets标题添加过滤器

时间:2014-07-15 09:18:31

标签: php facebook wordpress title

我不是wordpress钩子和过滤器的专家,因此任何专家都可以帮我创建一个facebook wordpress插件的过滤器,以便它在网站上显示评论标题。

插件网址是

http://wordpress.org/support/plugin/facebook

and here is the documentation about how to get this solved...

facebook_wp_comments_title

WordPress实施评论框社交插件的Facebook插件会覆盖您的WordPress主题评论模板,包括显示评论部分的标题。对传递给此过滤器的字符串值执行操作,以影响自定义注释模板中h2.comments-title的内部文本。

1 个答案:

答案 0 :(得分:1)

您可以像这样使用facebook_wp_comments_title过滤器:

function my_custom_filter( $title ) {
    $title = 'Your title goes here';
    return $title;
}
add_filter( 'facebook_wp_comments_title', 'my_custom_filter' );

参考:http://codex.wordpress.org/Function_Reference/add_filter