WordPress.org

Make WordPress Core

Opened 4 years ago

Last modified 3 months ago

#12996 new enhancement

Clean up some redundant options from new blog setup, and remove legacy wp-hacks support

Reported by: solarissmoke Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 3.0
Component: Bootstrap/Load Keywords: has-patch needs-refresh
Focuses: Cc:

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 4 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 3 years ago.

Download all attachments as: .zip

Change History (21)

comment:1 solarissmoke4 years ago

  • Keywords dev-feedback added

comment:2 strider724 years ago

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.

comment:3 solarissmoke4 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.

comment:4 follow-up: nacin4 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 solarissmoke4 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: nacin4 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 solarissmoke4 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).

solarissmoke4 years ago

Remove redundant gzipcompression and advanced_edit options

solarissmoke3 years ago

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

comment:8 solarissmoke3 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

comment:9 nacin3 years ago

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

solarissmoke3 years ago

comment:11 solarissmoke3 years ago

patch refreshed

comment:12 toscho15 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 SergeyBiryukov15 months ago

  • Milestone changed from Future Release to 3.6

comment:14 F J Kaiser15 months ago

After searching through core with all options (which are 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 1, edited 15 months ago by F J Kaiser (previous) (next) (diff)

comment:15 alex-ye11 months ago

  • Cc nashwan.doaqan@… added

comment:16 ryan11 months ago

  • Milestone changed from 3.6 to Future Release

comment:17 josephscott8 months ago

  • Cc joseph@… added

comment:18 nacin3 months ago

  • Component changed from Optimization to Bootstrap/Load
Note: See TracTickets for help on using tickets.