Plugin Directory

Changeset 1819436


Ignore:
Timestamp:
02/09/2018 11:03:17 PM (8 years ago)
Author:
ryanv12
Message:

Preparing for 3.0.12 release

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

Legend:

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

    r1818662 r1819436  
    44Requires at least: 4.4
    55Tested up to: 4.9.4
    6 Stable tag: 3.0.11
     6Stable tag: 3.0.12
    77Requires PHP: 5.4
    88
     
    123123== Changelog ==
    124124
     125= 3.0.12 =
     126
     127* Disabled browser autocomplete for site configuration form
     128* Fixed an issue where admin JavaScript bundle was missing for sites with WP_DEBUG enabled
     129* Implemented a dsq_can_load filter for custom control of when Disqus loads
     130
    125131= 3.0.11 =
    126132
  • disqus-comment-system/trunk/disqus.php

    r1818662 r1819436  
    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.11
     18 * Version:           3.0.12
    1919 * Author:            Disqus
    2020 * Author URI:        https://disqus.com/
     
    6969function run_disqus() {
    7070
    71     $plugin = new Disqus( '3.0.11' );
     71    $plugin = new Disqus( '3.0.12' );
    7272    $plugin->run();
    7373
  • disqus-comment-system/trunk/public/class-disqus-public.php

    r1817585 r1819436  
    165165        global $post;
    166166
    167         if ( $this->dsq_can_load() ) {
     167        if ( $this->dsq_can_load( 'count' ) ) {
    168168            $disqus_identifier = esc_attr( $this->dsq_identifier_for_post( $post ) );
    169169            return '<span class="dsq-postid" data-dsqidentifier="' . $disqus_identifier . '">'
     
    210210     */
    211211    public function enqueue_comment_count() {
    212         if ( $this->dsq_can_load() ) {
     212        if ( $this->dsq_can_load( 'count' ) ) {
    213213
    214214            $count_vars = array(
     
    243243     * @since     3.0
    244244     * @access    private
    245      * @return    boolean    Whether Disqus is configured properly and can load on the current page.
    246      */
    247     private function dsq_can_load() {
     245     * @param     string $script_name    The name of the script Disqus intends to load.
     246     * @return    boolean                Whether Disqus is configured properly and can load on the current page.
     247     */
     248    private function dsq_can_load( $script_name ) {
    248249        // Don't load any Disqus scripts if there's no shortname.
    249250        if ( ! $this->shortname ) {
     
    254255        if ( is_feed() ) {
    255256            return false;
     257        }
     258
     259        $site_allows_load = apply_filters( 'dsq_can_load', $script_name );
     260        if ( is_bool( $site_allows_load ) ) {
     261            return $site_allows_load;
    256262        }
    257263
     
    270276        // Checks if the plugin is configured properly
    271277        // and is a valid page.
    272         if ( ! $this->dsq_can_load() ) {
     278        if ( ! $this->dsq_can_load( 'embed' ) ) {
    273279            return false;
    274280        }
Note: See TracChangeset for help on using the changeset viewer.