washingtonstateuniversity / WSU-People-Directory

A plugin to maintain a central directory of people.
Other
5 stars 1 forks source link

Introduce a base person object that provides consistent profile data #86

Open jeremyfelt opened 7 years ago

jeremyfelt commented 7 years ago

It should be possible to write $person = get_wsu_person( 123 ); or similar and get back a WSU_Person object (or similar) and then reference stuff like:

First Name: <?php echo esc_html( $person->ad_first_name ); ?>
Last Name: <?php echo esc_html( $person->ad_last_name ); ?>

This can probably allow for easy extension by others in the future. It should also help us avoid rewriting similar code in many places to capture all of the various fields associated with a person.

I don't think this is time critical, but could come in handy soon.

jeremyfelt commented 7 years ago

I found myself wishing for this today. I'm going to start on an initial branch/PR to show what I'm thinking.