Plugin Directory

Changeset 2538249


Ignore:
Timestamp:
05/26/2021 09:50:04 PM (5 years ago)
Author:
Disqus
Message:

Preparing for 3.0.22 release

Location:
disqus-comment-system/trunk
Files:
4 added
4 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • disqus-comment-system/trunk/README.txt

    r2466762 r2538249  
    44Requires at least: 4.4
    55Tested up to: 5.6
    6 Stable tag: 3.0.21
     6Stable tag: 3.0.22
    77Requires PHP: 5.6
    88
     
    125125== Changelog ==
    126126
    127 = 3.0.20 =
     127= 3.0.22 =
     128* Added improvements to manual comment syncing (thanks Artem Russakovskii)
     129* Fixed a bug with the embed handling pages with missing container IDs
     130* Fixed a bug with REST URLs handling emtpy host configurations
     131
     132= 3.0.21 =
    128133* Fixed issue with mismatched DISQUSVERSION causing admin issues
    129134
  • disqus-comment-system/trunk/admin/class-disqus-admin.php

    r2044176 r2538249  
    160160    public function dsq_filter_rest_url( $rest_url ) {
    161161        $rest_url_parts = parse_url( $rest_url );
    162         $rest_host = $rest_url_parts['host'];
    163         if ( array_key_exists( 'port', $rest_url_parts ) ) {
    164             $rest_host .= ':' . $rest_url_parts['port'];
    165         }
    166 
    167         $current_host = isset( $_SERVER['HTTP_HOST'] ) ? $_SERVER['HTTP_HOST'] : $rest_host;
    168 
    169         if ( $rest_host !== $current_host ) {
    170             $rest_url = preg_replace( '/' . $rest_host . '/', $current_host, $rest_url, 1 );
     162        if ( array_key_exists( 'host', $rest_url_parts ) ) {
     163            $rest_host = $rest_url_parts['host'];
     164            if ( array_key_exists( 'port', $rest_url_parts ) ) {
     165                $rest_host .= ':' . $rest_url_parts['port'];
     166            }
     167
     168            $current_host = isset( $_SERVER['HTTP_HOST'] ) ? $_SERVER['HTTP_HOST'] : $rest_host;
     169
     170            if ( $rest_host !== $current_host ) {
     171                $rest_url = preg_replace( '/' . $rest_host . '/', $current_host, $rest_url, 1 );
     172            }
    171173        }
    172174
  • disqus-comment-system/trunk/disqus.php

    r2466762 r2538249  
    1616 * Plugin URI:        https://disqus.com/
    1717 * Description:       Disqus helps publishers increase engagement and build loyal audiences. Supports syncing comments to your database for easy backup.
    18  * Version:           3.0.21
     18 * Version:           3.0.22
    1919 * Author:            Disqus
    2020 * Author URI:        https://disqus.com/
     
    2525 */
    2626
    27 $DISQUSVERSION = '3.0.21';
     27$DISQUSVERSION = '3.0.22';
    2828
    2929// If this file is called directly, abort.
  • disqus-comment-system/trunk/public/js/comment_embed.js

    r1817585 r2538249  
    2424
    2525(function() {
    26     var dsq = document.createElement('script');
    27     dsq.type = 'text/javascript';
    28     dsq.async = true;
    29     dsq.src = 'https://' + disqus_shortname + '.disqus.com/embed.js';
    30     (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
     26    if (document.getElementById(disqus_container_id)) {
     27        var dsq = document.createElement('script');
     28        dsq.type = 'text/javascript';
     29        dsq.async = true;
     30        dsq.src = 'https://' + disqus_shortname + '.disqus.com/embed.js';
     31        (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
     32    }
    3133})();
Note: See TracChangeset for help on using the changeset viewer.