Using Flip to Clean Up PHP Files

Here’s another handy tool for editing .php files for WordPress themes. I suppose this could be used for any .php files, but editing WordPress themes is where I generally encounter this problem. The problem being .php files created by other people using some sort of Windows editor (ie. Notepad). These files can be extremely ugly to look at and a headache to edit.

Thankfully, there is a nice and easy way to fix this. While in the directory for whatever theme you are working on type the following command:
flip -u *.php
You may also want to do this for the style sheet. The code for this would be as follows:
flip -u style.css
It is best to specify which files you want to fix, rather than do a wild card flip (such as flip -u *). Doing a wild card flip could alter the code in files that don’t require changing which could then screw up the code in those files causing you to have a very bad day.

Leave a Reply

Your email address will not be published. Required fields are marked *