PHP/WP coding standards for codecanyon items. Which one?

Write your code how you want, as long as it’s secure. Spaces, tabs, single quotes, double quotes, who cares? :stuck_out_tongue:

Use PSR-4 for small PHP scripts and libraries to avoid an easy rejection. Bigger applications don’t need to do this but it’s still probably a good idea.

For WordPress make sure you’re using their provided functions to escape all user input, handle db transactions, add scripts and stylesheets, etc. Don’t make your own function if WP already has one that does the same thing.

2 Likes