[WordPress] 外掛分享: References

WordPress 外掛 References 的封面圖片。

前言介紹

  • 這款 WordPress 外掛「References」是 2016-06-21 上架。
  • 目前有 30 個安裝啟用數。
  • 上一次更新是 2025-02-20,距離現在已有 371 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
  • 外掛最低要求 WordPress 3.0 以上版本才可以安裝。
  • 有 1 人給過評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

shra |

外掛標籤

reference | node reference | post connections |

內容簡介

此外掛可讓您管理文章參考文獻,類似 Drupal CMS 模組功能中的「Node Reference」。

使用「參考文獻設定」頁面設定出版物連線。

設定步驟完成後,您會在文章編輯頁面上看到其他的 metabox(s)。您可以選擇要附加到正在編輯的文章的參考文章類型的文章。

此外掛會將已連線的文章列表儲存為文章元資料。您可以使用例如 get_post_meta($post->ID, 'ref_ID', 真實) 來接收該列表。作為「ref_ID」,您應在之前「參考設定」頁面中配置的元資料鍵使用。

此外掛允許您配置 widget 以查看已附加文章的列表。

此外掛 API

此外掛有自己的 API,可讓您從您的程式碼中建立參考文獻(註冊自己的文章類型後等等)。所有函數都是靜態的,可通過 REFShraAPI 類別使用。

目前已實作 5 個函數。函數列表如下。有關 API 函數、其引數、示例的更多詳細資訊請參閱 reference.php。

REFShraAPI::config_load($postType = NULL, $refKey = NULL);
// 返回當前配置之參考文獻的陣列。

REFShraAPI::config_add($postType, $refKey, $linkedTypes, $title)
// 新增/更新參考文獻配置。

REFShraAPI::config_remove($postType, $refKey);
// 刪除 pair postType / refKey 的參考文獻配置。

REFShraAPI::get($postID = NULL);
// 透過文章 ID 取得參考文獻資料。

REFShraAPI::update($postID = NULL, $refkey, $postIDs);
// 透過文章 ID 更新參考文獻資料。

REFShraAPI::find($postID = NULL, $postTypes = array(), $onlyPublished = false);
// 尋找已附加 post_id 的文章。

縮短碼 REF

此外掛支援縮短碼 REF。它可讓您在文章任何位置顯示參考文章的列表。縮短碼函數實作可讓您自訂列表和輸出。只有兩個屬性可用。

[ref id=”POST_ID” key=”REFERENCE_KEY”]

原文外掛簡介

This plugin will let you manage the post references. It is like “node reference” in Drupal CMS module functionality.
Use Reference Settings page to configure publications connections.
After configuring step you will see additional metabox(s) on post editor page. Now you can choose articles of referenced post types to attach it to article you edit.
Plugin stores connected article list to post metas. For template you can use, for example, get_post_meta($post->ID, ‘_ref_ID’, true) to receive that list. As ‘ref_ID’ you should use a meta key configured on Referenced settings page earlier.
Plugin allow you to configure widgets to view the list(s) of attached articles.
Plugin API
Plugin has own API which allows you create references from your code (after registering your own post types, etc). All functions are static and available through class REFShraAPI.
Currently there are implemented 5 functions. List of functions is below. More details about API functions, their arguments, examples look in referenece.php.
REFShraAPI::config_load($postType = NULL, $refKey = NULL);
//returns array currently configured REFERENCES.
REFShraAPI::config_add($postType, $refKey, $linkedTypes, $title)
// ADD/update REFERENCE configs.
REFShraAPI::config_remove($postType, $refKey);
// Delete REFERENCE config by pair postType / refKey.
REFShraAPI::get($postID = NULL);
// Get references data by post ID.
REFShraAPI::update($postID = NULL, $refkey, $postIDs);
// Update references data by post ID.
REFShraAPI::find($postID = NULL, $postTypes = array(), $onlyPublished = false);
// Search for article with attached post_id
Shortcode REF
Plugin supports shortcode REF. It allows to show list of referenced articles in any place of your post. Shortcode function implementation allows you customize list and output. Only two attributes are available.
[ref id=”POST_ID” key=”REFERENCE_KEY”]

各版本下載點

  • 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
  • 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「References」來進行安裝。

(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。


最新版本

延伸相關外掛(你可能也想知道)

暫無相關外掛推薦。

文章
Filter
Mastodon