內容簡介
當你的部落格載入後,所有類別為 .more-link (Read more 的 WordPress 標准 css 類別)的連結會被修改,不再將使用者導向按下連結後該篇文章的單頁顯示。相反地,WordPress 資料庫會查詢該特定文章,只回傳<!–more–> 標籤之後的所有內容,並立即以簡單的動畫效果(可在外掛設定中停用)與原本開頭的內容一起顯示。
AJAX-read-more 使用 WordPress 安裝中已含有的 jQuery 框架。
此外掛使用 GET ajax 動作(而非其他外掛使用的 POST 動作),以及 WordPress 的 “template_redirect” 動作。
支援快取外掛(例如 Hyper Cache Extended)。
AJAX-read-more:進度顯示器和其他行為的設計 - 由CSS(例如 css / all.css)實現。
安全的快取指令集與CSS url。
請參閱外掛選項頁面以檢查選項。
特別感謝 [email protected] 進行外掛的除錯。
主題要求:
您的主題必須生成正確的 DOM 結構:
(div id = & #8221;#content#8221;)
…
(div class = & #8221; post")
…
(/div)
(/div)
主題必須支援頁腳(wp_footer)。如果不支援,您可以在外掛設定頁面更改相關選項。
欲知詳細資訊,請參閱 Sergey S. Betke的部落格。
代辦事項
下一個版本或之後:
* WordPress 核心整合快取標頭處理???
* 可選的 http 快取控制內容時間最大值和必須重新驗證
* 僅在文章有限制存取權限時才會發送私人快取標頭
* 檢查快取外掛支援(Hyper Cache Extended):當文章修改時清除已快取的回應
* 快取控制和最後修改標頭 - 分開的外掛
* 如果修改標頭,支援 if-modified 的 HTTP 要求(另外的外掛)
* 可選的 the_excerpt 支援
* AJAX-read-more 發送正確的 http 快取控制標頭,可以完全支援客戶端公共快取。
* WP 3.3: http://wpdevel.wordpress.com/tag/3-3-dev-notes/
* WP 3.3: wp_localize_script() 所有 WP 3.3 以上已不支援非字串參數的功能,可以改用 wp_add_script_before() 取代。
* WP 3.3: wp_enqueue_script() 現在可以在頁面中當需要時插入腳本
外掛標籤
開發者團隊
原文外掛簡介
When your blog is loaded, all links of this class .more-link (standard wordpress css class for “Read more…”
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
after the tag (i.e. only what you need) is returned.
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.
This plugin used GET ajax action (not POST, like other plugins), wordpress “template_redirect” action.
It’s compatible with cache plugins (like Hyper Cache Extended).
AJAX-read-more: design of progress indicator and other behaviors – by CSS (example – in css/all.css)
cache-safe script and css url
Check plugin options on options page.
Thanks for debugging to [email protected].
Theme requirements:
Your theme must generate correct DOM structure:
(div id=”#content”)
…
(div class=”post”)
…
(/div)
(/div)
Theme must support footer (wp_footer). If not, you can change corresponding option on plugin option page.
For more information, please visit the Sergey S. Betke blog.
ToDo
The next version or later:
* wordpress core integration for cache headers processing???
* optional http cache-control max-age header value and must-revalidate
* 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
* if-modified http request support (separate plugins)
* the_excerpt optional support
* AJAX-read-more send correct http cache-control headers, and fully support client-side public cache.
* 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_localize_script doesn’t support non-string params in WP 3.3+
* WP 3.3: wp_enqueue_script() now works mid-page – insert scripts just into pages when it’t needed
