BACK TO DIRECTORY

Personio

by tomcat2111

0.0
(0 ratings)

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');
}

Plugin Details

Active Installs
10
Total Downloads
1,536
Version
0.0.3
Requires WP
4.9
Requires PHP
5.2.4
Tested Up To
5.3.23
Added
2019-06-27
Last Updated
2020-03-04 6:07pm GMT

Ratings

5
0
4
0
3
0
2
0
1
0