New feature: my-hacks.php

Posted December 15, 2003 by Matt Mullenweg. Filed under Development.

In the past if you were going to add a filter or hack you would have to modify one of the existing WP files and your changes would then be overwritten when you upgraded to a new version. No more. I’ve just checked in the code that adds a new option where you can enable or disable a hacks file. When this option is enabled it checks for a file called my-hacks.php in your WordPress root and if the file exists, it includes the code from that file. Hopefully this will make it easier for hack writers to structure their code and write instructions for installation, and it will be easier for users because they won’t have to redo all their hacks and extensions every time their upgrade or overwrite a file. Discussion in the hacks forum.

No Pings

RSS feed for comments on this post.

  1. WordPress DevelopmentI just have to say that I’m very excited about the development of WP.

    For one, the developers have renamed everything, which I think is key. They’ve also massively reorganized things in the renaming—you’ll have very few files in you…

    Trackback from The Indiana Jones School of Management on December 18, 2003

  2. … And It’s Back
    Okay, obviously I’ve re-jiggered my templates a bit and have the old new look back.

    And yes, I still haven’t added back WG pinging. I need to find the code-pieces Rick came up with over in my files over at GFMorris.com, then turn around and p…

    Trackback from The Indiana Jones School of Management on January 13, 2004

  3. […] ya tiempo que quería comentar algo acerca de este fichero my-hacks.php se encarga de contener los hacks que queremos que funcionen sobre nuestra configuración de […]

    Pingback from El fichero my-hacks.php en WordPress | aNieto2K on February 19, 2008

  4. […] haz visto el archivo my-hacks.php o habrás visto una opción relacionada con el en tu panel de control pero no te has atrevido a […]

    Pingback from WordPress: Todo lo que querías saber sobre My-hacks.php en | ProyectoAurora.com on September 30, 2008

  5. […] cambiar el literal “admin” sin preocuparnos de nada más, podemos hacerlo mediante el archivo my-hacks.php, que tendrá que estar en el directorio raíz de WordPress, al mismo nivel que config.php, por […]

    Pingback from Modificar el nombre de usuario “admin” de WordPress mediante my-hacks.php on November 23, 2008

See Also:

Want to follow the code? There’s a development P2 blog and you can track active development in the Trac timeline that often has 20–30 updates per day.

Want to find an event near you? Check out the WordCamp schedule and find your local Meetup group!

For more WordPress news, check out the WordPress Planet or subscribe to the WP Briefing podcast.


Subscribe to WordPress News

Join 3,094,347 other subscribers

%d bloggers like this: