We have been looking at the best way to make a straightforward CRM system in WordPress. In the final part of the show, we added code to our plugin which enabled us to seek our contacts on the basis of the information saved in Advanced Custom Fields. !
The permissions a Role has are called Abilities, and WordPress supplies a lot of distinct abilities (for example, install_plugins, update_themes, edit_pages, etc). If you are interested in seeing the entire listing of Capacities predicated on Function, see this WordPress Codex Page.
When we filed our Contacts Custom Post Sort in Part 1 of this show, we defined the ability_kind to be place. This implies that the read, edit and delete capabilities for Contacts are the same as used for Posts. Determined by the User's Job, this provides the User the subsequent access to our Contacts Custom Post Sort:
Predicated on the aforementioned abilities, if we need Users in order to add, edit and delete all Contacts (including Contacts made by other Users), we had must make use of the Editor function. Let us go right ahead and make a brand new WordPress User with that part:
Nevertheless, you may just need Users in order to see other Users' Contacts without being able to edit or delete them. We can accomplish it by utilizing the Writer function, as this function will not have edit_others_places or delete_others_posts Abilities (refer to the table above).
Go forward and add a brand new Contact. After done, click on All Contacts in the WordPress Administration Menu. Instead of seeing all Contacts made by other WordPress Users, you will now see Contacts which you have created, which you are capable to edit and delete:
Posted on April 21, 2015 at 08:00 PM