[wordpress插件] Disqus Conditional JS LoadDisqus条件JS加载

wordpress 插件 文章 2020-04-19 19:50 431 0 全屏看文

AI助手支持GPT4.0

评分
100
描述

Disqus is a third-party comment management system.

Disqus是第三方评论管理系统。

However it loads its javascript code on every page indiscriminately.

但是,它会不加选择地在每个页面上加载其javascript代码。

This code should only be loaded on pages where the comments form is actually going to load.

此代码应仅在实际将要加载注释表单的页面上加载。

Otherwise your site is wasting cycles including javascript that isn’t going to be used.

否则,您的网站将浪费包括不会使用的javascript在内的周期。

This plugin stops the Disqus plugin from loading its javascript on pages or posts where comments are closed.

此插件可阻止 Disqus插件在关闭评论的页面或帖子上加载其javascript。

If comments are closed and there are no existing comments already, the JavaScript will be stopped from loading.

如果评论已关闭并且尚无现有评论,则将停止加载JavaScript。

Note that to avoid breaking the existing functionality, the JavaScript will still load if comments are closed but there are already some comments on a page/post.

请注意,为避免破坏现有功能,如果关闭注释,但页面/帖子上已经有一些注释,JavaScript仍会加载。

Based on http://thomasgriffinmedia.com/blog/2012/11/tame-disqus-comments-in-wordpress/

基于http://thomasgriffinmedia.com/blog/2012/11/tame-disqus-comments-in-wordpress/

Disclaimer: This plugin is not affiliated with or endorsed by Disqus.

免责声明:此插件不与Disqus相关或认可。

If you need help with this plugin

如果您需要有关此插件的帮助

If this plugin breaks your site or just flat out does not work, please go to Compatibility

如果此插件破坏了您的网站或只是无法正常工作,请访问兼容性

a> and click “Broken” after verifying your WordPress version and the version of the plugin you are using.

a>,然后在验证您的WordPress版本和您所使用的插件的版本后,单击“损坏”。

Then, create a thread in the Support forum with a description of the issue.

然后,在支持论坛中创建一个带有问题描述的线程。

Make sure you are using the latest version of WordPress and the plugin before reporting issues, to be sure that the issue is with the current version and not with an older version where the issue may have already been fixed.

在报告问题之前,请确保使用的是最新版本的WordPress和插件,以确保问题出在当前版本上,而不是问题可能已经解决的旧版本上。

Please do not use the Reviews section to report issues

请不要使用评论部分来报告问题

or request new features.

或请求新功能。

安装步骤

    1. Upload plugin file through the WordPress interface.
    2. 通过WordPress界面上传插件文件。

    3. Activate the plugin through the ‘Plugins’ menu in WordPress.
    4. 通过WordPress中的“插件”菜单激活插件。

    5. Load a page/post where comments are open and view the HTML source — the JavaScript for Disqus should be present.

    6. 加载一个打开评论的页面/帖子,并查看HTML源代码-Disqus上应包含针对Disqus的JavaScript。

      Then load a page/post where comments are closed — it should not.

    7. 然后加载关闭评论的页面/帖子-不应。

下载地址
https://downloads.wordpress.org/plugin/disqus-conditional-js-load.zip
-EOF-

AI助手支持GPT4.0