Should I prefix the functions in my class?

Hi Envato Community,

I’m working a plugin that I maybe want to sell on CodeCanyon, now I read on the forum that people getting soft rejected for not prefixing there functions.

In my case I write everything in classes (OOP) and of course my classes are being prefixed. Now it feels a bit double when I prefix my functions in my classes.

For example:
MyName::MyName_do_something();

Feels a bit weird, and I think it will not improve the readability of my code.

Do you guys have any experience with getting soft rejections because of this?

I understand if you just have a functions.php you need to prefix your functions

If you use OOP, well there is no need to make prefix, I use the same methodology and no problem at all.

image

2 Likes

Yes I use a loader to, so It seemed a bit weird to me that people get soft rejected because of not prefixing. But then I assume every coder uses OOP ( what should be the standard imo ).