[WordPress] 外掛分享: User Avatar – Reloaded

WordPress 外掛 User Avatar – Reloaded 的封面圖片。

前言介紹

  • 這款 WordPress 外掛「User Avatar – Reloaded」是 2021-05-27 上架。
  • 目前有 1000 個安裝啟用數。
  • 上一次更新是 2023-09-14,距離現在已有 598 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
  • 外掛最低要求 WordPress 4.0 以上版本才可以安裝。
  • 外掛要求網站主機運作至少需要 PHP 版本 5.6 以上。
  • 有 2 人給過評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

saadiqbal |

外掛標籤

avatar | gravatar | author-image | author-photo | user profile |

內容簡介

WordPress 目前只允許透過 Gravatar 上傳自訂頭像。 WP User Avatar 可讓您使用任何上傳到您的媒體庫中的照片作為頭像,這意味著您可以使用相同的上傳工具和庫作為您的文章,而不需要額外的資料夾或圖像編輯功能。

WP User Avatar 還提供以下功能:

在您的 WP User Avatar 設定中上傳您自己的預設頭像。
如果使用者沒有 WP User Avatar 圖像,則顯示使用者的Gravatar頭像或預設頭像。
禁用Gravatar頭像,僅使用本地頭像。
使用[avatar_upload]shortcode將獨立的上傳工具加入到前台頁面或小工具中,此上傳工具僅對已登錄的使用者可見。
在您的文章中使用[avatar]shortcode。這些短碼將與任何主題一起使用,無論是否支援頭像。
允許貢獻者和訂閱者上傳自己的頭像。
限制貢獻者和訂閱者的上傳檔案大小和圖像尺寸。

將 WP USER AVATAR 加入您的個人檔案編輯頁面

您可以使用 [avatar_upload] shortcode 將獨立的上傳工具加入到任何頁面。最好只使用此上傳工具並避免混用其他個人檔案編輯欄位。
如果您正在建立包含其他欄位的個人檔案編輯頁面,WP User Avatar 會自動添加到 show_user_profile 和 edit_user_profile 鉤子中。如果您希望 WP User Avatar 在它自己的區段中,您可以添加另一個鉤子:

do_action('edit_user_avatar', $current_user);

然後,要將 WP User Avatar 添加到該鉤子中並將其從管理面板外的其他鉤子中刪除,您需要將以下代碼添加到您的佈景主題的 functions.php 檔案中:

HTMLWRAPPER

您可以使用函數 wpua_before_avatar 和 wpua_after_avatar 更改 WP User Avatar 區段的 HTML。預設情況下,頭像程式碼的結構如下:


Avatar








原始尺寸




縮圖








如果要刪除 div 容器和 h3 標題,則需在佈景主題的 functions.php 文件中添加以下篩濾器:

remove_action('wpua_before_avatar', 'wpua_do_before_avatar');
remove_action('wpua_after_avatar', 'wpua_do_after_avatar');
?>

要添加自己的包裝器,可以創建如下所示的代碼:

function my_before_avatar() {
echo '

';
}
add_action('wpua_before_avatar', 'my_before_avatar');

function my_after_avatar() {
echo '

';
}
add_action('wpua_after_avatar', 'my_after_avatar');
?>

原文外掛簡介

WordPress currently only allows you to use custom avatars that are uploaded through Gravatar. WP User Avatar enables you to use any photo uploaded into your Media Library as an avatar. This means you use the same uploader and library as your posts. No extra folders or image editing functions are necessary.
WP User Avatar also lets you:

Upload your own Default Avatar in your WP User Avatar settings.
Show the user’s Gravatar avatar or Default Avatar if the user doesn’t have a WP User Avatar image.
Disable Gravatar avatars and use only local avatars.
Use the [avatar_upload] shortcode to add a standalone uploader to a front page or widget. This uploader is only visible to logged-in users.
Use the [avatar] shortcode in your posts. These shortcodes will work with any theme, whether it has avatar support or not.
Allow Contributors and Subscribers to upload their own avatars.
Limit upload file size and image dimensions for Contributors and Subscribers.

ADD WP USER AVATAR TO YOUR OWN PROFILE EDIT PAGE
You can use the [avatar_upload] shortcode to add a standalone uploader to any page. It’s best to use this uploader by itself and without other profile fields.
If you’re building your own profile edit page with other fields, WP User Avatar is automatically added to the show_user_profile and edit_user_profile hooks. If you’d rather have WP User Avatar in its own section, you could add another hook:
do_action('edit_user_avatar', $current_user);

Then, to add WP User Avatar to that hook and remove it from the other hooks outside of the administration panel, you would add this code to the functions.php file of your theme:

