#5316 closed enhancement (wontfix)
Extend options.php to allow deletion, Viewing of Serialized, And grouping options
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | |
| Component: | Administration | Keywords: | |
| Focuses: | Cc: |
Description
I floated this idea back in September on wp-hackers: http://comox.textdrive.com/pipermail/wp-hackers/2007-September/thread.html#14425 ([wp-hackers] adding delete/autoload to options.php)
Basically this patch allows options to be deleted from the options.php page(By checking its checkbox - a JS confirmation is done before form submitting to make sure the user intends to delete them), Viewing of Serialized data, And also groups the options by name.
Grouping is achieved by taking the first word in the term, Ie. "test" in "test_plugin_data", If there are more than 2 terms with such a groupname, then they're promoted into their own section, This makes it easier to mass-select a particular 'groups' options to delete.
An invert selection option is also available for each group, So if a user wants to delete all the RSS cache items, They can either select all the cache items to remove, or, Select the items they wish to keep(in the rss section) and click Invert.
I've attached a plugin which is identical to the patch for those not wanting to apply the patch.
The linked wp-hackers thread mentioned also having an option to set autoload, I have not yet done that (As it'll require modifying/creating other functions) yet, But would like to include it, Just not sure how in the UI it could be managed without looking too crowded.
Attachments (6)
Change History (17)
#2
@
18 years ago
- Keywords dev-feedback added
I really, really like this. Very convenient to be able to delete options from here (handy for plugin testing etc) and the grouping by prefix is very sexy.
I can see no reason for this going into core, as because of the relative obscurity of this options page, it won't affect the majority of people who use WordPress, and I'm sure the people who do use this options page from time to time will be in favour of these nice changes.
As its main aim is plugin developers (correct me if I'm wrong), it could just as effectively remain as a plugin though, so I'll give it a +0.75 for core.
#3
@
18 years ago
Oh also, it would be ace to be able to edit the serialized data. Can't imagine that would be too easy to do though.
#4
@
18 years ago
Editing serialized data was suggested on wp-hackers, And i've got a idea in my mind for how to achieve that thanks to some suggestions. (Well, Editing at least for Serialised Arrays, Objects are a bit harder).
It could effectivly stay as a plugin, which is why i wrapped it up into a plugin for this ticket, Since the options page is rather obscure, it doesnt affect many users, But most of these are changes which are useful to most people who use the options page(for whatever reason), I know some people who have a couple of thousand options in their WP installs (from playing with plugins over the years) - To them, the ability to delete a group of options from a plugin they no longer use would be great.
Its that reason why i thought as a core feature, It doesnt affect many people, But the options page IS there, Why not allow more control over the options for people who do tinker with their WP installs? (Thats more than just Plugin Developers, Allthough Devs are the main target for these changes)
#6
@
17 years ago
- Version changed from 2.5 to 2.6
Been playing around again, And scraped some of the ideas of this ticket.
Last time around when playing with Jeditable i found it wasnt really suited to the job that well, Since most of the fields are editable, it makes sense that the user should see textboxes for editing, rather than having to click to edit.
I'm adding a patch in a moment that allows:
- Filtering of the table to only show rows matching a certain phrase
- Allows Deletion of options via checkbox
- Allows multiple checkbox's to be selected via Shift+select from the admin-forms JS
- Javascript degrades into normal page reloading.
Things to note:
- The checkAll() and shift+select range javascripts from admin-forms were modified to only check checkbox's in visible rows
- Shouldnt affect any other uses of the admin-forms JS as they're only dealing with visible table rows anyway.
- Added UI Table Filter script from http://gregweber.info/projects/uitablefilter (Dual Licenced under MIT and GPL)
- I found that the script filtering to an empty phrase could be slow, So i've added a branch in the custom code to use my own routine.
- Only filters to a search when the phrase is > 2 char in JS mode
- Inline Javascript from the options page could be moved to an external script
- No viewing of Serialised data, Yet. Unsure of what to do in those cases as currently it may be too hard to allow editing of such data
- Simple arrays shouldnt be too hard, But more complex objects and nested arrays can be difficult
@
17 years ago
Some styling changes, styles in wp-admin.css were also combined (Mutliple styles for different ID's with the same code)
#7
@
17 years ago
attachment 5316.3.diff added.
- Did away with the form-table, and moved over to the widefat table, While the form-table is generally used on the other settings pages, On tabalised data, the widefat class generally looks better. (And supports a check column better without adding extra styling)
- Streamlined some other code and aligned things better.
The Columns still need to be worked out a bit more, And maybe some button changes need to be made, Some feedback for those would be nice.
#8
@
17 years ago
attachment 5316.5.diff added.
- Adds Viewing of Serialised arrays
- Doesnt allow viewing of Objects as generally they're cache files and rather large.
- Doesnt support editing arrays.
- degrades gracefully
- All previous uses of options.php remain valid and require no changes
#9
@
17 years ago
Unless theres any traction from anyone, I'll close this off as a wontfix in a few days, And think about writing it up in a plugin at some stage.
patch against trunk options.php