Support » Requests and Feedback » REQ: deliver empty my-hacks.php

  • I understand
    Why not the following:
    1) set hack_file to true by default !
    2) deliver an empty my-hacks.php with no leading or trailing lines in the file and some documentation inside the <? and ?>
    Advantage: At, one of the common files listed is my-hacks.php. But since the file doesnot exist, one has to create the file first outside WP. The above will eliminate this step !
    To summarise, deliver a file and WP should work _as if_ it doesn’t exist and still nothing happens. In this way, there should be no performance problems too… right ? ( including an empty php file )
    Another option: deliver a simple my-hacks implementation with docu for any user to understand how the “my-hacks.php” concept works…

Viewing 10 replies - 1 through 10 (of 10 total)
  • goos suggestion, at least for the file itself with the default php tags… will cut some reclaims.

    Actually, the whole point of my-hacks.php is that this file does not get overwritten (or rewritten with a CVS diff) on upgrade of a version of WordPress. If an empty my-hacks.php was included in the installation, many people would overwrite (by mistake) their existing my-hacks with the new, empty version, thus defeating the purpose of having a my-hacks file.
    Furthermore, not everyone uses hacks inside their WordPress installation and in my opinion, the hack file should not be set to true by default. You mention performance problems with my-hacks.php that I am not aware of. As for including a simple my-hacks with the install, the same problem arises as above.
    The documentation in the wiki is the best source (at this time) for information about this file and how to set it up.

    hum… ya, this is a point… btw, can we integrate a wp-hacks-sample.php, so if we want to use one, we rename this file ?!”. as the config file…

    my-hacks-sample.php might work, worth considering even with some sample (and simple) hacks.

    And maybe I’m just being thick about it, but how is having a my-hacks-sample.php any better than the current method (which is no file?). I’m not saying it’s a bad idea, just wondering what the advantage is.

    give some sample hacks in the my-hacks file.
    but i believe all of them requires custom tags in the index file.
    guys, u have to make a normal text file. dont tell me it’s tough…

    Exactly. People too dumb to figure out how to create a text file and save it as php will not be using this tool anyway.

    I agree also. If somone can find a hack, I think they can figure out how to create the file correctly or search for how to do it.

    To LaughingLizard,
    1) I totally agree that an upgrade should not touch my-hacks.php. Even then, the upgrade could still setup a valid my-hacks.php if there is none… e.g., Maybe in version 0.x there is no such concept and the concept is in 1.x !
    2) But Please explain why a new install will cause a problem by delivering a simple valid “my-hacks.php”
    3) Performance problems: I am stating that there should be no performance problems – if a empty and/or valid my-hacks.php is delivered !
    4) It is true that a text file can be created outside… I just thought that an empty/valid my-hacks.php will make the system a little-bit more usable !

    when u upgrade, u overwrite all the files on the server and run the upgrade.
    this is the reason we dont have a sample config file with the original name.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘REQ: deliver empty my-hacks.php’ is closed to new replies.