[WordPress] 外掛分享: Bg Book Publisher

首頁外掛目錄 › Bg Book Publisher
⚠ 此外掛已下架 — 不再更新維護,建議勿安裝。
30+
安裝啟用
★★★★★
5/5 分(1 則評價)
1022 天前
最後更新
問題解決
WordPress 3.0.1+ PHP 5.3+ v1.25 上架:2017-11-03

內容簡介

當您保存一篇文章時,此外掛會將其分成多頁並在每個頁面頂部添加一個摺疊式的目錄。

在編輯文章的頁面上,您可以設置目錄中包含的標題的最大級別以及分頁的標題級別(請參見屏幕截圖)。

您可以將標題級別設置為1到6級,也可以取消在此文章上運行此外掛的操作,方法是取消勾選“這篇文章是書籍”項目。

您還可以設置已發布書籍的作者,這將直接顯示在文章標題中。
為將書籍作者的名稱插入到文章中,您也可以使用短代碼[book_author]或在頁面模板中使用PHP功能bg_bpub_book_author($post_id)。

要自定義文章外觀,您可以使用以下類:
1. bg_bpub_toc - 包含目錄的容器(div)的類。
2. bg_bpub_toc_h1...bg_bpub_toc_h6 - 目錄中各章的標題類。
3. bg_bpub_book_author - 包含書籍作者姓名的容器(span)的類。

譯者注意

您可以使用位於languages文件夾中的POT文件,並使用PoEdit程序(http://www.poedit.net/)來翻譯此外掛。
有關翻譯WordPress外掛的詳細信息,請參閱“翻譯WordPress”(https://codex.wordpress.org/Translating_WordPress)。

請將您的PO文件發送給我。我將在下一個版本中插入它們。

許可證

GNU通用公共許可證第2版

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.25) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Bg Book Publisher」→ 直接安裝(推薦)

原文外掛簡介

When you save a post, the plugin splits it into pages and adds a table of contents in the form of a spoiler to the top of each page.
On the post editing page you can set the maximum level of headers included in the table of contents and the level of headings where you break the pages (see screenshot).
You can set the header levels from 1 to 6, and also disable the action of the plug-in for this post by unchecking the item ‘this post is book’.
You can also set the author of the published book, which will be showed directly in the post title.
To insert name of book author into the text you can also use shortcode [book_author] or PHP-function bg_bpub_book_author($post_id) in page template.
CSS
To customize the post appearance, you can use the following classes:
1. bg_bpub_toc – class of contaner (div) with table of contents.
2. bg_bpub_toc_h1 … bg_bpub_toc_h6 – classes of chapter headers in table of contents.
3. bg_bpub_book_author – class of contaner (span) with name of book author.
PHP filters

bg_bpub_post_types – array of post types processed by the plugin, default is [‘post’, ‘page’];

bg_bpub_title – title html after book author is added;

bg_toc – html output of the TOC;

Notes for Translators
You can translate this plugin using POT-file in languages folder with program PoEdit (http://www.poedit.net/).
More in detail about translation WordPress plugins, see “Translating WordPress” (https://codex.wordpress.org/Translating_WordPress).
Send me your PO-files. I will insert them in plugin in next version.
License
GNU General Public License v2

延伸相關外掛

文章
Filter
Apply Filters
Mastodon