WordPress.org

Ready to get started?Download WordPress

Forums

REQ: deliver empty my-hacks.php (11 posts)

  1. kishore
    Member
    Posted 10 years ago #

    I understand http://wiki.wordpress.org/index.php/my-hacks.php
    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 http://www.kishore.org/wp/wp-admin/templates.php, 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...

  2. Jean-Pierre Michaud
    Member
    Posted 10 years ago #

    goos suggestion, at least for the file itself with the default php tags... will cut some reclaims.

  3. Laughinglizard
    Member
    Posted 10 years ago #

    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.

  4. Jean-Pierre Michaud
    Member
    Posted 10 years ago #

    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...

  5. Laughinglizard
    Member
    Posted 10 years ago #

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

  6. TechGnome
    Moderator
    Posted 10 years ago #

    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.
    TG

  7. OperaManiac
    Member
    Posted 10 years ago #

    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...

  8. WillM
    Member
    Posted 10 years ago #

    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.

  9. Nick Momrik
    Member
    Posted 10 years ago #

    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.

  10. kishore
    Member
    Posted 10 years ago #

    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 !

  11. OperaManiac
    Member
    Posted 10 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.