picandocodigo / List-Category-Posts

WordPress plugin which allows you to list posts from a category into a post/page using the [catlist] shortcode.
http://wordpress.org/extend/plugins/list-category-posts/
GNU General Public License v2.0
241 stars 112 forks source link

WordPress Coding Standards #62

Open picandocodigo opened 10 years ago

picandocodigo commented 10 years ago

Fix the code for the WordPress Coding Standards: http://codex.wordpress.org/WordPress_Coding_Standards

klemens-st commented 5 years ago

I have this set up in the GUI repo, with automatic PHP Code Sniffer checks in Travis and Vagrant, using WPCS rules.

Most of the code can be automatically fixed with the phpcbf tool. If you are still interested I can implement it here as well. WPCS has indentation with tabs but it can be customized to 2 spaces as we use here.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

klemens-st commented 4 years ago

I have a branch with some stuff that deals with it.

picandocodigo commented 4 years ago

@zymeth25 I've been trying to get rid of the if: endif; and foreach: endforeach; blocks, don't know why I used to think that's a good idea, you can't make PHP look like Ruby :laughing:. And also changing things I thought were ok at the time but I don't like now. I don't think we need to adhere 100% to the WordPress standards, some things I don't agree with, but we should at least have an internal standard that we adhere to for concistency. What do you think?

klemens-st commented 4 years ago

Yes I think that an internal standard is a good idea. We can just edit WPCS and adjust the rules we don't like. And then it can be automated with PHP Code Sniffer.