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: solarissmoke 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:

  • 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)

12996-clean-old-options.patch (2.1 KB) - added by solarissmoke 3 years ago.
Remove redundant gzipcompression and advanced_edit options
clean-redundant-options-and-wp-hacks.patch (4.6 KB) - added by solarissmoke 3 years ago.
Remove legacy (WP 1.5) wp-hacks support and some redundant options - refreshed patch
12996.diff (4.6 KB) - added by solarissmoke 2 years ago.

Download all attachments as: .zip

Change History (19)

  • Keywords dev-feedback added

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.

  • 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.

comment:4 follow-up: ↓ 5   nacin3 years ago

  • 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   solarissmoke3 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?

comment:6 follow-up: ↓ 7   nacin3 years ago

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   solarissmoke3 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).

Remove redundant gzipcompression and advanced_edit options

Remove legacy (WP 1.5) wp-hacks support and some redundant options - refreshed patch

  • 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.

  • 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

patch refreshed

  • 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. :)

  • Milestone changed from Future Release to 3.6

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.

Version 0, edited 4 months ago by F J Kaiser (next)
  • Cc nashwan.doaqan@… added
  • Milestone changed from 3.6 to Future Release
Note: See TracTickets for help on using tickets.