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

Fix the CLI on linux for cron job #83

Open
wants to merge 136 commits into
base: update-count
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
136 commits
Select commit Hold shift + click to select a range
554f89c
updated manage panel to work on SSL
norcross Nov 7, 2013
9a57e56
replace curly bracket with %s to fix $wpdb->prepare() debug error
Clean-Cole Dec 3, 2013
aeefcd2
Change default timeout of 5 seconds to 60 seconds so that imports fro…
internetstaff Dec 14, 2013
cf20c50
Merge pull request #61 from disqus/update-count
mattrobenolt Dec 18, 2013
6914cd6
Incrase HTTP request timeout to 30s
Dec 20, 2013
6879101
Force $comments to an array to prevent warning
mattrobenolt Jan 3, 2014
6fcd3b3
Merge pull request #59 from internetstaff/master
mattrobenolt Jan 3, 2014
c4394c1
Merge pull request #62 from KayLeung/patch-1
mattrobenolt Jan 3, 2014
51b1f2c
Merge pull request #56 from norcross/master
mattrobenolt Jan 3, 2014
a434dc0
Merge pull request #58 from theWPValet/master
mattrobenolt Jan 3, 2014
cad0ce2
Format string outside of prepare first
mattrobenolt Jan 3, 2014
27f9e91
Removed call to deprecated get_theme() function.
tail Jan 3, 2014
bf06b7b
Remove reference to get_post call.
tail Jan 3, 2014
f798ec0
Bumped tested version in readme.
tail Jan 3, 2014
363e55b
Removed duplicate timeout.
tail Jan 3, 2014
ecc85b4
Bumped version to 2.75.
tail Jan 3, 2014
93541ba
Add the ability to add javascript callbacks using 'disqus_config' action
matgargano Apr 8, 2014
de95c64
Merge pull request #71 from matstars/add_ability_to_attach_callbacks
tail Apr 8, 2014
a9d555e
DSQ_PLUGIN_URL uses WP_PLUGIN_URL
davidosomething Apr 30, 2014
f7b09c0
Update disqus.php
davidosomething May 15, 2014
0241379
Merge pull request #74 from davidosomething/patch-1
ryanvalentin May 28, 2014
194c488
Use https in RSS path and other resources
ryanvalentin May 28, 2014
ab97da4
Update readme and .po files
ryanvalentin Jun 4, 2014
121ecc7
Use CDN for images
ryanvalentin Jun 4, 2014
ba7426f
Use `plugins_url()` instead of hardcoding the URL for assets.
joshbetz Jun 5, 2014
72f4039
Fix typo: s/maange/manage
joshbetz Jun 5, 2014
d62fed4
Merge pull request #77 from joshbetz/issue-74
ryanvalentin Jun 5, 2014
98c5d4d
Bail if the $post is entirely empty
mattrobenolt Jun 7, 2014
79a4657
Importer uses https
mattrobenolt Jun 7, 2014
5d3df59
Merge in version 2.77
ryanvalentin Jun 26, 2014
1c6f3f0
Add curly brackets and semicolon to match other block stylistically
mattrobenolt Jun 27, 2014
c2e9b47
Require nonce/POST for de/activating plugin
ryanvalentin Oct 21, 2014
2dd356f
Ignore PHPStorm directory
ryanvalentin Oct 21, 2014
572ec62
Add nonces to import/export functions
ryanvalentin Oct 22, 2014
dae3185
Bump to version 2.78 and make WP 4.0-compatible
ryanvalentin Oct 22, 2014
bdaaf59
Make sure all buttons have styles
ryanvalentin Oct 22, 2014
01d0e6f
Remove remaining references to icon uploads
ryanvalentin Oct 22, 2014
4e1bbd0
Fix wpdb::prepare and non-object warnings
ryanvalentin Oct 22, 2014
b5fff05
Check if comment_parent set before evaluating value
ryanvalentin Oct 22, 2014
c62d850
Fix tested up to version
ryanvalentin Oct 22, 2014
4be93d6
Update localization file
ryanvalentin Oct 22, 2014
737f2c2
Bump version 2.79
ryanvalentin Oct 22, 2014
3234066
Remove api submodule
ryanvalentin Oct 23, 2014
950e363
Add back submodule files
ryanvalentin Oct 23, 2014
d1fb91f
Only use jQuery in function scope
ryanvalentin Oct 23, 2014
3ae78c3
Use proper changelog header in WP readme
ryanvalentin Oct 23, 2014
0ea6729
Move admin script to separate files
ryanvalentin Oct 24, 2014
dc07cb7
Put pointer script in admin footer
ryanvalentin Oct 24, 2014
1bc14da
Set variables in export/import_comments at top
ryanvalentin Oct 24, 2014
06b3e53
Move embed script to separate script
ryanvalentin Oct 27, 2014
41f2bfe
Move count script to separate file
ryanvalentin Oct 27, 2014
ff8eca0
Fix bad variable reference
ryanvalentin Oct 27, 2014
7688511
Add SSO configuration variables
ryanvalentin Oct 27, 2014
ce1c1d6
Fix undefined index warnings when updating options
ryanvalentin Oct 27, 2014
fb99aea
Don't bother with disqus_domain in embed scripts
ryanvalentin Oct 27, 2014
503518f
change window.exports -> window.disqus_config
ryanvalentin Oct 27, 2014
1e5dba1
Fix export comments query
ryanvalentin Oct 27, 2014
e228f77
Merge pull request #87 from disqus/separete-embed
ryanvalentin Oct 27, 2014
872532d
Finish removing DISQUS_DOMAIN and other unused vars
ryanvalentin Oct 27, 2014
c570bc7
Missed a URL
ryanvalentin Oct 27, 2014
5fd17f1
always assume https
ryanvalentin Oct 27, 2014
c37d994
Merge pull request #88 from disqus/separete-embed
ryanvalentin Oct 27, 2014
7504fd1
Get rid of xd_receiver
ryanvalentin Oct 27, 2014
ff51e01
Use $wpdb->prepare where needed
ryanvalentin Oct 27, 2014
3056ab4
API 1.1 doesn't support https
ryanvalentin Oct 27, 2014
7a14242
Sanitize thread IDs before inserting
ryanvalentin Oct 27, 2014
c50ebd9
Use esc_attr() instead of htmlspecialcharacters()
ryanvalentin Oct 27, 2014
77fc19f
escape admin URLs
ryanvalentin Oct 27, 2014
976eac2
Don't modify the db on wp VIP sites
ryanvalentin Oct 28, 2014
5d5cd20
Make sure all input/output is sanitized
ryanvalentin Oct 28, 2014
2478b27
Escape more output
ryanvalentin Oct 28, 2014
a339818
Fix conditional syntax
ryanvalentin Oct 28, 2014
3e574dc
Replace iframe with a real button
ryanvalentin Oct 28, 2014
1d75311
Split html from translatable strings in disqus.php
ryanvalentin Oct 28, 2014
d80e15a
Bump to version 2.80
ryanvalentin Oct 28, 2014
60ce5db
Remove unused code
ryanvalentin Oct 28, 2014
4fb6b3b
No more html in translatable strings
ryanvalentin Oct 29, 2014
0b20b74
Use proper captialization of Disqus
ryanvalentin Oct 29, 2014
0f854f2
Remove unused index file
ryanvalentin Oct 29, 2014
f7b51b7
Discontinue using 'rel' for 'data-' attributes
ryanvalentin Oct 30, 2014
45a3e7f
Remove link to wphelpcenter.com
ryanvalentin Oct 30, 2014
55616ef
pass arrays to ->prepare correctly
thomascharbit Oct 31, 2014
b136d84
fix extra parenthesis
thomascharbit Oct 31, 2014
7c21fbb
Merge pull request #91 from FreshFlesh/wpdbfix
ryanvalentin Nov 3, 2014
1934561
CDATA tags unnecessary in external scripts
ryanvalentin Nov 4, 2014
fbe36a9
Bump version to 2.81
ryanvalentin Nov 5, 2014
c8f3a1b
Check for empty array before db queries
ryanvalentin Nov 7, 2014
45c7793
Add option to render Disqus JS inline
ryanvalentin Nov 7, 2014
35df573
Let external js option affect count script
ryanvalentin Nov 8, 2014
cbcf5af
Bump to version 2.82
ryanvalentin Nov 10, 2014
ac7682d
Update translations
ryanvalentin Nov 10, 2014
f067f6a
Reimplement dsq_sso_login() function
ryanvalentin Nov 10, 2014
12eceda
Fix output of SSO variables
ryanvalentin Nov 10, 2014
9f8aa58
Add semicolon to SSO variable
ryanvalentin Nov 10, 2014
538192d
Bump to version 2.83
ryanvalentin Nov 10, 2014
cb5c24b
Fix inline count script still using rel attribute
samvtran Nov 30, 2014
a3f79a3
Stop using www.disqus.com
mattrobenolt Dec 5, 2014
25635c5
Merge pull request #92 from samvtran/patch-1
ryanvalentin Dec 6, 2014
2d4df7b
Bump to version 2.84
ryanvalentin Dec 9, 2014
2375bb8
checking if parentNode is an anchor tag before attempting to access t…
kevinlangleyjr Jan 5, 2015
14db3e6
Fix all remaining http:// urls for disqus.com
mattrobenolt Jan 28, 2015
3a45317
It's 2015, guise
mattrobenolt Jan 28, 2015
fe92f2d
Update pointer.js
Endzakiel Apr 3, 2015
f84c029
Merge pull request #98 from Endzakiel/patch-1
mattrobenolt Apr 3, 2015
0917cf9
adding check on response to account for negative responses, removes w…
simonbbrown Apr 16, 2015
ae846ce
Merge pull request #101 from simonbbrown/master
mattrobenolt Apr 16, 2015
23741a8
Use get_comment_author_url() for if statement
Aug 4, 2015
db4e288
Merge pull request #102 from jeroenoomsNL/master
tail Aug 4, 2015
ce6c39a
Use new constructor style to prevent deprecated notice on PHP7
dannyvankooten Dec 9, 2015
41fd958
change other constructor methods to new syntax as well
dannyvankooten Dec 9, 2015
4f163d6
Merge pull request #106 from dannyvankooten/master
tail Jan 15, 2016
4d90fe6
Bumped WP version requirement.
tail Jan 15, 2016
bc2634f
2015 -> 2016.
tail Jan 15, 2016
91fe37c
Add missing newline in debug output
ryanvalentin Apr 4, 2016
f89bd0e
Bump version to 2.85, WP tested up to 4.5
ryanvalentin Apr 4, 2016
c37c884
Default to Step '1' if not set in query
ryanvalentin Apr 6, 2016
0f5b52a
Merge pull request #94 from kevinlangleyjr/master
ryanvalentin Apr 6, 2016
156cef3
Add basic travis config
ryanvalentin May 16, 2016
24dd670
Add travis image
ryanvalentin May 16, 2016
2665d5a
Fix #113 - check if dsq_sync_forum is already scheduled before schedu…
archon810 Jul 16, 2016
6000760
Merge pull request #1 from archon810/archon810-patch-dsq_sync_forum
archon810 Jul 16, 2016
ba0a89e
Merge pull request #114 from archon810/master
ryanvalentin Jul 21, 2016
213ea73
don't try using cURL on IIS servers.
webrender Aug 5, 2016
8e1423a
Bump version to 2.86, WP tested up to 4.6.1
webrender Oct 7, 2016
50dad36
Bump version to 2.86, WP tested up to 4.6.1
webrender Oct 7, 2016
76dbb45
Update plugin description page
tonyhue Apr 7, 2017
ff92771
Merge pull request #127 from tonyhue/disqus-tony
ryanvalentin Apr 7, 2017
51f35d2
Updated screenshots and added FAQ section
tonyhue Apr 10, 2017
360e77f
Fixed incorrect screenshot filename
tonyhue Apr 10, 2017
2ff9e5f
Sweet new Disqus banner
tonyhue Apr 11, 2017
6e16605
Updated contributors list
tonyhue Apr 11, 2017
af7198f
Merge pull request #128 from tonyhue/disqus-tony
ryanvalentin Apr 12, 2017
e3bc6a5
Merge pull request #2 from disqus/master
archon810 Apr 26, 2017
7673d41
Filter to allow overriding DISQUS_SYNC_TIMEOUT
archon810 Apr 26, 2017
e74106e
Allow overriding of memory_limit
archon810 Apr 26, 2017
8f5338d
Merge pull request #131 from archon810/master
ryanvalentin Apr 26, 2017
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
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.DS_Store
*.pyc
/*.zip
/*.zip
*.db
.idea/
8 changes: 8 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
language: php
php:
- '5.4'
- '5.5'
- '5.6'
- '7.0'
- hhvm
- nightly
4 changes: 3 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. image:: https://travis-ci.org/disqus/disqus-wordpress.svg

See disqus/readme.txt for more information

Packaging
Expand All @@ -14,4 +16,4 @@ The *very* limited test suite requires PHPUnit 3.6 and can be run with::

php tests.php

.. note:: If it asks for a password, this is simply the SQL user's password.
.. note:: If it asks for a password, this is simply the SQL user's password.
6 changes: 3 additions & 3 deletions disqus/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

Disqus WordPress Plugin
Copyright (C) 2010 DISQUS
Copyright (C) 2016 Disqus

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand All @@ -652,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:

Disqus WordPress Plugin Copyright (C) 2010 DISQUS
Disqus WordPress Plugin Copyright (C) 2016 Disqus
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
Expand All @@ -671,4 +671,4 @@ into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
Binary file added disqus/assets/banner-772x250.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added disqus/assets/icon-256x256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions disqus/assets/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added disqus/assets/screenshot-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added disqus/assets/screenshot-10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added disqus/assets/screenshot-11.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added disqus/assets/screenshot-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added disqus/assets/screenshot-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added disqus/assets/screenshot-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added disqus/assets/screenshot-5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added disqus/assets/screenshot-6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added disqus/assets/screenshot-7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added disqus/assets/screenshot-8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added disqus/assets/screenshot-9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
200 changes: 111 additions & 89 deletions disqus/comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,18 @@

<div id="disqus_thread">
<?php if (!get_option('disqus_disable_ssr') && have_comments()): ?>
<?php
// if (is_file(TEMPLATEPATH . '/comments.php')) {
// include(TEMPLATEPATH . '/comments.php');
// }
?>
<div id="dsq-content">

<?php if (get_comment_pages_count() > 1 && get_option('page_comments')): // Are there comments to navigate through? ?>
<div class="navigation">
<div class="nav-previous"><?php previous_comments_link(dsq_i( '<span class="meta-nav">&larr;</span> Older Comments')); ?></div>
<div class="nav-next"><?php next_comments_link(dsq_i('Newer Comments <span class="meta-nav">&rarr;</span>')); ?></div>
<div class="nav-previous">
<span class="meta-nav">&larr;</span>&nbsp;
<?php previous_comments_link( dsq_i('Older Comments')); ?>
</div>
<div class="nav-next">
<?php next_comments_link(dsq_i('Newer Comments')); ?>
&nbsp;<span class="meta-nav">&rarr;</span>
</div>
</div> <!-- .navigation -->
<?php endif; // check for comment navigation ?>

Expand All @@ -31,8 +32,14 @@

<?php if (get_comment_pages_count() > 1 && get_option('page_comments')): // Are there comments to navigate through? ?>
<div class="navigation">
<div class="nav-previous"><?php previous_comments_link(dsq_i( '<span class="meta-nav">&larr;</span> Older Comments')); ?></div>
<div class="nav-next"><?php next_comments_link(dsq_i( 'Newer Comments <span class="meta-nav">&rarr;</span>')); ?></div>
<div class="nav-previous">
<span class="meta-nav">&larr;</span>
&nbsp;<?php previous_comments_link( dsq_i('Older Comments') ); ?>
</div>
<div class="nav-next">
<?php next_comments_link( dsq_i('Newer Comments') ); ?>
&nbsp;<span class="meta-nav">&rarr;</span>
</div>
</div><!-- .navigation -->
<?php endif; // check for comment navigation ?>

Expand All @@ -41,94 +48,109 @@
<?php endif; ?>
</div>

<script type="text/javascript">
/* <![CDATA[ */
var disqus_url = '<?php echo get_permalink(); ?>';
var disqus_identifier = '<?php echo dsq_identifier_for_post($post); ?>';
var disqus_container_id = 'disqus_thread';
var disqus_domain = '<?php echo DISQUS_DOMAIN; ?>';
var disqus_shortname = '<?php echo strtolower(get_option('disqus_forum_url')); ?>';
var disqus_title = <?php echo cf_json_encode(dsq_title_for_post($post)); ?>;
<?php if (false && get_option('disqus_developer')): ?>
var disqus_developer = 1;
<?php endif; ?>
var disqus_config = function () {
var config = this; // Access to the config object
config.language = '<?php echo esc_js(apply_filters('disqus_language_filter', '')) ?>';

/*
All currently supported events:
* preData — fires just before we request for initial data
* preInit - fires after we get initial data but before we load any dependencies
* onInit - fires when all dependencies are resolved but before dtpl template is rendered
* afterRender - fires when template is rendered but before we show it
* onReady - everything is done
*/

config.callbacks.preData.push(function() {
// clear out the container (its filled for SEO/legacy purposes)
document.getElementById(disqus_container_id).innerHTML = '';
});
<?php if (!get_option('disqus_manual_sync')): ?>
config.callbacks.onReady.push(function() {
// sync comments in the background so we don't block the page
var script = document.createElement('script');
script.async = true;
script.src = '?cf_action=sync_comments&post_id=<?php echo $post->ID; ?>';

var firstScript = document.getElementsByTagName( "script" )[0];
firstScript.parentNode.insertBefore(script, firstScript);
});
<?php endif; ?>
<?php
$sso = dsq_sso();
if ($sso) {
foreach ($sso as $k=>$v) {
echo "this.page.{$k} = '{$v}';\n";
}
echo dsq_sso_login();
}
?>
};
/* ]]> */
</script>

