People Lists - TenthPres/TouchPoint-WP GitHub Wiki
TouchPoint-WP can embed a list of People in your public website, such as Staff or Elders.
To use this feature, check the "Enable Public People Lists" setting in the Settings > TouchPoint-WP > Basic Settings. Then, put a shortcode where you want the People List to appear:
[TP-People invId=123]
Replace 123
with the InvolvementId (OrgId) of the Involvement you want
to show.
Currently, you can only list all members of an involvement. That is, you cannot list the people on a status flag, nor can you only show the leaders.
By default, each person has a "Contact" button. This button creates a new
Task for the with the message provided by the user. This action can be
adjusted using the tp_person_actions
filter described below.
Use this filter to change the generated HTML for a Person. The parameters are:
- The existing string after it's generated
- The Person object, which can be used for fetching other details
- An optional Context variable which is passed from the
Person::getActionButtons($context)
Example: Adds a link to directly email the person if they have a church email account.
function my_person_actions_filter($content, $person, $context) {
if (substr($person->user_email, -9) === 'tenth.org') {
$content .= "<a href=\"mailto:{$person->user_email}\">Email</a>";
}
return $content;
}
add_filter('tp_person_actions', 'my_person_actions_filter', 10, 3);
Use this filter to prevent "Contact" option from appearing. Return false to prevent contact buttons from appearing.
There is no parameter provided.
Use this filter to prevent "Contact Leader" option from appearing on Involvements AND also prevent "Contact" button from appearing on People Lists. Return false to prevent contact. There is no parameter provided. See Involvements for an example of how we use this.
Please be careful with the privacy of your people.
This will completely ignore the privacy preferences people have set for themselves in the app or mobile interface.
However, you can customize which information is synced to WordPress by
customizing the WebPublicPerson.py
script.