Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
WordPress Plugin Development Cookbook

You're reading from   WordPress Plugin Development Cookbook Create powerful plugins to extend the world's most popular CMS

Arrow left icon
Product type Paperback
Published in Jul 2017
Publisher
ISBN-13 9781788291187
Length 386 pages
Edition 2nd Edition
Languages
Concepts
Arrow right icon
Author (1):
Arrow left icon
Yannick Lefebvre Yannick Lefebvre
Author Profile Icon Yannick Lefebvre
Yannick Lefebvre
Arrow right icon
View More author details
Toc

Table of Contents (13) Chapters Close

Preface 1. Preparing a Local Development Environment FREE CHAPTER 2. Plugin Framework Basics 3. User Settings and Administration Pages 4. The Power of Custom Post Types 5. Customizing Post and Page Editors 6. Accepting User Content Submissions 7. Customizing User Data 8. Creating Custom MySQL Database Tables 9. Leveraging JavaScript, jQuery, and AJAX Scripts 10. Adding New Widgets to the WordPress Library 11. Enabling Plugin Internationalization 12. Distributing Your Plugin on wordpress.org

Removing plugin data on deletion

As with any piece of software, it is quite possible that users might decide to remove a plugin from their WordPress installation if they no longer require the functionality that it provides or they have found an alternative that they prefer.

When this happens, the plugin author must decide if all of the configuration data stored in the site's database should be left in place, making it easier to re-install the plugin down the road, or to remove all of this information, leaving a clean database behind.

This recipe shows how to create a de-installation function that will remove options data from a site's database.

Getting ready

You should have already followed the Storing user settings...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime