[WordPress] 外掛分享: Featured Users

首頁外掛目錄 › Featured Users
WordPress 外掛 Featured Users 的封面圖片
10+
安裝啟用
尚無評分
2644 天前
最後更新
問題解決
WordPress 3.1.1+ PHP 5.6+ v2.1 上架:2012-06-04

內容簡介

在製作自訂 WordPress 佈景主題的過程中,我們需要突顯某些使用者和作者。於是我們建立了這個「特色使用者」外掛程式,允許管理員輕鬆地標註(特色)使用者。然後使用主題中的自訂查詢,簡碼或小工具; 只需檢索具有自訂使用者中繼 jsfeatured_user 的使用者即可顯示特色使用者。此外,該外掛程式不會對您當前佈景主題進行任何更改,它只會執行以下操作:

在 WordPress 管理員的使用者面板中添加了一個特色欄位。
當使用者被標註時,外掛將添加或更新自訂欄位「jsfeatured_user」,並將其值設置為 yes。
提供自訂小工具,以回應 shortcode。
提供回應特色使用者清單的自訂 shortcode。
包括開發人員的主題函數和過濾器。

歡迎在您的 WordPress 安裝中使用和包含,如果您需要開發自訂主題或外掛程式,請考慮聯繫我們!使用設置頁面上的已記錄代碼示例來修改預期的輸出。

使用方式

啟用插件並在更新插件的設置後,轉到 wp-admin > 使用者 > 所有使用者,然後標註一些使用者即可使用「特色使用者」外掛程式,編輯頁面,並添加「特色使用者」簡碼或更新側邊欄,添加「特色使用者」小工具。

簡碼參數

[rd-featured-users role=”administrator,author” avatar=”yes” max=”100″]

role = 一個用逗號分隔的用戶角色列表,您想要在查詢中包含用戶。注意,設置頁面可以覆蓋此操作,預設為所有角色,除非設置頁面指定了允許哪些角色。
avatar = 選擇為 yes 或 no,指定是否顯示或不顯示用戶的頭像圖像,默認為 no。
max = 要顯示的最大使用者數。

過濾器

WordPress 過濾器允許「開發人員」修改「特色使用者」插件的某些方面,而不必編輯核心插件。如果您不熟悉過濾器,請在繼續之前閱讀此內容。

‘featured-users-args’,https://codex.wordpress.org/Class_Reference/WP_User_Query
‘featured-users-css’,css 檔案的 url
‘featured-users-JS’,js 檔案的 url
‘featured-user-shortcode-row’,shortcode 和 widget 中的用戶列
‘featured-user-shortcode-return’,shortcode 和 widget 內容

支援

如果您需要自訂 WordPress 插件和主題開發請求,請發電子郵件至 [email protected] 或前往 https://www.reactivedevelopment.net/。如果對此插件有疑問或請求,請前往 https://wordpress.org/support/plugin/featured-users-wordpress-plugin,或前往 https://www.reactivedevelopment.net/contact/project-mind/?plugin=featured-users 進行快速付費支援。

外掛標籤

開發者團隊

⬇ 下載最新版 (v2.1) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Featured Users」→ 直接安裝(推薦)

原文外掛簡介

While working on a custom WordPress theme we needed the ability to feature users and authors. So we created this ‘Featured users’ plugin which allows the administrator to easily star (feature) users. Then using a custom query in the theme, shortcode or widget; featured users can be displayed by only retrieving users with the custom user meta jsfeatured_user. The plugin does not make any changes to your current theme it only does the following:

Adds a featured column in the Users panel of the WordPress Admin.
When a user is featured the plugin adds or updates the custom field ‘jsfeatured_user’ and sets the value to yes.
Provides custom widget that echoes out shortcode.
Provides custom shortcode that echoes ul list of featured users.
Includes theme functions and filters for developers.

Feel free to use and include in your WordPress Installs, please think of us if you need a custom theme or plugin developed! Use documented code examples on the settings page to modify the expected output.
How to
After activating and after updating the plugin’s settings go to wp-admin > Users > All Users and feature a few users. To use the ‘Featured Users’ plugin edit a page and add the ‘Featured Users’ shortcode or update a sidebar and add the ‘Featured Users’ widget.
Shortcode Paramaters
[rd-featured-users role=”administrator,author” avatar=”yes” max=”100″]

role = A comma-separated list of roles of the users you want to include in the query. Note the settings page can override this. The default is all roles again unless the settings page specifies which to allow.
avatar = Options are yes or no, specify whether to show or not show the users’ avatar image. The default is no.
max = The maximum number of users to display.

Filters
WordPress filters allow a ‘developer’ to modify aspects of the ‘Featured Users’ plugin without editing the core plugin. If you are not familiar with filters please read this before continuing.

‘featured-users-args’, https://codex.wordpress.org/Class_Reference/WP_User_Query
‘featured-users-css’, url to css file
‘featured-users-JS’, url to js file
‘featured-user-shortcode-row’, user row in shortcode and widget
‘featured-user-shortcode-return’, shortcode and widget content

Support
For custom WordPress plugin and theme development requests email us at [email protected] or go to https://www.reactivedevelopment.net/. If you have questions or requests for this plugin go to https://wordpress.org/support/plugin/featured-users-wordpress-plugin or for quick and paid support go to https://www.reactivedevelopment.net/contact/project-mind/?plugin=featured-users to message us.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon