Plugin Directory

Changeset 3036609


Ignore:
Timestamp:
02/16/2024 12:23:45 AM (2 years ago)
Author:
winrid
Message:

3.15.0 - Support for the Streaming Chat widget.

Location:
fastcomments
Files:
40 added
5 edited

Legend:

Unmodified
Added
Removed
  • fastcomments/trunk/README.txt

    r3017280 r3036609  
    44Requires at least: 4.6
    55Tested up to: 6.4.2
    6 Stable tag: 3.14.0
     6Stable tag: 3.15.0
    77Requires PHP: 5.2.5
    88License: GPLv2 or later
     
    8888== Changelog ==
    8989
     90= 3.15.0 =
     91* Support for the Streaming Chat widget. You can change widgets under Advanced Settings.
     92
    9093= 3.14.0 =
    9194* Support for newer block-based themes.
  • fastcomments/trunk/admin/fastcomments-admin-advanced-settings-view.php

    r2744374 r3036609  
    88    <?php
    99    $updated = false;
    10     if (!empty($_POST['log-level']) && $_POST['log-level'] !== get_option('fastcomments_log_level')) {
     10    if (isset($_POST['log-level']) && $_POST['log-level'] !== get_option('fastcomments_log_level')) {
    1111        update_option('fastcomments_log_level', $_POST['log-level']);
     12        $updated = true;
     13    }
     14    if (isset($_POST['widget']) && $_POST['widget'] !== get_option('fastcomments_widget')) {
     15        update_option('fastcomments_widget', $_POST['widget']);
    1216        $updated = true;
    1317    }
     
    2832        <table class="form-table" role="presentation">
    2933            <tbody>
     34            <tr>
     35                <th scope="row">
     36                    <label for="widget">Widget</label>
     37                </th>
     38                <td>
     39                    <select name="widget" id="widget">
     40                        <option value="0" <?php echo !get_option('fastcomments_widget') || get_option('fastcomments_widget') === "0" ? 'selected' : '' ?> >
     41                            Live Commenting
     42                        </option>
     43                        <option value="1" <?php echo get_option('fastcomments_widget') === "1" ? 'selected' : '' ?> >
     44                            Streaming Chat
     45                        </option>
     46                    </select>
     47                    <p class="description">
     48                        Changes the type of commenting widget used.
     49                    </p>
     50                </td>
     51            </tr>
    3052            <tr>
    3153                <th scope="row">
     
    5173                    </select>
    5274                    <p class="description">
    53                         Changing the log level might be desired to lower the amount of logs FastComments sends to the PHP error log.
     75                        Changing the log level might be desired to lower the amount of logs FastComments sends to the
     76                        PHP error log.
    5477                    </p>
    5578                </td>
  • fastcomments/trunk/fastcomments-wordpress-plugin.php

    r3017280 r3036609  
    44Plugin URI: https://fastcomments.com
    55Description: A live, fast, privacy-focused commenting system.
    6 Version: 3.14.0
     6Version: 3.15.0
    77Author: winrid @ FastComments
    88License: GPL-2.0+
     
    1414}
    1515
    16 $FASTCOMMENTS_VERSION = 3.140;
     16$FASTCOMMENTS_VERSION = 3.150;
    1717
    1818require_once plugin_dir_path(__FILE__) . 'admin/fastcomments-admin.php';
  • fastcomments/trunk/public/fastcomments-widget-view.php

    r3004829 r3036609  
    1212        $cdn = FastCommentsPublic::getCDN();
    1313        $site = FastCommentsPublic::getSite();
    14         wp_enqueue_script( 'fastcomments_widget_embed', "$cdn/js/embed-v2.min.js", array(), $FASTCOMMENTS_VERSION, false );
     14        $widgetType = get_option('fastcomments_widget');
     15        $constructorName = $widgetType === "1" ? 'FastCommentsLiveChat' : 'FastCommentsUI';
     16        $scriptName = $widgetType === "1" ? 'embed-live-chat' : 'embed-v2';
     17        wp_enqueue_script( 'fastcomments_widget_embed', "$cdn/js/$scriptName.min.js", array(), $FASTCOMMENTS_VERSION, false );
    1518        global $post;
    1619        $config = FastCommentsPublic::get_config_for_post($post);
     
    3235                    attempts++;
    3336                    var widgetTarget = document.getElementById('fastcomments-widget');
    34                     if (window.FastCommentsUI && widgetTarget) {
    35                         window.FastCommentsUI(widgetTarget, $jsonFcConfig);
     37                    if (window.$constructorName && widgetTarget) {
     38                        window.$constructorName(widgetTarget, $jsonFcConfig);
    3639                        return;
    3740                    }
  • fastcomments/trunk/uninstall.php

    r2771905 r3036609  
    2121delete_option( 'fastcomments_site' );
    2222delete_option( 'fastcomments_cdn' );
     23delete_option( 'fastcomments_widget' );
    2324
    2425
Note: See TracChangeset for help on using the changeset viewer.