Plugin Directory

Changeset 3017280


Ignore:
Timestamp:
01/04/2024 06:58:29 AM (2 years ago)
Author:
winrid
Message:

3.14.0 - Support for newer block-based templates.

Location:
fastcomments
Files:
40 added
2 edited

Legend:

Unmodified
Added
Removed
  • fastcomments/trunk/README.txt

    r3004829 r3017280  
    44Requires at least: 4.6
    55Tested up to: 6.4.2
    6 Stable tag: 3.13.0
     6Stable tag: 3.14.0
    77Requires PHP: 5.2.5
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    1010
    11 A fast, live comment system that will delight your users and developers.
     11A live, fast, privacy-focused commenting system.
    1212
    1313FastComments prioritizes speed and user experience above all else. It doesn't spy on you or your users and has the features you care about.
     
    8888== Changelog ==
    8989
     90= 3.14.0 =
     91* Support for newer block-based themes.
     92
    9093= 3.13.0 =
    9194* Comment section now respects post password protection requirements (it will not show).
  • fastcomments/trunk/fastcomments-wordpress-plugin.php

    r3004829 r3017280  
    33Plugin Name: FastComments
    44Plugin URI: https://fastcomments.com
    5 Description: Live Comments, Fast. A comment system that will delight your users and developers.
    6 Version: 3.13.0
     5Description: A live, fast, privacy-focused commenting system.
     6Version: 3.14.0
    77Author: winrid @ FastComments
    88License: GPL-2.0+
     
    1414}
    1515
    16 $FASTCOMMENTS_VERSION = 3.130;
     16$FASTCOMMENTS_VERSION = 3.140;
    1717
    1818require_once plugin_dir_path(__FILE__) . 'admin/fastcomments-admin.php';
     
    2222
    2323// Returns the FastComments embed comments template
    24 function fc_comments_template() {
     24function fc_comments_template()
     25{
    2526    $path = plugin_dir_path(__FILE__) . 'public/fastcomments-widget-view.php';
    2627    if (!file_exists($path)) {
     
    3233// Returns the FastComments embed comments template
    3334// This method takes more arguments, like post id, but we found it not to be reliable.
    34 function fc_comment_count_template($text_no_comments = "") {
     35function fc_comment_count_template($text_no_comments = "")
     36{
    3537    global $post;
    3638    $post_id = -1;
     
    4345
    4446// Sets up the FastComments embed comment count script if needed. This is done this way, with wp_footer, to prevent loading an external script.
    45 function fc_add_comment_count_scripts() {
     47function fc_add_comment_count_scripts()
     48{
    4649    global $post;
    4750
     
    5659
    5760// Sets up the FastComments embed comment count script if needed. This is done this way, with wp_footer, to prevent loading an external script.
    58 function fc_add_comment_count_config() {
     61function fc_add_comment_count_config()
     62{
    5963    global $post;
    6064
     
    7377if (get_option('fastcomments_tenant_id')) {
    7478    add_filter('comments_template', 'fc_comments_template', 100);
     79    function fc_comment_block_template($block_content, $parsed_block)
     80    {
     81        if ('core/comments' === $parsed_block['blockName'] && get_option('fastcomments_tenant_id')) {
     82            $path = fc_comments_template();
     83            ob_start();
     84            require_once $path;
     85            return ob_get_clean();
     86        }
     87        return $block_content;
     88    }
     89
     90    add_filter('pre_render_block', 'fc_comment_block_template', 100, 2);
    7591    add_filter('comments_number', 'fc_comment_count_template', 100);
    7692    add_filter('wp_enqueue_scripts', 'fc_add_comment_count_scripts', 100);
     
    7894}
    7995
    80 function fastcomments_cron() {
     96function fastcomments_cron()
     97{
    8198    require_once plugin_dir_path(__FILE__) . 'core/FastCommentsWordPressIntegration.php';
    8299    $fastcomments = new FastCommentsWordPressIntegration();
     
    88105add_action('fastcomments_cron_hook', 'fastcomments_cron');
    89106
    90 function fastcomments_activate() {
     107function fastcomments_activate()
     108{
    91109    require_once plugin_dir_path(__FILE__) . 'core/FastCommentsWordPressIntegration.php';
    92110    $fastcomments = new FastCommentsWordPressIntegration();
     
    94112}
    95113
    96 function fastcomments_deactivate() {
     114function fastcomments_deactivate()
     115{
    97116    require_once plugin_dir_path(__FILE__) . 'core/FastCommentsWordPressIntegration.php';
    98117    $fastcomments = new FastCommentsWordPressIntegration();
     
    100119}
    101120
    102 function fastcomments_update() {
     121function fastcomments_update()
     122{
    103123    require_once plugin_dir_path(__FILE__) . 'core/FastCommentsWordPressIntegration.php';
    104124    $fastcomments = new FastCommentsWordPressIntegration();
Note: See TracChangeset for help on using the changeset viewer.