Artwork

Το περιεχόμενο παρέχεται από το WPCandy. Όλο το περιεχόμενο podcast, συμπεριλαμβανομένων των επεισοδίων, των γραφικών και των περιγραφών podcast, μεταφορτώνεται και παρέχεται απευθείας από τον WPCandy ή τον συνεργάτη της πλατφόρμας podcast. Εάν πιστεύετε ότι κάποιος χρησιμοποιεί το έργο σας που προστατεύεται από πνευματικά δικαιώματα χωρίς την άδειά σας, μπορείτε να ακολουθήσετε τη διαδικασία που περιγράφεται εδώ https://el.player.fm/legal.
Player FM - Εφαρμογή podcast
Πηγαίνετε εκτός σύνδεσης με την εφαρμογή Player FM !

Pressbits 005: Don’t delete plugin options on deactivation

1:41
 
Μοίρασέ το
 

Manage episode 157508894 series 1224197
Το περιεχόμενο παρέχεται από το WPCandy. Όλο το περιεχόμενο podcast, συμπεριλαμβανομένων των επεισοδίων, των γραφικών και των περιγραφών podcast, μεταφορτώνεται και παρέχεται απευθείας από τον WPCandy ή τον συνεργάτη της πλατφόρμας podcast. Εάν πιστεύετε ότι κάποιος χρησιμοποιεί το έργο σας που προστατεύεται από πνευματικά δικαιώματα χωρίς την άδειά σας, μπορείτε να ακολουθήσετε τη διαδικασία που περιγράφεται εδώ https://el.player.fm/legal.

In this episode of Pressbits I discuss my pet peeve of plugin developers deleting my options settings on deactivation, rather than upon uninstallation.

You should listen to it, especially if you’re a plugin developer.

Download audio file (Pressbits-0005-plugin-options-and-deactivation.mp3)

If you would rather download it directly you can do that too, or subscribe to this show via RSS or on iTunes. If you would prefer a written summary, you can also read that just after the jump.

Deactivating and uninstalling a plugin are not the same thing

Let’s talk about plugin options. Specifically, what I expect as a user when I deactivate a plugin, versus uninstall one. WordPress has some hooks built in that help enable plugin others to do things, namely register_activation_hook, register_deactivation_hook, and register_uninstall_hook. The deactivation hook and uninstall hook are great places to trigger certain things. Unfortunately, too many plugin authors unset options in the wrong one.

When I deactivate a plugin, I’m not really trying to totally remove the plugin from my site, but rather just turn it off. So when a plugin author deletes all of the options I’ve selected on a plugins’ settings screen on the deactivation hook, it makes me angry that I have to go and reset them when I turn it back on. So angry that I might just find another solution for what your plugin is doing.

What they should be doing instead, is removing these options, and everything else, with the uninstall hook. When i uninstall a plugin completely, it is safe to assume I am finished with it, and it is the appropriate place to take such action. But when I simply deactivate, in all likelihood I’m just debugging something in my theme or another plugin, or maybe backing up or upgrading something.

So consider this a friendly message to plugin developers, and future plugin developers – remove options on the uninstall hook, and not the deactivation hook.

You just finished reading Pressbits 005: Don't delete plugin options on deactivation on WPCandy. Please consider leaving a comment!

The post Pressbits 005: Don’t delete plugin options on deactivation appeared first on WPCandy.

  continue reading

8 επεισόδια

Artwork
iconΜοίρασέ το
 
Manage episode 157508894 series 1224197
Το περιεχόμενο παρέχεται από το WPCandy. Όλο το περιεχόμενο podcast, συμπεριλαμβανομένων των επεισοδίων, των γραφικών και των περιγραφών podcast, μεταφορτώνεται και παρέχεται απευθείας από τον WPCandy ή τον συνεργάτη της πλατφόρμας podcast. Εάν πιστεύετε ότι κάποιος χρησιμοποιεί το έργο σας που προστατεύεται από πνευματικά δικαιώματα χωρίς την άδειά σας, μπορείτε να ακολουθήσετε τη διαδικασία που περιγράφεται εδώ https://el.player.fm/legal.

In this episode of Pressbits I discuss my pet peeve of plugin developers deleting my options settings on deactivation, rather than upon uninstallation.

You should listen to it, especially if you’re a plugin developer.

Download audio file (Pressbits-0005-plugin-options-and-deactivation.mp3)

If you would rather download it directly you can do that too, or subscribe to this show via RSS or on iTunes. If you would prefer a written summary, you can also read that just after the jump.

Deactivating and uninstalling a plugin are not the same thing

Let’s talk about plugin options. Specifically, what I expect as a user when I deactivate a plugin, versus uninstall one. WordPress has some hooks built in that help enable plugin others to do things, namely register_activation_hook, register_deactivation_hook, and register_uninstall_hook. The deactivation hook and uninstall hook are great places to trigger certain things. Unfortunately, too many plugin authors unset options in the wrong one.

When I deactivate a plugin, I’m not really trying to totally remove the plugin from my site, but rather just turn it off. So when a plugin author deletes all of the options I’ve selected on a plugins’ settings screen on the deactivation hook, it makes me angry that I have to go and reset them when I turn it back on. So angry that I might just find another solution for what your plugin is doing.

What they should be doing instead, is removing these options, and everything else, with the uninstall hook. When i uninstall a plugin completely, it is safe to assume I am finished with it, and it is the appropriate place to take such action. But when I simply deactivate, in all likelihood I’m just debugging something in my theme or another plugin, or maybe backing up or upgrading something.

So consider this a friendly message to plugin developers, and future plugin developers – remove options on the uninstall hook, and not the deactivation hook.

You just finished reading Pressbits 005: Don't delete plugin options on deactivation on WPCandy. Please consider leaving a comment!

The post Pressbits 005: Don’t delete plugin options on deactivation appeared first on WPCandy.

  continue reading

8 επεισόδια

Όλα τα επεισόδια

×
 
Loading …

Καλώς ήλθατε στο Player FM!

Το FM Player σαρώνει τον ιστό για podcasts υψηλής ποιότητας για να απολαύσετε αυτή τη στιγμή. Είναι η καλύτερη εφαρμογή podcast και λειτουργεί σε Android, iPhone και στον ιστό. Εγγραφή για συγχρονισμό συνδρομών σε όλες τις συσκευές.

 

Οδηγός γρήγορης αναφοράς