Quantcast
Channel: WordpressErrors
Viewing all articles
Browse latest Browse all 147

Creating Maintainable WordPress Meta Boxes: Verify and Sanitize

$
0
0

Throughout this series, we’ve been creating a plugin that’s meant to provide authors with a way to collect, manage, and save ideas and references to content that they’re creating within WordPress.While doing so, we’re also looking at ways that we can organize our plugin so that the code and the file organization is clear and maintainable so that as the plugin continues development, we’re able to easily add, remove, and maintain its features.Up to this point, we’ve put together the basic file organization of the plugin as well as the front-end, but we haven’t actually implemented functionality for saving information to the database. And if you can’t save information, then the plugin is of little benefit to anyone.In this post, we’re going to hop back into the server-side code and begin implementing the functionality that will:Verify the user has the ability to save post meta dataSanitize the post meta dataSave the post meta dataValidate and retrieve the post meta dataWe’ve got our work cut out for us. In this article, we’re going to be looking at the first two steps and then in the next post, we’ll be looking at the final two steps.Verifying PermissionsIn order to verify that the user has the ability to publish to save post meta data, we need to implement a security check during the serialization process

More here:
Creating Maintainable WordPress Meta Boxes: Verify and Sanitize


Viewing all articles
Browse latest Browse all 147

Trending Articles