xydac / WP-Ultimate-CMS

WordPress Ultimate CMS plugin
12 stars 5 forks source link

Coding standard #7

Open binhwpo opened 9 years ago

binhwpo commented 9 years ago

@xydac,

I've read the code. The first impression is that I'm amazed by your hard work on the project and that was a lot of things done. So thanks for putting your time and effort into hit.

Now, in order to get this working in group, we shall need to agree to some coding standard. Base on these, we will format the existing code and later on, other developers can easily contribute to the repo.

The core idea is to follow "WordPress coding standard".

Here are first few things we might need to fix from the existing code:

  1. Class name: Should be Camel_Case (I can use regex to fix this)
  2. Spacing between operators (=, =>, etc)
  3. Indentation spaces should be converted to tabs.
  4. The "xydac" prefix on functions: We should have a discussion on this because I believe it should be removed due to the fact that we are already using Xydac prefix for class name.

Well, luckily these are very quick fix. I could use search and replace and code format tool.

The main issue will be to get your authorisation to do so, because after doing this, all the lines will be anew according to git. But I think when a thing as broad as this need done, then the sooner the better.

Regards, Binh

xydac commented 9 years ago

@binhwpo

The class file name are as per WordPress naming conventions. Although the actual class name were supposed to be camel case but i chose not do so as i merged code from an earlier plugin of mine and didn't wanted things to break. I understand it to be small violation and probably we can live with it.

Further spacing and indentation can be corrected, i never looked much into it as i was more concerned with adding functionality to the plugin. we can get this done.

The xydac in function name can also be updated without any issue,as the class name has the prefix already for distinguishing.

:+1: Deepak

binhwpo commented 9 years ago

@xydac Glad you have the will to incorporate, as not many people have to heart to get their "beloved" work changed.

I use Regex to replace things for the whole directory, so when I change anything, it would be hardly broken. So don't worry. The only concern was whether you would accept such solutions.

I will get this part for myself. Thanks.