<script type="text/javascript">
/* <![CDATA[ */
var DsqLocal = {
'trackbacks': [
<?php
$count = 0;
foreach ($comments as $comment) {
$comment_type = get_comment_type();
if ( $comment_type != 'comment' ) {
if( $count ) { echo ','; }

global $wp_version;

$embed_vars = array(
'disqusConfig' => array(
'platform' => 'wordpress@'.$wp_version,
'language' => apply_filters( 'disqus_language_filter', '' ),
),
'disqusIdentifier' => dsq_identifier_for_post( $post ),
'disqusShortname' => strtolower( get_option( 'disqus_forum_url' ) ),
'disqusTitle' => dsq_title_for_post( $post ),
'disqusUrl' => get_permalink(),
'options' => array(
'manualSync' => get_option('disqus_manual_sync'),
),
'postId' => $post->ID,
);

// Add SSO vars if enabled
$sso = dsq_sso();
if ($sso) {
global $current_site;

foreach ($sso as $k=>$v) {
$embed_vars['disqusConfig'][$k] = $v;
}

$siteurl = site_url();
$sitename = get_bloginfo('name');
$embed_vars['disqusConfig']['sso'] = array(
'name' => wp_specialchars_decode($sitename, ENT_QUOTES),
'button' => get_option('disqus_sso_button'),
'url' => $siteurl.'/wp-login.php',
'logout' => $siteurl.'/wp-login.php?action=logout',
'width' => '800',
'height' => '700',
);
}

if ( get_option('dsq_external_js') == '1' ) {
wp_register_script( 'dsq_embed_script', plugins_url( '/media/js/disqus.js', __FILE__ ) );
wp_localize_script( 'dsq_embed_script', 'embedVars', $embed_vars );
wp_enqueue_script( 'dsq_embed_script', plugins_url( '/media/js/disqus.js', __FILE__ ) );
}
else {

?>
{
'author_name': <?php echo cf_json_encode(get_comment_author()); ?>,
'author_url': <?php echo cf_json_encode(get_comment_author_url()); ?>,
'date': <?php echo cf_json_encode(get_comment_date('m/d/Y h:i A')); ?>,
'excerpt': <?php echo cf_json_encode(str_replace(array("\r\n", "\n", "\r"), '<br />', get_comment_excerpt())); ?>,
'type': <?php echo cf_json_encode($comment_type); ?>
}
<?php
$count++;
<script type="text/javascript">
var disqus_url = '<?php echo get_permalink(); ?>';
var disqus_identifier = '<?php echo dsq_identifier_for_post($post); ?>';
var disqus_container_id = 'disqus_thread';
var disqus_shortname = '<?php echo strtolower(get_option('disqus_forum_url')); ?>';
var disqus_title = <?php echo cf_json_encode( dsq_title_for_post($post) ); ?>;
var disqus_config_custom = window.disqus_config;
var disqus_config = function () {
/*
All currently supported events:
onReady: fires when everything is ready,
onNewComment: fires when a new comment is posted,
onIdentify: fires when user is authenticated
*/

<?php
$sso = dsq_sso();
if ($sso) {
foreach ($sso as $k=>$v) {
echo 'this.page.' . esc_js($k) . ' = \'' . esc_js($v) . '\';';
echo "\n";
}
echo dsq_sso_login();
}
?>
],
'trackback_url': <?php echo cf_json_encode(get_trackback_url()); ?>
};
/* ]]> */
</script>
?>

this.language = '<?php echo esc_js( apply_filters('disqus_language_filter', '') ) ?>';
<?php if (!get_option('disqus_manual_sync')): ?>
this.callbacks.onReady.push(function () {

// sync comments in the background so we don't block the page
var script = document.createElement('script');
script.async = true;
script.src = '?cf_action=sync_comments&post_id=<?php echo esc_attr( $post->ID ); ?>';

var firstScript = document.getElementsByTagName('script')[0];
firstScript.parentNode.insertBefore(script, firstScript);
});
<?php endif; ?>

if (disqus_config_custom) {
disqus_config_custom.call(this);
}
};

<script type="text/javascript">
/* <![CDATA[ */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript';
dsq.async = true;
dsq.src = '//' + disqus_shortname + '.' + '<?php echo DISQUS_DOMAIN; ?>' + '/embed.js?pname=wordpress&pver=<?php echo DISQUS_VERSION; ?>';
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
/* ]]> */
</script>

<?php

}

?>
Loading