[wp-trac] [WordPress Trac] #19681: Plugin update hook

WordPress Trac wp-trac at lists.automattic.com
Wed Dec 28 22:50:39 UTC 2011


#19681: Plugin update hook
-------------------------+------------------------------
 Reporter:  olliea95     |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Plugins      |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  close        |
-------------------------+------------------------------
Changes (by johnbillion):

 * keywords:   => close


Comment:

 If a plugin is manually updated then this upgrade hook won't fire. The
 best way to manage database upgrades is to do it the same way as WordPress
 does it. Store an option containing your plugin's database version and
 check it on the admin_init hook and run the upgrade routine when it
 doesn't match the version in your plugin. Many popular plugins use this
 method. It's definitely the most fool-proof.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/19681#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list