PHP short tags

The other horrible bad habit that you should avoid is using PHP short tags. We mentioned this specifically at the beginning of this book—it's a horrible idea because you can never be sure if a given server will support them, and there are good reasons why your server should not support them. Before your plugin can be considered ready for publication, you must remove any instances of short tags: always use <?php in favor of the short tag <?. The best way to check for these is to disable support for them in your php.ini file, reboot Apache, and see if any errors crop up.

Those two problems plagued about 80% of the plugins we evaluated for this book. That means only one in five is potentially usable. Those are great odds! If you are ...

Get WordPress 3 Plugin Development Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.