WordPress powers many large websites with thousands of users like blogs, applications, social networks and much more. You will deal with many cases in which you need to work with users and fortunately wordpress has many functions to handle users.
WordPress ships with a powerful roles and capabilities system which control users permissions. Roles enable plugin developers to group users, each group has its own permissions. Understanding roles and capabilities is important aspect of plugin development.
We discussed before wordpress users metadata and how it is flexible. Now we will explore how to use metadata in storing a per-user settings and how to add fields to user profile page to update metadata value.
WordPress creates 11 tables to store settings, users data, posts data, comments data, links and terms. In many cases wordpress tables can fit perfectly our plugin data but sometimes you need to create custom tables. WordPress provides a handful function that can create your custom tables and update their structure easily.
WordPress users metadata used to store additional data related to users. We will discuss how to set, retrieve, update and delete metadata.
The wordpress transients API offers a simple and powerful way to store volatile data in database. It is similar to plugin options API but transients have an expiration time then it will expired and deleted.
Cron API is a great feature of wordpress. It allows wordpress to execute certain functions on a schedule. By default, wordpress schedule events to check for new versions and to check for plugins and themes updates. Every time your blog requested by visitor or search engine bot. WordPress check if there are any cron jobs to run.