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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access