From 44e09253fc7849a08a188f562bedaef4ed913384 Mon Sep 17 00:00:00 2001 From: Jan Fabry Date: Fri, 7 Feb 2014 13:23:15 +0100 Subject: [PATCH 1/2] Add filters to Disqus identifier, title and link --- disqus/disqus.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/disqus/disqus.php b/disqus/disqus.php index 51082ca..62d95a6 100644 --- a/disqus/disqus.php +++ b/disqus/disqus.php @@ -1439,17 +1439,17 @@ function dsq_hmacsha1($data, $key) { } function dsq_identifier_for_post($post) { - return $post->ID . ' ' . $post->guid; + return apply_filters('dsq_identifier_for_post', $post->ID . ' ' . $post->guid, $post); } function dsq_title_for_post($post) { $title = get_the_title($post); $title = strip_tags($title, DISQUS_ALLOWED_HTML); - return $title; + return apply_filters('dsq_title_for_post', $title, $post); } function dsq_link_for_post($post) { - return get_permalink($post); + return apply_filters('dsq_link_for_post', get_permalink($post), $post); } function dsq_does_need_update() { From 550ddffb023ccc13bd7a3c812f7862286c443547 Mon Sep 17 00:00:00 2001 From: Jan Fabry Date: Fri, 7 Feb 2014 13:24:05 +0100 Subject: [PATCH 2/2] Export Disqus link instead of RSS permalink Allows overriding via filter --- disqus/export.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/disqus/export.php b/disqus/export.php index 7f8aa59..d31a191 100644 --- a/disqus/export.php +++ b/disqus/export.php @@ -156,7 +156,7 @@ function dsq_export_wp($post, $comments=null) { setup_postdata($post); ?> <?php echo apply_filters('the_title_rss', $post->post_title); ?> - +