[wp-hackers] distinguish plugin options?
ozh at planetozh.com
Thu Jan 22 17:45:07 GMT 2009
As I see, it, there are 2 options:
100% automated: parse source and look for add_option() and
update_option(), as well as parse upgrade.php and look for
"option_name" and determine if it's added, removed or renamed.
Basically, a nightmare script to build.
95% automated: every time a major release is out, install it / upgrade
to it and dump option names into a static file. Update your plugin in
which there'll be something like include('./option_list_for_wp_' .
Yes it means you'll have to (very minorly) update the list & plugin as
long as either you or WP are active. What you'll do anyway. And if
you're no longer active, chances are you'll don't care a lot about
supporting a plugin, right? :)
On Thu, Jan 22, 2009 at 5:56 PM, Stephen Rider
<wp-hackers at striderweb.com> wrote:
> I'm trying to avoid having to create/maintain some kind of ongoing master
> list. Especially as, in order for users to have the most current, they
> would basically be dinging my servers constantly.
> In the long term, it would be nice if WordPress created such a list that
> could exist *within the core download*, so that scripts trying to figure out
> what options are "core" or not could do so easily.
> Such a thing would also be handy for people (or plugins) trying to clean up
> old stale data, such as options for plugins they no longer have.
> Also, aren't there some cases in WP core where there are variable option
> names? add_option( 'option-'.$x, ...) or similar?
> Stephen Rider
http://planetOzh.com ~ Blog and WordPress Stuff
http://FrenchFragFactory.net ~ Daily Quake News
More information about the wp-hackers