Hello and thank you for the question.
Our plugin does not use the returns from Personio’s XML interface 1:1. The XML information is stored as post type and taxonomy in accordance with the WordPress standard. We provide several templates to output this information in the frontend. These templates can also be individually overloaded as described here: https://github.com/threadi/wp-personio-integration-light/blob/master/doc/templates.md
A list of hooks is also available in the github repository for Light: https://github.com/threadi/wp-personio-integration-light/blob/master/doc/hooks.md
Within the templates we provide, the Position object is often available, which I think your question refers to in detail. The template header describes which variables are available. With the objects, we no longer work with individual public variables but with PHP functions to call up certain information about a position.
Example of retrieving a position title:
echo $position->get_title();
Please note that if you develop your own, you should also adhere to the WordPress security guidelines as much as possible. Content must never be output directly but must always be escaped. My example would therefore be correctly written as follows:
echo esc_html( $position->get_title() );
You can see which other functions are available on the object itself: https://github.com/threadi/wp-personio-integration-light/blob/master/app/PersonioIntegration/Position.php#L424
Retrieving position details such as the “Years Of Experience” is a little more complex. These are stored as taxonomies in the WordPress database. We provide so-called detail templates for their output, see: https://github.com/threadi/wp-personio-integration-light/tree/master/templates/parts/details – these can also be overloaded in the above way. It is also possible to add new individual detail templates using the personio_integration_rest_templates_details
hook so that they are available for selection in a page builder in the project.
As an alternative to the templates, you can also access their values ??directly from the position object. This can be done, for example, using:
echo esc_html( $position->get_term_by_field( $taxonomy_name, 'name' ) );
Where $taxonomy_name
is a name of the requested taxonomy. A list of possible taxonomy names can be found here: https://github.com/threadi/wp-personio-integration-light/blob/master/inc/constants.php#L86
There are also taxonomies that do not return a string but an array. So here too you would have to check very carefully what it is before you output it.
Please note:
- The language information for the taxonomies refers to the language in which the position was retrieved at Personio.
- The list of taxonomies is expanded in the Pro plugin to include information about the company.
Finally, a note for other readers:
The procedure described here is only necessary if you want to put together your templates individually in the HTML code. Our plugin certainly allows this, but using the ready-made templates and/or a page builder is much easier for most editors. This means that our plugin can of course also be used without any programming knowledge.