Make WordPress Core

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#16278 closed enhancement (wontfix)

Designate core options in options table

Reported by: ryan_b's profile ryan_b Owned by:
Milestone: Priority: normal
Severity: minor Version:
Component: Database Keywords:
Focuses: Cc:


I think there should be another column added to the options table, call it something like "core" set it to yes if the option belongs to the core, otherwise if it belongs to a plugin set it to no. Then emptying out plugin settings is a simple sql query: "DELETE * From wp_options WHERE 'core' = 'no'".

Change History (4)

#1 @PeteMall
13 years ago

  • Resolution set to wontfix
  • Status changed from new to closed

There are no schema changes planned for the options table.

#2 @PeteMall
13 years ago

  • Keywords dev-feedback removed
  • Milestone Awaiting Review deleted

#3 @nacin
13 years ago

It'd be better to clear out the entire database then re-run the installer. This is edge case for debugging only.

#4 @mikeschinkel
13 years ago

  • Cc mikeschinkel@… added

Adding a core column makes little sense given how careful the team is to modify the database (which is a good thing) but I think his use-cases should not be immediately dismissed. I can definitely see value in a registration of option keys so that plugins that need access to that meta data could use it.

One method could be to add a hook named (something like) 'option_keys' that when called would return an array of option keys where the value of might me an array of meta about the key, such as 'owner' => ('core', "{$plugin_slug}", etc.), 'status' => ('persistent','transitory', etc.), 'default_value'and more. Then core could implement those hooks to enable a plugin to inspect the data for maintenance routines. And plugins could provide these hooks too, of course.

I guess what I'm suggesting is to explore @ryan_b's use-cases rather than just closing the ticket as there's probably something of value in his request.

Note: See TracTickets for help on using tickets.