[WordPress] 外掛分享: Personio

首頁外掛目錄 › Personio
10+
安裝啟用
尚無評分
2206 天前
最後更新
問題解決
WordPress 4.9+ PHP 5.2.4+ v0.0.3 上架:2019-06-26

內容簡介

您可以使用這個短碼來展示員工列表或網格。通過使用屬性,您可以使用正則表達式篩選字段。您必須在 Personio 中設置這些字段。但在此插件的設置頁面上,您可以查看可用的字段。

[personio_team office=Berlin gender=male custom_999999=foo]

如果您需要額外的篩選,那麼您可以添加以下類似的鉤子。

if (!function_exists('wp_personio_filter_team')) {
function wp_personio_filter_team($employees)
{
return array_filter($employees, function($employee){
return $employee->attributes->gender->value == 'male';
}, ARRAY_FILTER_USE_BOTH);
}

add_filter('wp_personio_filter_team', 'wp_personio_filter_team');
}

外掛標籤

開發者團隊

⬇ 下載最新版 (v0.0.3) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Personio」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

You can use such a shortcode to display the employees list or grid. By using the attributes you can filter the fields with a regular expression. You have to set up these fields in Personio. But on the settings page of this plugin you can see the available fields.
[personio_team office=Berlin gender=male custom_999999=foo]

If you need addtional filtering then you can add a hook like the following.
if (!function_exists('wp_personio_filter_team')) {
function wp_personio_filter_team($employees)
{
return array_filter($employees, function($employee){
return $employee->attributes->gender->value == 'male';
}, ARRAY_FILTER_USE_BOTH);
}

add_filter('wp_personio_filter_team', 'wp_personio_filter_team');
}

延伸相關外掛

文章
Filter
Mastodon