People Lists - TenthPres/TouchPoint-WP GitHub Wiki

TouchPoint-WP can embed a list of People in your public website, such as Staff or Elders.

Usage

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.

Filters

tp_person_actions

Use this filter to change the generated HTML for a Person. The parameters are:

  1. The existing string after it's generated
  2. The Person object, which can be used for fetching other details
  3. 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);

tp_person_allow_contact

Use this filter to prevent "Contact" option from appearing. Return false to prevent contact buttons from appearing.
There is no parameter provided.

tp_allow_contact

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.

Privacy

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.

⚠️ **GitHub.com Fallback** ⚠️