前言介紹
- 這款 WordPress 外掛「Spots」是 2011-09-27 上架。
- 目前有 1000 個安裝啟用數。
- 上一次更新是 2022-09-29,距離現在已有 947 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
- 外掛最低要求 WordPress 4.0 以上版本才可以安裝。
- 有 10 人給過評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
spectacula | cm2creative | interconnectit |
外掛標籤
spots | widget | elements | content management |
內容簡介
在 interconnect/it,我們的開發客戶網站的方針是「全內容管理!」這表示網站上的小提示、小工具等不僅要進行內容管理,而且它們對於終端使用者和開發人員來說都應該易於處理。
因此,我們開發了 Spots。這將創建一個自定義文章類型,使您可以使用視覺編輯器創建小工具,同時還為主題中的內容管理元素創建了一個易於使用的鉤子。
現在,此外掛使用快取以幫助確保 typyal 網站上的負載保持最小。性能很重要!
此外掛已準備好進行翻譯,如果您想向我們提交翻譯,可以通過我們的網站聯繫我們。
開發人員注意事項
Spots 為開發人員提供了 2 個模板標籤,具體如下:
icit_spot( $id_or_name, $template );
$id_or_name:必填,數字 ID 或字符串形式的スポット名。
$template:可選,String 用於調用 get_template_part()
此模板標籤始終會顯示出該小工具。
icit_get_spot( $id_or_name, $template, $echo );
與上述相同,但帶有一個額外的參數:
$echo:可選,預設為 false。布林值,指示是輸出還是只返回小工具內容。
一般用法
您可以使用 Spots 替換主題中的樣板文本。如果您在主題中有區域通常要硬編碼文本,您可以使用以下代碼:
if ( function_exists( 'icit_spot' ) )
icit_spot( 'Copyright' );
?>
上述代碼會輸出標題為「Copyright」的小工具內容。如果該小工具不存在,則會以草稿形式創建。草稿模式下的小工具僅對帶有編輯功能的已登錄用戶可見。
模板
此外掛最初將使用 get_template_part() 函數查找主題中的文件。如果您的主題中有一個名為 spot.php 的文件,則將其用於所有小工具的默認模板。 icit_spot() 函數可以使用第二個參數表示要使用的模板部分,例如:
if ( function_exists( 'icit_spot' ) )
icit_spot( 'Copyright', 'copyright' );
?>
上述代碼將使插件在主題文件夾中查找名為 spot-copyright.php 的文件,用於輸出。如果該文件不可用,它會退回到 spot.php,如果仍然不可用,它將簡單地輸出小工具內容。
當您想要顯示小工具中的特色圖像或需要某些其他/替代的標記時,請使用模板。小工具就像文章一樣,因此在模板中使用 the_content() 檢索小工具的內容,就像在循環中檢索一樣。
基本的小工具模板示例:
具有特色圖像的小工具模板:
if ( has_post_thumbnail() )
the_post_thumbnail( 'medium' );
the_content(); ?>
另外
許多過濾器和鉤子可用於從小工具中獲取更多內容,所以請到插件主頁或
原文外掛簡介
Here at interconnect/it we have a policy of developing client sites with the premise of “content manage everything!” That means the little notices on sites, minor widgets and so on should not only be content managed, but they should be easy for both an end-user and a developer to work with.
To that end, we developed Spots. This creates a custom post type that allows you to create widgets using a visual editor, whilst also giving developers an easy hook for the creation of content managable elements within a theme.
The plugin now uses caching in order to help ensure that the load on a typical site is kept to a minimum. Performance is important!
The plugin is prepared for translation, if you’d like to drop us a line about your translation you can contact us through our website.
Developer Notes
Spots provides 2 template tags for developers to use shown below with their supported arguments.
icit_spot( $id_or_name, $template );
$id_or_name: Required. A numeric ID or the name of a spot as a string.
$template: Optional. A string used in a call to get_template_part()
This template tag always echos out the spot.
icit_get_spot( $id_or_name, $template, $echo );
Same as the above with an extra argument:
$echo: Optional. Defaults to false. A boolean to indicate whether to echo the spot content or just return it.
Basic Usage
You can use spots to replace boilerplate text in your themes. If you have areas in your themes where typically you would hard code the text you could use the following code:
The above code would output the contents of a spot titled ‘Copyright’. If the spot does not exist it will be created as a draft. Spots in draft mode are only visible to logged in users with editing capabilities.
Templates
The plugin will initially look for a file in your theme using the get_template_part() function. If you have a file called spot.php in your theme that will be the default template for all spots. The icit_spot() function can take a second parameter for the template part to use for example:
The above code will make the plugin look in your theme folder for a file called spot-copyright.php to use for the output. If not available it will fall back to spot.php and if that is not available it will simply output the spot contents.
Use templates when you want to display a featured image from a spot or if you require some additional/alternative markup for the spot. Spots are just like posts, so in the templates you retrieve the contents of the spot using the_content() just as would in the loop.
Basic spot template example:
Spot template with featured image:
Additional
There are many filters and hooks available to get even more out of spots so drop by the plugin homepage or use the forums if there is something you need to do with spots but aren’t sure how.
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Spots」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
1.2 | 1.0.1 | 1.0.2 | 1.0.3 | 1.0.4 | 1.0.5 | 1.0.6 | 1.0.7 | 1.0.8 | 1.0.9 | 1.1.0 | 1.1.1 | 1.1.2 | 1.1.3 | 1.1.4 | 1.1.5 | 1.1.6 | 1.1.7 | 1.1.8 | 1.2.1 | 1.2.2 | 1.3.1 | 1.3.3 | 1.3.4 | 1.3.5 | 1.3.6 | 1.3.7 | 1.3.8 | 1.3.9 | trunk | 1.3.10 |
延伸相關外掛(你可能也想知道)
Real Category Management: Content Management in Category Folders 》使用「Real Category Management」外掛,您可以將 WordPress 的文章、頁面、WooCommerce 產品和所有自訂文章類型等內容進行分類資料夾管理。這本質上就像 Win...。
Plezi 》Plezi One 是一個免費行銷工具,幫助您輕鬆了解未來客戶的數位旅程,並通過表單將更多流量轉換為潛在客戶。, 利用行為數據生成線索, 忘記基本的表單提交和“聯...。
WordPress Internal Link Optimiser 》簡易內部連結外掛。輕鬆找到內部連結機會並管理現有內部連結。, 堅固的內部連結結構對搜尋引擎優化(SEO)非常重要,但如果您有一個大型網站,找到錨文本並管...。
CM Curated List Manager – Effortless tool to organize and share curated content 》ry, , WordPress Curated List Manager Knowledge Base 外掛可讓您透過分類編排連結與資訊,建立精選清單。這些精選清單是內容行銷和知識分享的好工具。此版...。
Bulk Content Toolkit 》總結: Bulk Content Toolkit旨在提升您的WordPress內容管理能力,提供工具以針對文章、頁面和自訂文章類型執行批量操作。使用這個直覺的工具箱可節省時間並...。
Docswrite – Export Google Docs to Your Site ✨ 》### 總結:, Docswrite 是一個強大的工具,適用於編輯和內容團隊。它自動化並優化內容發佈,使團隊更輕鬆地管理和一致地發佈內容。不論是編輯博客文章、文章或...。
Find and Remove Orphaned LearnDash Content 》總結:「查找並刪除孤立的LearnDash內容」外掛是WordPress網站管理員使用LearnDash時的簡單而有效的工具。它能幫助識別並刪除未指派給任何課程的課程、主題和...。
Lorem Ipsum Scanner 》
,
,這款 Lorem Ipsum 掃描器是一款全面的 WordPress 外掛程式,旨在協助網站管理員識別和管理佈滿在他們的 WordPress ...。
Ultimate Field Collections (UFC) – Field & Content Manager 》Ultimate Field Collections (UFC) 提供一個中央控制面板,讓您能在簡單易用的介面裡管理所有網站內容。一旦自訂欄位被設立,您可以毫不費力地更新欄位設定、...。
Tag Wiki for WordPress 》WordPress 的標籤 Wiki 外掛可以為網站上的每個標籤增加一個 Wiki 頁面。這不是傳統的標籤列表頁面,而是一個優秀的文章,有自己的 URL、內容和完全可自訂的...。
Strip Non Registered Shortcodes for WordPress 》這個外掛是為了方便而開發的。它可以輕鬆去除所有未註冊的 shortcodes,(! 未註冊的 shortcodes 是指 non-system WordPress shortcodes 和未在目前的版型中通...。
Simple catalogue 》此外掛非常易於使用,但可以強而有力地管理物品並將它們指派到自訂類別中。, 未來會加入更多功能,在付費版本中也是如此。, 啟用時會創建兩個自訂資料庫表,...。
Sales Layer Microsites 》使用 Sales Layer PIM 外掛,只需幾分鐘即可建立產品目錄的微網站並向世界展示它。您可以下載帶有自定義信息的完整產品目錄。, 輸入您的 Sales Layer 帳戶,...。
Post Lock 》在WordPress上意外地發佈或更新文章非常容易。Post Lock 通過要求輸入密碼,防止了意外更新或發布內容。, , 為你的內容添加了一層保護而不會給你帶來不便:解...。
Member Minder 》Member Minder 是一個 WordPress 外掛,允許網站擁有者根據使用者所擁有的角色來決定誰可以看到什麼內容。這些角色必須是非管理權限,並且具有特定的 level_0...。