Opened 3 years ago
Last modified 10 days ago
#12996 new enhancement
Clean up some redundant options from new blog setup, and remove legacy wp-hacks support
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Future Release |
| Component: | Optimization | Version: | 3.0 |
| Severity: | normal | Keywords: | has-patch needs-refresh |
| Cc: | info@…, nashwan.doaqan@… |
Description
In the process of updating some plugins for WP 3.0 I came across a few things that look like remnants of old WP versions that don't need to be there any more:
The following options are created during installation, but are redundant:
- gzipcompression (see #10365)
- advanced_edit (no idea what this was for)
- hack_file
With regard to hack_file - it's been deprecated since 1.5 and there is no longer an admin option for it - isn't it about time to remove it completely? See also #9551
Proposed patch to follow.
Attachments (3)
Change History (19)
comment:1
solarissmoke — 3 years ago
- Keywords dev-feedback added
comment:3
solarissmoke — 3 years ago
- Keywords has-patch added; dev-feedback removed
- Milestone changed from 3.1 to 3.0
I'm thinking this can safely be done in 3.0.
Certainly the old options can be removed, even if anyone objects to removing wp-hacks.
- Milestone changed from 3.0 to 3.1
I wouldn't object to removing it entirely as mu-plugins is a full replacement, but my-hacks still works. We removed the checkbox, but if the option is in the DB, the file gets included.
Since its autoloaded, we're not exactly doing a lot of work to keep support for it. Either way, we shouldn't be changing this so late in the dev cycle.
The others can go, that's not much of a problem. We'd need to add those to the array of options to delete on a schema upgrade.
comment:5
in reply to:
↑ 4
solarissmoke — 3 years ago
Replying to nacin:
Since its autoloaded, we're not exactly doing a lot of work to keep support for it. Either way, we shouldn't be changing this so late in the dev cycle.
Okay.
The others can go, that's not much of a problem. We'd need to add those to the array of options to delete on a schema upgrade.
Does such an array already exist (I can't find it)? Or would it mean adding a statement to the upgrade_300() function?
Does such an array already exist (I can't find it)? Or would it mean adding a statement to the upgrade_300() function?
$unusedoptions in schema.php.
comment:7
in reply to:
↑ 6
solarissmoke — 3 years ago
Replying to nacin:
$unusedoptions in schema.php.
Thanks :). Here's a patch that should clean up the two obsolete options (leaving hack_file for now).
solarissmoke — 3 years ago
Remove legacy (WP 1.5) wp-hacks support and some redundant options - refreshed patch
comment:8
solarissmoke — 3 years ago
- Summary changed from Clean up some redundant options from new blog setup to Clean up some redundant options from new blog setup, and remove legacy wp-hacks support
Have refreshed the patch - hopefully this can make it into 3.1
- Keywords commit added
- Milestone changed from Awaiting Triage to 3.1
Wow, talk about timing -- my comment just got rejected thanks to yours.
Not sure about wp-hacks... I'd love to remove it, I'll ask some of the other committers. The others are fine.
comment:10
markjaquith — 2 years ago
- Keywords 3.2-early added; commit removed
- Milestone changed from 3.1 to Future Release
Want more lead time to deprecate that. Reconsider at start of 3.2
solarissmoke — 2 years ago
comment:11
solarissmoke — 2 years ago
patch refreshed
comment:12
toscho — 4 months ago
- Cc info@… added
- Keywords needs-refresh added; 3.2-early removed
Let’s do this in 3.6. I will refresh the patch if needed. :)
comment:13
SergeyBiryukov — 4 months ago
- Milestone changed from Future Release to 3.6
comment:14
F J Kaiser — 4 months ago
After searching through core with all options setup during populate_options(), I can confirm that there're no changes with v3.5. The options that should get deprecated (still) are gzipcompression, hack_file, advanced_edit. The only thing, that I can't confirm is the use_trackback-option, as I don't find any usage in core and I'm not sure if/how this would be used by a theme or plugin.
There are also options left from bookmarks.php, where I'm not sure if they shouldn't get moved to a filter callback that hooks into do_action('populate_options') (which is the hook at the beginning of populate_options()) and adds them on demand. List of bookmark related optinos: links_updated_date_format, links_recently_updated_prepend, links_recently_updated_append, links_recently_updated_time, default_link_category.
comment:15
alex-ye — 13 days ago
- Cc nashwan.doaqan@… added
comment:16
ryan — 10 days ago
- Milestone changed from 3.6 to Future Release

I expect that anything that might have been done with wp-hacks can now be done by dropping the file into the mu-plugins directory; so dropping support for it completely is probably fairly safe.