WP Manifestindependent plugin directory
manifest / users / wsu-people-directory

WSU People Directory

A plugin to maintain a central directory of people.

★ 5stars
1.0.1.1latest · 2 years ago

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/washingtonstateuniversity/wsu-people-directory/archive/refs/heads/master.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

A WordPress plugin to maintain a central directory of people.

Hooks

WSU People is configured by default to work on Washington State University's WordPress platform. However, several hooks are included that can be used to adapt the plugin so that it works in other setups.

A dual purpose plugin

In its full capacity, the WSU People Directory plugin is activated globally on a multi-network/multisite WordPress installation. These hooks exist to differentiate between the main site that maintains a record of people and other sites that pull these records from a central source.

The wsuwp_people_is_main_site filter is available for indicating that a site is the main people directory. By default, this filter is false and the plugin assumes the role of a secondary site.

REST API

The wsu_people_directory_rest_url filter is available to modify the default REST URL used for people records. This is attached to people.wsu.edu by default, but can be used with any WordPress installation.

Once a site has been designated as the main people directory using the wsuwp_people_is_main_site filter, the wsuwp_people_directory_rest_url should be updated to match that site's settings.

Organization Data

The wsuwp_people_get_organization_person_data filter is available for providing organizational data about a person. This allows for the automatic collection of basic data that should be managed through active directory or some other means.

A specific return structure is expected. Data will be sanitized after retrieval:

$return_data = array(
    'given_name' => '',
    'surname' => '',
    'title' => '',
    'office' => '',
    'street_address' => '',
    'telephone_number' => '',
    'email' => '',
);

REST API

WSU's directory of people can best be consumed via the WordPress REST API:

  • https://people.wsu.edu/wp-json/wp/v2/people

The general documentation for the REST API is the best place to see how to interact with the API itself. We provide several custom fields with person records returned by the API.

Here is an raw overview of the properties attached to each object:

{
  "id":20,
  "date":"2015-07-24T12:16:22",
  "date_gmt":"2015-07-24T19:16:22",
  "guid":{
    "rendered":"http:\/\/people.wsu.edu\/?post_type=wsuwp_people_profile&p=20"
  },
  "modified":"2017-08-07T13:13:26",
  "modified_gmt":"2017-08-07T20:13:26",
  "slug":"phillip-cable",
  "status":"publish",
  "type":"wsuwp_people_profile",
  "link":"https:\/\/people.wsu.edu\/profile\/phillip-cable\/",
  "title":{
    "rendered":"Phillip Cable"
  },
  "content":{
    "rendered":"<p>This is my personal biography<\/p>\n",
    "protected":false
  },
  "template":"",
  "tags":[],
  "university_category":[],
  "location":[
    2
  ],
  "organization":[
    390
  ],
  "classification":[
    409
  ],
  "nid":"pcable",
  "first_name":"Phillip",
  "last_name":"Cable",
  "position_title":"WORDPRESS DEVELOPER",
  "office":"ITB 2021",
  "address":"PO BOX 641227",
  "phone":"509-335-0383",
  "phone_ext":"",
  "email":"pcable@wsu.edu",
  "office_alt":"",
  "phone_alt":"",
  "email_alt":"",
  "address_alt":"",
  "website":"",
  "degree":[],
  "working_titles":[
    "Web Developer"
  ],
  "bio_unit":"<p>This is my unit biography.<\/p>",
  "bio_university":"<p>This is my university biography.<\/p>",
  "photos":[],
  "listed_on":[],
  "bio_college":"",
  "bio_lab":"",
  "bio_department":"",
  "cv_employment":"",
  "cv_honors":"",
  "cv_grants":"",
  "cv_publications":"",
  "cv_presentations":"",
  "cv_teaching":"",
  "cv_service":"",
  "cv_responsibilities":"",
  "cv_affiliations":"",
  "cv_experience":"",
  "cv_attachment":false,
  "profile_photo":"",
  "_links":{
    "self":[
      {
        "href":"https:\/\/people.wsu.edu\/wp-json\/wp\/v2\/people\/20"
      }
    ],
    "collection":[
      {
        "href":"https:\/\/people.wsu.edu\/wp-json\/wp\/v2\/people"
      }
    ],
    "about":[
      {
        "href":"https:\/\/people.wsu.edu\/wp-json\/wp\/v2\/types\/wsuwp_people_profile"
      }
    ],
    "version-history":[
      {
        "href":"https:\/\/people.wsu.edu\/wp-json\/wp\/v2\/people\/20\/revisions"
      }
    ],
    "wp:attachment":[
      {
        "href":"https:\/\/people.wsu.edu\/wp-json\/wp\/v2\/media?parent=20"
      }
    ],
    "wp:term":[
      {
        "taxonomy":"post_tag",
        "embeddable":true,
        "href":"https:\/\/people.wsu.edu\/wp-json\/wp\/v2\/tags?post=20"
      },
      {
        "taxonomy":"wsuwp_university_category",
        "embeddable":true,
        "href":"https:\/\/people.wsu.edu\/wp-json\/wp\/v2\/university_category?post=20"
      },
      {
        "taxonomy":"wsuwp_university_location",
        "embeddable":true,
        "href":"https:\/\/people.wsu.edu\/wp-json\/wp\/v2\/location?post=20"
      },
      {
        "taxonomy":"wsuwp_university_org",
        "embeddable":true,
        "href":"https:\/\/people.wsu.edu\/wp-json\/wp\/v2\/organization?post=20"
      },
      {
        "taxonomy":"classification",
        "embeddable":true,
        "href":"https:\/\/people.wsu.edu\/wp-json\/wp\/v2\/classification?post=20"
      }
    ],
    "curies":[
      {
        "name":"wp",
        "href":"https:\/\/api.w.org\/{rel}",
        "templated":true
      }
    ]
  }
}

Releases

Newest 25 of 30 recorded releases.

Tag
Published
1.0.1.1 latest
Feb 14, 2024 2 years ago
Feb 14, 2024 2 years ago
Sep 27, 2019 7 years ago
Apr 10, 2019 7 years ago
Oct 5, 2018 8 years ago
Jun 12, 2018 8 years ago
May 14, 2018 8 years ago
Feb 26, 2018 8 years ago
Jan 30, 2018 8 years ago
Jan 24, 2018 8 years ago
Dec 21, 2017 8 years ago
Oct 13, 2017 9 years ago
Sep 14, 2017 9 years ago
Sep 12, 2017 9 years ago
Sep 8, 2017 9 years ago
Sep 5, 2017 9 years ago
Aug 9, 2017 9 years ago
Aug 8, 2017 9 years ago
Jul 28, 2017 9 years ago
Jul 27, 2017 9 years ago
Jun 21, 2017 9 years ago
Dec 8, 2016 9 years ago
Dec 14, 2015 10 years ago
Dec 10, 2015 10 years ago
Sep 10, 2015 11 years ago
All releases on GitHub →

These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.