From the course: WordPress Development: Coding Practice

Unlock the full course today

Join today to access over 24,400 courses taught by industry experts.

Sanitize input

Sanitize input

- [Instructor] Let's say you've received input from a user through a form. Before we add it to our database, we want to make sure the data is safe to store. So we want to sanitize those inputs. And as a quick note, usually this would come from a form or some other method of adding data to our WordPress site, but the input is going to be provided to you in the starting code. So the requirements given the provided input: use the appropriate sanitization functions to process it. Place that sanitized input into an unordered list. And then we will use a shortcode to display the output. As a reminder, there are different types of sanitization functions for the different types of data you can accept, such as text, general HTML, URLs and email addresses. So, be sure to use the right function. Taking a quick look at our starter code, notice that the sanitized input function has name, email, URL, and extra URL with some…

Contents