Learn how to automatically populate a field whenever a post is saved or updated.
- [Instructor] Using CMB2, we've added prediction,…pre-task stress level, outcome, and post-task stress level…fields to our task custom post type.…That leave task status.…Now, task status is not like these other fields.…It is not an input field that you control yourself.…Instead, task status should be an automatic field…that is either set to true or false,…depending on whether or not the task is opened or closed.…We measure the status of the task…by monitoring the outcome field.…So if the outcome field is filled out, it means the task is…completed, in which case task status should be set to true.…
If, on the other hand, the outcome field is empty,…it means the task is not completed,…and task status should be set to false.…We're going to solve the problem of setting this field…in two different ways across the two different contexts.…So right now, we'll focus on how to do it in WordPress…Admin, and then later on, when we work on the app,…we'll set the same field using the REST API.…Inside WordPress Admin, we'll use the save_post hook…
- Planning the application
- Extending WordPress with a plugin
- Setting up the standalone application
- Configuring OAuth 2 in WordPress
- Building the task list view
- Building the new task view
- Creating a new task via the REST API
- Displaying conditional content
- Visualizing data using Graph.js
Skill Level Advanced
1. Plan the Application
2. Extend WordPress with a Plugin
3. Set Up the Standalone Application
Review of user flow2m 34s
4. Build the Task List View
5. Build the New Task View
6. Build the Update/View Task View
7. Bonus Features
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.