Ticket #9551 (closed enhancement: fixed)

Opened 3 years ago

Last modified 3 years ago

My-hacks doesn't need an admin option

Reported by: filosofo Owned by: anonymous
Priority: normal Milestone: 2.8
Component: Administration Version: 2.8
Severity: normal Keywords: has-patch my-hacks
Cc: bueltge

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

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

Change History

comment:1   ryan3 years ago

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

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

comment:2   ryan3 years ago

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

mu-plugins works in wp too?

comment:4 in reply to: ↑ 3   Viper007Bond3 years ago

Replying to Denis-de-Bernardy:

mu-plugins works in wp too?

For 6 weeks now: [10737]

  • Priority changed from normal to high
  • Status changed from closed to reopened
  • Resolution fixed deleted
  • 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');

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

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

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

comment:9 follow-up: ↓ 10   bueltge3 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?

comment:10 in reply to: ↑ 9   Denis-de-Bernardy3 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.