Make WordPress Core

Opened 15 years ago

Closed 9 years ago

Last modified 9 years ago

#12996 closed enhancement (fixed)

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

Reported by: solarissmoke's profile solarissmoke Owned by: dd32's profile dd32
Milestone: 4.4 Priority: normal
Severity: normal Version: 3.0
Component: Bootstrap/Load Keywords: has-patch commit
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 (4)

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

Download all attachments as: .zip

Change History (33)

#1 @solarissmoke
15 years ago

  • Keywords dev-feedback added

#2 @strider72
15 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.

#3 @solarissmoke
15 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.

#4 follow-up: @nacin
15 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.

#5 in reply to: ↑ 4 @solarissmoke
15 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?

#6 follow-up: @nacin
15 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.

#7 in reply to: ↑ 6 @solarissmoke
15 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
15 years ago

Remove redundant gzipcompression and advanced_edit options

@solarissmoke
14 years ago

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

#8 @solarissmoke
14 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

#9 @nacin
14 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.

#10 @markjaquith
14 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
14 years ago

#11 @solarissmoke
14 years ago

patch refreshed

#12 @toscho
12 years 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. :)

#13 @SergeyBiryukov
12 years ago

  • Milestone changed from Future Release to 3.6

#14 @F J Kaiser
12 years 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 options: links_updated_date_format, links_recently_updated_prepend, links_recently_updated_append, links_recently_updated_time, default_link_category.

Last edited 12 years ago by F J Kaiser (previous) (diff)

#15 @alex-ye
12 years ago

  • Cc nashwan.doaqan@… added

#16 @ryan
12 years ago

  • Milestone changed from 3.6 to Future Release

#17 @josephscott
12 years ago

  • Cc joseph@… added

#18 @nacin
11 years ago

  • Component changed from Optimization to Bootstrap/Load

#19 @chriscct7
9 years ago

  • Milestone changed from Future Release to 4.4
  • Owner set to chriscct7
  • Status changed from new to assigned

#20 @chriscct7
9 years ago

Since #33741 has the myhacks, I'll just refresh this to remove the options proposed.

Last edited 9 years ago by SergeyBiryukov (previous) (diff)

#21 @DrewAPicture
9 years ago

@chriscct7: What's the status on getting a new patch here?

#22 @chriscct7
9 years ago

I will have it refreshed today or tomorrow

Last edited 9 years ago by chriscct7 (previous) (diff)

@chriscct7
9 years ago

#23 @chriscct7
9 years ago

  • Keywords commit added; needs-refresh removed

Done. Since the hacks stuff was already removed, the refreshed patch is considerably smaller.

#24 @DrewAPicture
9 years ago

  • Owner changed from chriscct7 to DrewAPicture
  • Status changed from assigned to reviewing

#25 @DrewAPicture
9 years ago

  • Owner changed from DrewAPicture to dd32

Whoops. Meant to have @dd32 take a look at this.

#26 @wonderboymusic
9 years ago

  • Milestone changed from 4.4 to Future Release

This ticket was mentioned in Slack in #core by wonderboymusic. View the logs.


9 years ago

#28 @wonderboymusic
9 years ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 35360:

Options: remove old 'gzipcompression' and 'advanced_edit' options.

Props chriscct7, solarissmoke.
Fixes #12996.

#29 @wonderboymusic
9 years ago

  • Milestone changed from Future Release to 4.4
Note: See TracTickets for help on using tickets.