Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make disqus_url and disqus_identifier hookable #84

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion disqus/comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

<script type="text/javascript">
/* <![CDATA[ */
var disqus_url = '<?php echo get_permalink(); ?>';
var disqus_url = '<?php echo dsq_link_for_post($post); ?>';
var disqus_identifier = '<?php echo dsq_identifier_for_post($post); ?>';
var disqus_container_id = 'disqus_thread';
var disqus_domain = '<?php echo DISQUS_DOMAIN; ?>';
Expand Down
4 changes: 2 additions & 2 deletions disqus/disqus.php
Original file line number Diff line number Diff line change
Expand Up @@ -1435,7 +1435,7 @@ function dsq_hmacsha1($data, $key) {
}

function dsq_identifier_for_post($post) {
return $post->ID . ' ' . $post->guid;
return apply_filters('dsq_identifier', $post->ID . ' ' . $post->guid);
}

function dsq_title_for_post($post) {
Expand All @@ -1445,7 +1445,7 @@ function dsq_title_for_post($post) {
}

function dsq_link_for_post($post) {
return get_permalink($post);
return apply_filters('dsq_url', get_permalink($post));
}

function dsq_does_need_update() {
Expand Down