[WordPress] 外掛分享: ACF Media Credit

前言介紹

  • 這款 WordPress 外掛「ACF Media Credit」是 2014-12-15 上架。
  • 目前有 100 個安裝啟用數。
  • 上一次更新是 2018-04-02,距離現在已有 2588 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
  • 外掛最低要求 WordPress 4.0 以上版本才可以安裝。
  • 有 3 人給過評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

donaldg2 |

外掛標籤

field | custom | advanced | repeater | custom field |

內容簡介

此外掛使用 Advanced Custom Fields 的 Repeater 欄位,為您的媒體庫中的每個項目添加「作者」和「作者連結」選項。目前僅會對前端顯示的圖片進行設置和顯示。本外掛不支援 .pdf 檔案、.swf 檔案、.doc 檔案等的作者聲明。

必須使用 Advanced Custom Fields Pro 或是有 免費版 ACF 以及 Repeater Field 外掛的其中之一。

我建議與此外掛搭配使用 ACF Pro。

ACF 欄位會被匯出成 json 檔案(供 ACF Pro 使用),此檔案會存在此外掛的 ‘acf_exports’ 資料夾中。
如果你無法正常載入這些欄位,可以透過 ACF Pro 的匯入功能匯入該 json 檔案。

如果你是一位開發者,本外掛對你開放了一些功能(詳見:dongaines.com/acf-media-credit)。

在 ‘/inc/’ 資料夾中,這些欄位已經被匯出成 PHP,可供 ACF Pro 或 ACF 免費版使用。

功能

以下是可以使用的少數功能。這些功能的更多解釋可參見 dongaines.com/acf-media-credit。可使用的功能有:
the_post_thumbnail_media_credit(); //不需要附件 ID
the_media_credit_html($attachment_id); //回傳 HTML
the_media_credit($attachment_id); //輸出 the_media_credit_html();
the_plain_media_credit($attachment_id); //輸出最基本的標記
print_r(get_media_credit($attachment_id)); //有助於除錯

對於帶有標題的圖片,我會過濾標題縮略語碼,如果您需要進行更改也必須這麼做:add_filter( 'img_caption_shortcode', 'your_function_name', 10, 3 );

新增了一些過濾器:
add_filter(‘acf_media_credit_base_output’, ‘your_function_name’); //your_function_name($image_credit)
add_filter(‘acf_media_credit_div_class’, ‘your_function_name’); //your_function_name($media_credit_div_class)

原文外掛簡介

This plugin uses the Repeater field of Advanced Custom Fields to add options for a Credit and Credit Link on each item in your Media Library. Currently this will only correlate and display for IMAGES on the front end. This does not support credits for .pdf files, .swf files, .doc files, etc.
Requires either Advanced Custom Fields Pro or the free version of ACF with the Repeater Field add-on.
I suggest using ACF Pro with this plugin.
ACF Fields are exported as a json file (for ACF Pro) in the ‘acf_exports’ directory of this plugin.
ACF Pro allows you to import that json file if for some reason you’re having trouble getting the fields to load.
If you’re a developer there are functions available to you (see: dongaines.com/acf-media-credit)
In the ‘/inc/’ directory the fields have been exported as PHP to work w/ ACF Pro or ACF free
Functions
There are a handful of functions available for your use and there is more explanation given to them at dongaines.com/acf-media-credit. The functions available:
the_post_thumbnail_media_credit(); //does not require an attachment id
the_media_credit_html($attachment_id); //returns
the_media_credit($attachment_id); //echos the_media_credit_html();
the_plain_media_credit($attachment_id); //outputs the most basic markup
print_r(get_media_credit($attachment_id)); //helpful for debugging
For images with a caption I’m filtering the caption shortcode, please do the same if you need to make a change: add_filter( 'img_caption_shortcode', 'your_function_name', 10, 3 );
Added filters:
add_filter(‘acf_media_credit_base_output’, ‘your_function_name’); //your_function_name($image_credit)
add_filter(‘acf_media_credit_div_class’, ‘your_function_name’); //your_function_name($media_credit_div_class)

各版本下載點

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

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