HTML WRAPPER
You can change the HTML wrapper of the WP User Avatar section by using the functions wpua_before_avatar and wpua_after_avatar. By default, the avatar code is structured like this:

Avatar


Original Size


Thumbnail

To strip out the div container and h3 heading, you would add the following filters to the functions.php file in your theme:

To add your own wrapper, you could create something like this:
';
}
add_action('wpua_before_avatar', 'my_before_avatar');

function my_after_avatar() {
echo '

';
}
add_action('wpua_after_avatar', 'my_after_avatar');
?>

This would output:


Original Size


Thumbnail

各版本下載點

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

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


1,2 | 1.0 | 1.1 | 1.2.1 | 1.2.2 | trunk |

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

  • Simple Local Avatars 》若目前使用者擁有媒體權限,此外掛會在使用者資料中增加頭像上傳欄位,並像Gravatar一樣在使用時產生所需的大小。簡單輕量化的工具。, 只需編輯使用者資料,...。
  • One User Avatar | User Profile Picture 》WordPress 目前只允許您使用透過 Gravatar 上傳的自訂頭像。One User Avatar 讓您使用媒體庫中上傳的任何照片作為頭像。這意味著您可以使用與文章相同的上傳...。
  • User Profile Picture 》使用 WordPress 標準媒體上傳工具,為用戶設置或刪除自定義個人資料圖像。, 查看文件和範例, , 使用者必須擁有上傳圖像的功能(通常是作者角色或更高)。您可...。
  • Simple User Avatar 》這個外掛程式簡化了WordPress使用者的生活。, 現在使用者可以從他的媒體庫中簡單地新增或刪除他們的頭像圖像。易於使用,不需要其他的功能。外掛程式可在GitH...。
  • Basic User Avatars 》在前端頁面和編輯個人資料畫面上添加頭像上傳欄位,讓使用者可以上傳自定義個人頭像。, WordPress 社群和會員網站使用此外掛作為輕量級解決方案提供自定義的...。
  • WP User Profile Avatar 》WP User Profile Avatar 是一款外掛,可讓您更改預設的 WordPress 頭像或使用者個人資料照片。您可以使用媒體庫中上傳的任何照片,或使用自訂照片 URL 作為頭...。
  • Avatar Manager 》WordPress頭像管理員是一款為本地保存頭像等功能的簡單易用的外掛程式。, 通過讓用戶在自己的個人資料屏幕上選擇使用Gravatar還是自託管頭像圖片,您可以增強...。
  • Podamibe Custom User Gravatar 》這是一個外掛程式,允許使用者在媒體庫中上傳自己的個人圖像,並顯示該圖像作為頭像,而不是根據他們註冊的電子郵件地址從 gravatar.com 抓取頭像。, 您也可...。
  • WP User – Custom Registration Forms, Login and User Profile 》ul>, WP使用者外掛程式可以幫助您建立前端登入和註冊表單。, 使用者登入或註冊,並希望避免使用一般的WordPress登入頁面,這個外掛程式可以新增在AJAX中平滑...。
  • Disable User Gravatar 》這是一個非常簡單且輕量級的外掛程式,可以將預設的頭像匿名化,並防止使用者的 Gravatar 根據其註冊的電子郵件地址自動從 gravatar.com 獲取。這在需要增加...。
  • Add Local Avatar 》此外掛可讓使用者新增本地 (私人) 頭像,如果您的使用者不想使用全域頭像、不熟悉 Gravatar 設定或只是想為您的部落格使用私人頭像,或任何其他原因,這個外...。
  • Easy Author Avatar Image 》Easy Author Avatar Image 可以輕鬆地在您的個人資料頁面上添加作者圖像。安裝此外掛後,在您的個人資料選項卡(在使用者下方)中會出現一個名為「個人資料照...。
  • Avatar Privacy 》來自 Gravatar.com 的頭像很好用,但卻帶有某些隱私問題。您作為網站管理員可能已經知道這一點,但您的訪客和使用者可能不知道。 Avatar Privacy 可以通過對...。
  • WPAvatar 》提供替代 Gravatar 的 WP Avatar 外掛可在中國完美接替 Gravatar。使用者只要啟用,不需要進行其他操作。, , 問題與答案:, , 問題:什麼是 WP Avatar 外掛?...。
  • Comment Date and Gravatar remover 》預設情況下,此外掛移除註解日期和頭像。如果您想啟用任何功能,請前往此外掛設定並取消勾選核取方塊。, 欲了解更詳細的 WordPress 資訊,請點選以下連結, Ve...。

文章
Filter
Apply Filters
Mastodon