[wp-hackers] Will Activation Hook Be Executed During Plugin Upgradation?

Eric Mann eric at eamann.com
Mon Sep 20 21:51:45 UTC 2010


On the one hand I agree with you.  We need to be able to handle situations where
users manually update a plug-in via FTP.  However, setting up some
pre_update/post_update hooks for plug-ins would still be highly useful.
 
I'd also like to see the ability to update from a local ZIP file through the UI
... this wouldn't handle all manual update situations, but would cover quite a
few of them (a few of my clients are forced to manually update do to strange
configuration issues on their server from other services they have running that
break the auto-updater ... it's easier for them to just live with FTP updates
than to actually fix a bug that only affects them once or twice a year).
 
Even if we have update hooks, it's near impossible to detect when users are
manually updating ... so perhaps an initialization function that checks the
plug-in's expected/current version against one stored in the DB (this was
already recommended) and automatically runs an update script should become a
best practice ...

On September 20, 2010 at 9:09 PM "Cornelius, Gregory" <gcorne at bu.edu> wrote:

> I don't think it is a good idea to assume that upgrades to plugins/themes are
> made through the WP admin interface.
>
> On Sep 20, 2010, at 4:36 PM, scribu wrote:
>
> > On Mon, Sep 20, 2010 at 11:28 PM, Andrew Nacin <wp at andrewnacin.com> wrote:
> >
> >> On Mon, Sep 20, 2010 at 4:25 PM, Ozh <ozh at ozh.org> wrote:
> >>
> >>> Never payed attention to it before, but is there a semantic/usage
> >>> difference between "update" and "upgrade" in WP? "Update a plugin" vs
> >>> "Upgrade core"?
> >>
> >>
> >> We're gravitating toward the term "update" everywhere.
> >>
> >
> > That might be a good idea for the UI, since it sounds lighter, but I think
> > functions should continue to use 'upgrade'.
> >
> > 'update' is part of the CRUD family, so it's perfect for update_option()
> > etc.
> >
> > 'upgrade' has a direction and therefore an opposite: 'downgrade' so it's
> > more descriptive.
> >
> > So, my revised proposal:
> > register_upgrade_hook()<http://core.trac.wordpress.org/ticket/14912>,
> > which internally would call do_action(), like Dougal suggested. Theme
> > activation hooks are another can of worms.
> >
> >
> > --
> > http://scribu.net
> > _______________________________________________
> > wp-hackers mailing list
> > wp-hackers at lists.automattic.com
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers


More information about the wp-hackers mailing list