[wordpress插件] AJAX Read MoreAJAX了解更多

wordpress 插件 文章 2020-02-14 03:40 514 0 全屏看文

AI助手支持GPT4.0

评分

100

100

描述

When your blog is loaded, all links of this class .more-link (standard wordpress css class for “Read more…”

加载博客后,此类的所有链接 .more-link (标准的wordpress css类用于“阅读更多...”

links) are modified to no longer send the user to that post’s

链接)被修改为不再将用户吸引到该帖子的

single page display when clicked.

单击时显示单页。

Instead, the WordPress database is queried for that specific post, and all content

取而代之的是,向WordPress数据库查询该特定帖子以及所有内容

after the tag (i.e. only what you need) is returned.

返回 <!– more –> 标记(即仅您需要的)之后。

The new content is then immediately displayed to the user with light animation (You can disable animation in plugin options),

然后,新内容立即以轻动画显示给用户(您可以在插件选项中禁用动画),

inline with the opening content.

符合开幕内容。

    • AJAX-read-more uses the jQuery framework already included with WordPress installations.
    • AJAX-read-more使用WordPress安装中已随附的jQuery框架。

    • This plugin used GET ajax action (not POST, like other plugins), wordpress “template_redirect” action.
    • 此插件使用了 GET ajax操作(不像其他插件一样使用POST),wordpress “ template_redirect” 操作。

    • It’s compatible with cache plugins (like Hyper Cache Extended).
    • 它与缓存插件(例如Hyper Cache Extended)兼容。

    • AJAX-read-more: design of progress indicator and other behaviors – by CSS (example – in css/all.css)
    • AJAX-read-more:通过CSS设计进度指示器和其他行为(例如,在css / all.css中)

    • cache-safe script and css url
    • 缓存安全脚本和CSS网址

    Check plugin options on options page.

    在选项页面上检查插件选项。

    Thanks for debugging to den@10-13.ru.

    感谢您调试到den@10-13.ru。

    Theme requirements:

    主题要求:

      • Your theme must generate correct DOM structure:

      • 您的主题必须生成正确的DOM结构

        (div id=”#content”)

        (div id =“#content”)



        (div class=”post”)
            

        (div class =“ post”)
            



        (/div)

        (/ div)

        (/div)

      • (/ div)

      • Theme must support footer (wp_footer).

      • 主题必须支持 footer (wp_footer)。

        If not, you can change corresponding option on plugin option page.

      • 如果没有,您可以在插件选项页面上更改相应的选项。

      For more information, please visit the Sergey S.

      有关更多信息,请访问 SergeyS。

      Betke blog.

      Betke博客。

      ToDo

      待办事项

      The next version or later:

      下一版本或更高版本:

      * wordpress core integration for cache headers processing???

      * Wordpress核心集成,用于缓存头处理??

      * optional http cache-control max-age header value and must-revalidate

      *可选的http缓存控件最大年龄标头值和必须重新验证

      * just private cache headers, when post has limited access

      *仅用于私有缓存头,当帖子访问受限时

      * check cache plugins support (Hyper Cache Extended): clear cached responces when post modified

      *检查缓存插件支持(扩展的超高速缓存):修改后清除缓存的响应

      * cache-control and Last-Modification headers – to separate plugins

      *缓存控制和Last-Modification标头–分隔插件

      * if-modified http request support (separate plugins)

      * 如果已修改 http请求支持(单独的插件)

      * the_excerpt optional support

      * the_excerpt 可选支持

      * AJAX-read-more send correct http cache-control headers, and fully support client-side public cache.

      * AJAX-read-more发送正确的http缓存控制标头,并完全支持客户端公共缓存。

      * WP 3.3: http://wpdevel.wordpress.com/tag/3-3-dev-notes/

      * WP 3.3:http://wpdevel.wordpress.com/tag/3-3-dev-notes/

      * WP 3.3: replace wp_localize_script() with wp_add_script_before().

      * WP 3.3:将wp_localize_script()替换为wp_add_script_before()。

      wp_localize_script doesn’t support non-string params in WP 3.3+

      wp_localize_script在WP 3.3+中不支持非字符串参数。

      * WP 3.3: wp_enqueue_script() now works mid-page – insert scripts just into pages when it’t needed

      * WP 3.3:wp_enqueue_script()现在可在页面中间运行–在不需要时将脚本插入页面中

安装步骤

Simple:

简单:

    1. Upload the AJAX-read-more directory (“unzipped”) to the /wp-content/plugins/ directory
    2. AJAX-read-more 目录(“解压缩”)上载到 / wp-content / plugins / 目录

    3. Find “AJAX Read More” in the ‘Plugins’ menu in WordPress and click “Activate”
    4. 在WordPress的“插件”菜单中找到“ AJAX阅读更多”,然后单击“激活”

      • PHP 5.2
      • PHP 5.2

      • Your theme must generate correct DOM structure:

      • 您的主题必须生成正确的DOM结构

        (div id=”#content”)

        (div id =“#content”)



        (div class=”post”)
            

        (div class =“ post”)
            



        (/div)

        (/ div)

        (/div)

      • (/ div)

      • Theme must support footer (wp_footer).

      • 主题必须支持 footer (wp_footer)。

        If not, you can change plugin options on options page.

      • 如果没有,您可以在选项页面上更改插件选项。

      That’s It!

      就是这样!

下载地址

https://downloads.wordpress.org/plugin/ajax-read-more.zip

https://downloads.wordpress.org/plugin/ajax-read-more.zip

-EOF-

AI助手支持GPT4.0