內容簡介
此外掛需要 Easy Digital Downloads 的安裝。它可以輸出所有已購買您產品的客戶的 Gravatar。
使用客戶用來購買您產品的電子郵件地址並檢查其是否在 Gravatar.com 上,從而實現此功能。僅使用唯一的電子郵件地址,因此,如果客戶多次購買您的產品,它將只顯示他們的 Gravatar 一次。
要顯示已購買您產品的客戶的 Gravatar,使用 [edd_purchase_gravatars] 短碼,或將提供的小工具拖動到您的單一下載頁面的側邊欄中。您還可以使用模板標記或短碼來在網站上的任何位置顯示特定產品的 Gravatar,只需傳遞下載的 ID。
功能
設置要顯示在 Gravatar 上方的標題。
設置每個 Gravatar 的大小(最大 512 像素)
設置顯示 Gravatar 之前下載必須擁有的最小唯一購買數量。留空表示沒有最小值。
設置要顯示的 Gravatar 的最大數量。留空表示沒有限制。
僅顯示擁有 Gravatar 帳戶的客戶
隨機排列 Gravatar
短碼用法
要在單個下載上顯示購買 Gravatar,請在 WP 編輯器中添加此短碼:
[edd_purchase_gravatars]
要在其他頁面或下載中顯示特定下載的購買 Gravatar,添加 id 參數。此示例將顯示 ID 為 942 的下載。
[edd_purchase_gravatars id="942"]
要使用自定義標題顯示購買 Gravatar,請使用 title 參數。這將覆蓋主插件選項中的標題。
[edd_purchase_gravatars title="這是我的自定義標題"]
模板標記用法
此示例將顯示放置在其中的單個下載的購買 Gravatar。
$gravatars = new EDD_Purchase_Gravatars();
echo $gravatars->gravatars( get_the_ID() );
如果要從站點的其他地方顯示特定下載的購買 Gravatar,請傳遞下載的 ID。
$gravatars = new EDD_Purchase_Gravatars();
echo $gravatars->gravatars( '942' );
要顯示自定義標題,請將您的標題作為第二個參數傳遞
$gravatars = new EDD_Purchase_Gravatars();
echo $gravatars->gravatars( get_the_ID(), '這是我的自定義標題' );
小工具用法
將小工具拖放到您的側邊欄中。如果在單個下載頁面上顯示該小工具,且該下載有購買記錄,則會顯示購買 Gravatar。
外掛標籤
開發者團隊
原文外掛簡介
This plugin requires Easy Digital Downloads. It outputs gravatars of all the customers who have purchased your product.
It works by using the customer’s email that they used to purchase your product, and checking it against Gravatar.com. Only unique email addresses are used, so if a customer purchases your product more than once, it will only show their Gravatar once.
To show the Gravatars of customers who have purchased your product, use the [edd_purchase_gravatars] shortcode, or drag the provided widget into the sidebar of your single download page. You can also show the gravatars of a particular product anywhere on your website using the template tag or shortcode, by passing in the download’s ID.
Features
Set a heading to display above the Gravatars.
Set the size of each Gravatar (512px maximum)
Set the minimum number of unique purchases a download must have before the Gravatars are shown. Leave blank for no minimum.
Set the maximum number of gravatars to show. Leave blank for no limit.
Only show customers with a Gravatar account
Randomize the Gravatars
Shortcode usage
To show the purchase gravatars on a single download, add this shortcode into the WP editor:
[edd_purchase_gravatars]
To show the purchase gravatars of a particular download on another page or download, add the id parameter. This example will show the download with an ID of 942.
[edd_purchase_gravatars id="942"]
To show the purchase gravatars with a custom title, use the title parameter. This will override the heading in the main plugin options
[edd_purchase_gravatars title="This is my custom title"]
Template Tag usage
This example will show the purchase gravatars of whichever single download it is placed on.
$gravatars = new EDD_Purchase_Gravatars();
echo $gravatars->gravatars( get_the_ID() );
If you’d like to show purchase gravatars of a specific download from somewhere else on your site, pass in the ID of the download like so:
$gravatars = new EDD_Purchase_Gravatars();
echo $gravatars->gravatars( '942' );
To show a custom title, pass in your title as the 2nd parameter
$gravatars = new EDD_Purchase_Gravatars();
echo $gravatars->gravatars( get_the_ID(), 'This is my custom title' );
Widget usage
Drag the widget into your sidebar. If the widget is shown on a single download page, and that download has purchases, the purchase gravatars will be shown.
