Plugin Directory

Changeset 1919971


Ignore:
Timestamp:
08/05/2018 09:48:50 AM (8 years ago)
Author:
rmmmp
Message:

Fix bug that loads WordPress built-in comments along with Cenchat comments

Location:
cenchat-comments/trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • cenchat-comments/trunk/README.txt

    r1918903 r1919971  
    44Requires at least: 4.9
    55Tested up to: 4.9
    6 Stable tag: 0.0.1
     6Stable tag: 0.0.2
    77Requires PHP: 5.6
    88License: GPLv2 or later
     
    8585== Changelog ==
    8686
     87= 0.0.2 =
     88* Fix bug that loads WordPress built-in comments along with Cenchat comments
     89
    8790= 0.0.1 =
    8891* Initial launch
  • cenchat-comments/trunk/cenchat-comments.php

    r1918901 r1919971  
    1616 * Plugin URI: https://cenchat.com
    1717 * Description: Civilized commenting service.
    18  * Version: 0.0.1
     18 * Version: 0.0.2
    1919 * Author: Cenchat
    2020 * Author URI: http://cenchat.com
     
    3333 * Rename this for your plugin and update it as you release new versions.
    3434 */
    35 define( 'CENCHAT_COMMENTS_VERSION', '0.0.1' );
     35define( 'CENCHAT_COMMENTS_VERSION', '0.0.2' );
    3636
    3737/**
  • cenchat-comments/trunk/includes/class-cenchat-comments.php

    r1882911 r1919971  
    140140        $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' );
    141141        $this->loader->add_action( 'wp_head', $plugin_public, 'add_cenchat_meta' );
    142         $this->loader->add_action( 'comments_template', $plugin_public, 'add_cenchat_comments' );
     142        $this->loader->add_filter( 'comments_template', $plugin_public, 'add_cenchat_comments' );
    143143    }
    144144
  • cenchat-comments/trunk/public/class-cenchat-comments-public.php

    r1882911 r1919971  
    9595    public function add_cenchat_comments() {
    9696        if ( comments_open() ) {
    97             $page_id = get_the_ID();
    98             $value = isset( $page_id ) ? esc_attr( $page_id ) : '';
    99 
    100             $template = sprintf( '<div id="cenchat-comments" data-page-id="%1$s"></div>', esc_attr( $value ) );
    101 
    102             echo $template;
     97            return plugin_dir_path( dirname( __FILE__ ) ) . 'public/partials/cenchat-comments-public-display.php';
    10398        }
    10499    }
Note: See TracChangeset for help on using the changeset viewer.