1.2 | 1.5 | 1.0.1 | 1.0.2 | 1.1.0 | 1.1.1 | 1.1.2 | 1.1.3 | 1.2.1 | 1.3.0 | 1.3.1 | 1.3.2 | 1.3.3 | 1.3.4 | 2.0.0 | 2.0.1 | 2.1.0 | 2.2.0 | 2.2.1 | 2.2.2 | 2.3.0 | 2.3.1 | 2.3.2 | 2.3.3 | 2.3.4 | 2.3.5 | 2.3.6 | 2.3.7 | trunk |

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

  • Smart Custom Fields 》Smart Custom Fields 是一個管理自訂欄位的簡單外掛。, 功能, , 支援自訂欄位群組迴圈。, 支援元資料修訂。, 支援元資料預覽。, , , 欄位類型, , 文字, 文字...。
  • Advanced Custom Fields: Image Aspect Ratio Crop Field 》這是一個進階自訂欄位 (Advanced Custom Fields) 的外掛,會在使用者上傳圖片後強制執行特定的長寬比例或像素大小裁剪。使用長寬比例對於回應式圖片的使用情...。
  • Masks Form Fields 》新增表單欄位的類別。, 使用 Contact Form 7 的範例:, [tel your-phone class:phone placeholder "Phone"], , 可用於使用的類別清單:, ('span.start, input.s...。
  • Quantity Field on Shop Page for WooCommerce 》這款外掛會在 WooCommerce 網店的購物頁面上顯示商品數量欄位,讓客戶可以在加入購物車前變更商品數量。。
  • Gravity Slider Fields 》Gravity Forms 目前還不支援滑桿欄位,但在此之前,這個外掛可以很好地發揮作用。, 這個外掛將在進階欄位群組中新增一個滑桿欄位。您可以使用以下一組選項自...。
  • Show User ID 》「Show User ID」是一款小型的外掛,可在 WordPress 儀表板的使用者部分的表格中顯示欄位 ID。它將被添加為每個使用者的其他數據的一列。, 功能, , 在使用者...。
  • reCAPTCHA for Ninja Forms 》更新:Ninja Forms 3.0 現在內建 Google reCAPTCHA 整合功能。如果您正在使用最新版本的 Ninja Forms,則不必再安裝此外掛程式以進行 reCAPTCHA 整合, 在 Nin...。
  • Gravity Forms Data Persistence Add-On Reloaded 》請思考這樣的情境:, a) 你的網站使用多頁 Gravity Forms。, b) 使用者登入網站,並開始填寫一個有 5 個步驟的表單。, c) 在第三步,使用者離開網站,並未完...。
  • Comments Shortcode 》這個外掛程式允許您在 WordPress 的任何位置顯示評論和評論表單。可以在不修改代碼的情況下顯示 WordPress 頁面和文章的評論列表,並且它與大部分可用的佈景...。
  • Advanced Custom Fields: reCAPTCHA Field 》ACF reCAPTCHA將Google reCAPTCHA帶入Advanced Custom Fields,以用於前端表單。, 功能包括:, , ACF reCAPTCHA Protection確保垃圾郵件機器人無法繞過reCAPT...。
  • Advanced Custom Fields – Location Field add-on 》這是一個針對Advanced Custom Fields WordPress 外掛的擴充套件,除非已安裝且啟用 Advanced Custom Fields,否則對 WordPress 不提供任何功能。, Location ...。
  • Flexible Content Extended for Advanced Custom Fields 》透過將版面配置列表轉換為帶有圖像預覽的對話框,擴展了 ACF 靈活內容欄位 (Flexible Content Field)的功能。同時,在對版面配置進行編輯時,亦採用了更好的...。
  • Contact Form 7 WooCommerce Order Dropdown Field 》將 Woocommerce 訂單下拉選單添加到熱門的 Contact Form 7 外掛。這個欄位會建立一個下拉選單來顯示當前使用者的訂單。, 這個外掛將讓 Contact Form7 表單更...。
  • Add Quantity Field on Shop Page for WooCommerce 》您想在 WooCommerce 商店頁面上添加數量欄位嗎?, 使用此外掛程式,您可以輕鬆在 WooCommerce 商店頁面上顯示數量欄位。如果您在商店頁面上啟用變體選項,此...。
  • Html Template for Contact Form 7 》這個外掛程式有助於在 Contact Form 7 中傳送美觀而簡單的 HTML 電子郵件,如果電子郵件類型是 HTML 的話。, 使用此外掛程式的配置,對於每個表單,都可以選...。

文章
Filter
Apply Filters
Mastodon