my-hacks.php no longer supported

A long time ago in a WordPress far, far away sites were customized via the use of a my-hacks.php file. Then 2005 came along and brought with it a new developer feature: Plugins and Themes. For the last ten years, there has been an option to continue using my-hacks.php. Following the WordPress philosophy Decisions, not Options, as of today, WordPress trunktrunk A directory in Subversion containing the latest development code in preparation for the next major release cycle. If you are running "trunk", then you are on the latest revision. no longer supports the use of a my-hacks.php file. The option has long been removed from the adminadmin (and super admin) and now the file will not be loaded.  This is a breaking change for sites that still use a my-hacks.php file.

If you are using my-hacks.php, now is a great time to convert that code into a proper pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party. For the last number of years, the file has been loaded just like any other plugin. To change your my-hacks.php file into a plugin you need to do three steps:

  1. Move the file from the root of your install into the plugins folder which defaults to wp-content/plugins
  2. Add the plugin file header comments to the file
  3. Activate your new plugin

This change is associated with ticketticket Created for both bug reports and feature development on the bug tracker. #33741.

#4-4, #breaking-change, #dev-notes, #my-hacks-php