內容簡介
這個外掛提供一個短碼,可顯示來自連結至特殊文章類型的「範本」的內容。「範本」是由此外掛定義的一個特殊文章類型。可以根據標題、路徑或 ID 來進行連結。以下是該範本短碼使用的屬性列表。在虛構的「版權」和「付款條款」範例中,提供了示例。除了必須指定其中之一的「byid」、「bypath」或「bytitle」之外,所有屬性都是可選的:
bytitle:範本的完整區分大小寫標題,例如「Copyright」或「Payment Terms」
bypath:範本的可編輯小寫路徑,例如「copyright」或「payment-terms」(與「/boilerplates/copyright/」或「/boilerplates/payment-terms/」不同)
byid:引用範本文章在 wp_posts 表中的內部 ID,例如 234 或 1273
showtitle:「true」或「false」(預設為「false」);如果是「true」,則範本內容將以編輯畫面中輸入的範本標題作為前綴進行顯示,或者你指定的「標題」屬性作為前綴顯示。
title:用於在特定情況下覆蓋範本顯示標題。當指定「title」時,「showtitle」會隱含地設置為「true」。
titletag:當「showtitle」明確設置為「true」或設置了「title」時,用於包裹標題的 HTML 元素(預設為「h3.」)
id:應用於包裝範本及其可選標題的 div 元素的 HTML「id」屬性。如果未指定,該 div 將不會有「id」設置。
class:應用於包裝範本及其可選標題的 div 元素的 HTML「class」屬性(預設為「boilerplate」)
外掛標籤
開發者團隊
原文外掛簡介
This plugin provides a shortcode that when inserted will display the body from a referenced “boilerplate.” A boilerplate is a special post type defined by this plugin. References can be made by title, path or ID. Below is a list of shortcode attributes used by the boilerplate shortcode. Examples are given for hypothetical “Copyright” and “Payment Terms.” All attributes are optional except one of “byid“, “bypath” or “bytitle” must be specified:
bytitle: The full case-sensitive title of the boilerplate, i.e. “Copyright” or “Payment Terms“
bypath: The editable lowercase path for the boilerplate, i.e. “copyright” or “payment-terms” (vs. “/boilerplates/copyright/” or “/boilerplates/payment-terms/“)
byid: Refers to the internal ID from the wp_posts table for the boilerplate post, i.e. 234 or 1273
showtitle: “true” or “false” (defaults to “false“); if “true” boilerplate content will be prefixed with the title of the boilerplate as entered in the edit screen, or optionally with a “title” attribute you specify.
title: Use to override the displayed title of the boilerplate in specific cases. When “title” is specified “showtitle” is implicity set to “true.”
titletag: HTML element used to wrap the title when “showtitle” is explicity “true” or “title” is set (defaults to “h3.”)
id: The HTML “id” attribute applied to the div element that wraps the boilerplate and it’s optional title. If not specificed the div will not get have an “id” set.
class: The HTML “class” attribute applied to the div& element that wraps the boilerplate and it’s optional title (defailts to “boilerplate.”)
