Members - roberts-sandbox/create-repo GitHub Wiki
Members are the post type used to represent patrons of the library.
Members are capable of borrowing Items (books) from or donating items to the library. Borrowing an item from the library creates a Loan. If the item is returned late the librarian can choose to fine the member.
Members can only be viewed on the front-end by logged in Librarians as part of the loan status displayed by Items. Members can be viewed on the back-end on the admin post table at /wp-admin/edit.php?post_type=wp_lib_members or from their management page on the Library Dashboard.
###Post Meta
Members store information about themselves in their post meta. Below lists all post meta added by WP-Librarian, mandatory unless otherwise noted.
| Meta | Key | Data Type | Description |
|---|---|---|---|
| Phone No.* | wp_lib_member_phone |
String | Member's phone number (presumed landline/work) |
| Mobile No.* | wp_lib_member_mobile |
String | Member's mobile phone number |
| Email* | wp_lib_member_email |
String | Member's email address |
| Archived‡ | wp_lib_member_archive |
Integer | Whether the member has been archived. This hides them from dropdown menus when loaning items, allowing ex-members to be kept on record for archiving purposes without clogging up regular library usage |
| PaymentsΔ | wp_lib_payments |
Array (Serialised) | Each post meta instance represents a single payment made by the member to offset their late fines. Each entry contains: current time stamp, the amount paid and the librarian's user ID |
* Optional post meta
‡ Optional post meta that if present and equal to 1 are True and otherwise False
Δ Post meta with multiple values