Plugin Directory

Changeset 3142080


Ignore:
Timestamp:
08/27/2024 07:41:05 AM (20 months ago)
Author:
winrid
Message:

3.16.0 - sso setup and other plugin compatibility improvements

Location:
fastcomments
Files:
40 added
3 edited

Legend:

Unmodified
Added
Removed
  • fastcomments/trunk/README.txt

    r3036609 r3142080  
    33Tags: live comments, comments, comment spam, comment system, fast comments, live commenting
    44Requires at least: 4.6
    5 Tested up to: 6.4.2
    6 Stable tag: 3.15.0
     5Tested up to: 6.6.2
     6Stable tag: 3.16.0
    77Requires PHP: 5.2.5
    88License: GPLv2 or later
     
    8888== Changelog ==
    8989
     90= 3.16.0 =
     91* Improved compatibility with some other plugins like LearnDash LMS.
     92* Adds some flexibility around SSO Setup.
     93
    9094= 3.15.0 =
    9195* Support for the Streaming Chat widget. You can change widgets under Advanced Settings.
  • fastcomments/trunk/admin/fastcomments-admin-sso-view.php

    r2744374 r3142080  
    1414    </a>
    1515    <h3>FastComments Single-Sign-On</h3>
     16
     17    <?php if (!get_option('users_can_register')) { ?>
     18        <p>
     19            You're almost there! Note! You don't have the option "users can register" enabled. Assuming you're not
     20            handling memberships via another plugin, you
     21            might want to turn that on <a href="<?php echo admin_url('options-general.php') ?>">here</a> by enabling
     22            "Anyone can register".
     23        </p>
     24    <?php } ?>
    1625    <?php if (get_option('fastcomments_sso_enabled')) { ?>
    17         <?php if (get_option('users_can_register')) { ?>
    18             <div class="notice notice-success is-dismissible hidden" id="sso-disabled-success">
    19                 <p><strong>SSO Disabled! <a href="<?php echo get_admin_url(null, "admin.php?page=fastcomments&sub_page=sso", null) ?>">Refresh</a>.</strong></p>
    20                 <button type="button" class="notice-dismiss">
    21                     <span class="screen-reader-text">Dismiss this notice.</span>
     26        <div class="notice notice-success is-dismissible hidden" id="sso-disabled-success">
     27            <p><strong>SSO Disabled! <a
     28                            href="<?php echo get_admin_url(null, "admin.php?page=fastcomments&sub_page=sso", null) ?>">Refresh</a>.</strong>
     29            </p>
     30            <button type="button" class="notice-dismiss">
     31                <span class="screen-reader-text">Dismiss this notice.</span>
     32            </button>
     33        </div>
     34        <div class="notice notice-error is-dismissible hidden" id="sso-disabled-failure">
     35            <p><strong>SSO Failed to be disabled! Please refresh the page and try again. If it continues to fail,
     36                    contact FastComments support.</strong></p>
     37            <button type="button" class="notice-dismiss">
     38                <span class="screen-reader-text">Dismiss this notice.</span>
     39            </button>
     40        </div>
     41        <p>SSO, or Single-Sign-On, allows you and your users to use accounts on your WordPress site to comment.</p>
     42        <span class="sso-enabled-badge">✔️ SSO Enabled</span>
     43        <button class="button-primary" id="fc-sso-disable">Disable SSO</button>
     44
     45        <div id="dialog-disable-sso" class="hidden">
     46            <h3>Are you sure?</h3>
     47            <p>Disabling SSO will mean that users of your blog will use the default FastComments sign up mechanism (they
     48                will leave their username/email while commenting).</p>
     49            <p>Disabling SSO will take effect immediately and any logged in users will have to create a new account the
     50                next time they load a page.</p>
     51            <p class="submit">
     52                <button type="button" class="button button-primary" id="fc-sso-disable-confirm-button">Disable SSO Now
    2253                </button>
    23             </div>
    24             <div class="notice notice-error is-dismissible hidden" id="sso-disabled-failure">
    25                 <p><strong>SSO Failed to be disabled! Please refresh the page and try again. If it continues to fail, contact FastComments support.</strong></p>
    26                 <button type="button" class="notice-dismiss">
    27                     <span class="screen-reader-text">Dismiss this notice.</span>
    28                 </button>
    29             </div>
    30             <p>SSO, or Single-Sign-On, allows you and your users to use accounts on your WordPress site to comment.</p>
    31             <span class="sso-enabled-badge">✔️ SSO Enabled</span>
    32             <button class="button-primary" id="fc-sso-disable">Disable SSO</button>
    33 
    34             <div id="dialog-disable-sso" class="hidden">
    35                 <h3>Are you sure?</h3>
    36                 <p>Disabling SSO will mean that users of your blog will use the default FastComments sign up mechanism (they will leave their username/email while commenting).</p>
    37                 <p>Disabling SSO will take effect immediately and any logged in users will have to create a new account the next time they load a page.</p>
    38                 <p class="submit">
    39                     <button type="button" class="button button-primary" id="fc-sso-disable-confirm-button">Disable SSO Now</button>
    40                     <button type="button" class="button" id="fc-sso-disable-cancel-button">Cancel</button>
    41                 </p>
    42             </div>
    43         <?php } else { ?>
    44             <p>
    45                 You're almost there! Before FastComments SSO can work single-sign-on WordPress must be configured to let
    46                 anybody sign up on your site.<br>
    47                 You can do that <a href="<?php echo admin_url('options-general.php') ?>">here</a> by enabling "Anyone
    48                 can register" - then come back to this page.
     54                <button type="button" class="button" id="fc-sso-disable-cancel-button">Cancel</button>
    4955            </p>
    50         <?php } ?>
     56        </div>
    5157    <?php } else { ?>
    5258        <div class="notice notice-success is-dismissible hidden" id="sso-enabled-success">
    53             <p><strong>SSO Enabled! <a href="<?php echo get_admin_url(null, "admin.php?page=fastcomments&sub_page=sso", null) ?>">Refresh</a>.</strong></p>
     59            <p><strong>SSO Enabled! <a
     60                            href="<?php echo get_admin_url(null, "admin.php?page=fastcomments&sub_page=sso", null) ?>">Refresh</a>.</strong>
     61            </p>
    5462            <button type="button" class="notice-dismiss">
    5563                <span class="screen-reader-text">Dismiss this notice.</span>
     
    5765        </div>
    5866        <div class="notice notice-error is-dismissible hidden" id="sso-enabled-failure">
    59             <p><strong>SSO Failed to be enabled! Please refresh the page and try again. If it continues to fail, contact FastComments support.</strong></p>
     67            <p><strong>SSO Failed to be enabled! Please refresh the page and try again. If it continues to fail, contact
     68                    FastComments support.</strong></p>
    6069            <button type="button" class="notice-dismiss">
    6170                <span class="screen-reader-text">Dismiss this notice.</span>
     
    6877            new users as they will have to sign up to your WordPress site.
    6978        </p>
    70         <?php if (get_option('users_can_register')) { ?>
    71             <button class="button-primary" id="fc-sso-enable">Enable SSO</button>
     79        <button class="button-primary" id="fc-sso-enable">Enable SSO</button>
    7280
    73             <div id="dialog-enable-sso" class="hidden">
    74                 <h3>Are you sure?</h3>
    75                 <p>Enabling SSO will mean that users of your blog will use your WordPress site to sign in, instead of the default FastComments sign up mechanism (they will <b>not</b> leave their username/email while commenting).</p>
    76                 <p>Enabling SSO will take effect immediately.</p>
    77                 <p class="submit">
    78                     <button type="button" class="button button-primary" id="fc-sso-enable-confirm-button">Enable SSO Now</button>
    79                     <button type="button" class="button" id="fc-sso-enable-cancel-button">Cancel</button>
    80                 </p>
    81             </div>
    82         <?php } else { ?>
    83             <p>
    84                 You're almost there! Before enabling single-sign-on WordPress must be configured to let anybody sign up
    85                 on your site.<br>
    86                 You can do that <a href="<?php echo admin_url('options-general.php') ?>">here</a> by enabling "Anyone
    87                 can register" - then come back to this page.
     81        <div id="dialog-enable-sso" class="hidden">
     82            <h3>Are you sure?</h3>
     83            <p>Enabling SSO will mean that users of your blog will use your WordPress site to sign in, instead of
     84                the default FastComments sign up mechanism (they will <b>not</b> leave their username/email while
     85                commenting).</p>
     86            <p>Enabling SSO will take effect immediately.</p>
     87            <p class="submit">
     88                <button type="button" class="button button-primary" id="fc-sso-enable-confirm-button">Enable SSO
     89                    Now
     90                </button>
     91                <button type="button" class="button" id="fc-sso-enable-cancel-button">Cancel</button>
    8892            </p>
    89         <?php } ?>
     93        </div>
    9094    <?php } ?>
    9195    <?php
    92         global $FASTCOMMENTS_VERSION;
    93         wp_enqueue_script('fastcomments_admin_sso_view', plugin_dir_url(__FILE__) . 'fastcomments-admin-sso-view.js', array(), $FASTCOMMENTS_VERSION);
     96    global $FASTCOMMENTS_VERSION;
     97    wp_enqueue_script('fastcomments_admin_sso_view', plugin_dir_url(__FILE__) . 'fastcomments-admin-sso-view.js', array(), $FASTCOMMENTS_VERSION);
    9498    ?>
    95     <?php wp_localize_script('fastcomments_admin_sso_view', 'FC_DATA', array( 'siteUrl' => get_site_url(), 'nonce' => wp_create_nonce('wp_rest') )); ?>
     99    <?php wp_localize_script('fastcomments_admin_sso_view', 'FC_DATA', array('siteUrl' => get_site_url(), 'nonce' => wp_create_nonce('wp_rest'))); ?>
    96100</div>
  • fastcomments/trunk/fastcomments-wordpress-plugin.php

    r3036609 r3142080  
    1414}
    1515
    16 $FASTCOMMENTS_VERSION = 3.150;
     16$FASTCOMMENTS_VERSION = 3.160;
    1717
    1818require_once plugin_dir_path(__FILE__) . 'admin/fastcomments-admin.php';
     
    7676// Comments can load as long as we have a tenant id.
    7777if (get_option('fastcomments_tenant_id')) {
    78     add_filter('comments_template', 'fc_comments_template', 100);
     78    add_filter('comments_template', 'fc_comments_template', 9001);
    7979    function fc_comment_block_template($block_content, $parsed_block)
    8080    {
     
    8888    }
    8989
    90     add_filter('pre_render_block', 'fc_comment_block_template', 100, 2);
    91     add_filter('comments_number', 'fc_comment_count_template', 100);
     90    add_filter('pre_render_block', 'fc_comment_block_template', 9002, 2);
     91    add_filter('comments_number', 'fc_comment_count_template', 9002);
    9292    add_filter('wp_enqueue_scripts', 'fc_add_comment_count_scripts', 100);
    9393    add_filter('wp_footer', 'fc_add_comment_count_config', 100);
Note: See TracChangeset for help on using the changeset viewer.