Items - roberts-sandbox/create-repo GitHub Wiki
Items are the post type used to represent single physical items of a library's media. For most libraries the word book is interchangeable with item but, as libraries can also contain DVDs, CDs and other media, the more general term item is used.
Items are similar to the default WordPress Post in that they have a title, editor, featured image and customisable permalink. While items have features that expand their capabilities to hold domain information, the power of items comes from their interactions with WP-Librarian's other post types: Members, Loans and Fines. Items can be loaned to Members, creating Loans. If the Item is returned late (after its due date) a Fine may be incurred.
###Post Meta
Items store information about themselves and foreign keys to connected library objects in their post meta. Below lists all post meta added by WP-Librarian, mandatory unless otherwise noted.
| Meta | Key | Data Type | Description |
|---|---|---|---|
| Member ID | wp_lib_member |
Integer | Member currently in possession of the item |
| Loan ID | wp_lib_loan |
Integer | Current active loan of the item |
| ISBN* | wp_lib_item_isbn |
Integer | If the item is a book, its ISBN number |
| Loanable‡ | wp_lib_item_loanable |
Integer | Whether the item can be loaned |
| Delisted‡ | wp_lib_item_delist |
Integer | Whether the item is hidden from the main public listing. This does not stop the item being accessed by its public URL |
| Display Donor‡ | wp_lib_display_donor |
Integer | Whether to publicly display the item's donor. Logged in librarians can always see the item's donor on public pages |
| Condition* | wp_lib_item_condition |
Integer | The physical state of an item. 4 = brand new, 1 = tatty |
| Barcode* | wp_lib_item_barcode |
Integer | A number that can be used to reference the item |
| Cover* | wp_lib_item_cover_type |
Integer | Whether the item is 2 - hardback or 3 - softback. No value equates to unknown/not a book |
| Donor* | wp_lib_item_donor |
Integer | Post ID of member who donated the item |
* Optional post meta
‡ Optional post meta that if present and equal to 1 are True and otherwise False