Make WordPress Core

Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#9551 closed enhancement (fixed)

My-hacks doesn't need an admin option

Reported by: filosofo's profile filosofo Owned by:
Milestone: 2.8 Priority: normal
Severity: normal Version: 2.8
Component: Administration Keywords: has-patch my-hacks
Focuses: Cc:

Description

We should remove the my hacks checkbox. If someone is really using my-hacks, which has been deprecated since 1.5 or thereabouts, then that person has already toggled the check box, and that option will remain the same.

Anyone who really needs this (nobody) can enable it with a three-line plugin, or just use the plugin to include my-hacks.php.

Attachments (1)

no_hack_file_needed.9551.diff (2.1 KB) - added by filosofo 15 years ago.

Download all attachments as: .zip

Change History (11)

#1 @ryan
15 years ago

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

(In [10964]) Remove My Hacks option. Props filosofo. fixes #9551

#2 @ryan
15 years ago

Plus, we've added autoloading plugins courtesy of mu-plugins.

#3 follow-up: @Denis-de-Bernardy
15 years ago

mu-plugins works in wp too?

#4 in reply to: ↑ 3 @Viper007Bond
15 years ago

Replying to Denis-de-Bernardy:

mu-plugins works in wp too?

For 6 weeks now: [10737]

#5 @bueltge
15 years ago

  • Priority changed from normal to high
  • Resolution fixed deleted
  • Status changed from closed to reopened
  • Type changed from defect (bug) to enhancement

Maybe it is possible to change the load the my-hacks.php in wp-settings.php to a ask for the file, better as a an option, this has no checkbox in backend.
Please remoce the if option-ask for the release 2.8

// Check for hacks file if the option is enabled
if ( file_exists(ABSPATH . 'my-hacks.php') )
	require(ABSPATH . 'my-hacks.php');

#6 @Denis-de-Bernardy
15 years ago

If my memory serves me well, the whole point of the option was to avoid the (slow) call to file_exists(). Then again, we've so many calls to that function that one more or one less. :D

#7 @Viper007Bond
15 years ago

No need to slow down 99.999% of sites with a file_exists() check. It's deprecated, let's keep it so.

#8 @Denis-de-Bernardy
15 years ago

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

#9 follow-up: @bueltge
15 years ago

  • Cc bueltge added
  • Priority changed from high to normal

thanks for information, file_exists is so slowly?
Maybe is this an point for other ask in the core - object-cache.php, maintenance and many more asks for files, she use only in a few installs? Many user uses the my-hacks.php and now she must set the option with a code, and not with a checkbox, is this realy the idea of options?

#10 in reply to: ↑ 9 @Denis-de-Bernardy
15 years ago

Replying to bueltge:

thanks for information, file_exists is so slowly?

ooh yeah. plus, a few years back, there was a bug whereby the site switched to the default theme all them time. and investigation revealed that, on heavily loaded servers, there were occurrences of file_exists that returned false -- and so WP switched back to the default theme outright.

Maybe is this an point for other ask in the core - object-cache.php, maintenance and many more asks for files, she use only in a few installs? Many user uses the my-hacks.php and now she must set the option with a code, and not with a checkbox, is this realy the idea of options?

my-hacks has been "obsolete" since forever. basically since the plugin API was introduced.

Note: See TracTickets for help on using tickets.