softreject prefix issue

Today I got a soft reject message I don’t understand much.

"Make sure to use a unique prefix (preferably the text domain or theme name) for all function names, custom images sizes, classes, CONSTANTS, hooks, public/global variables, etc: These variables are in the public/global space. Reference:

This is code in file page.php. My theme prefix is medicplus
Do I need to prefix all variables ( not global variables)? Either method 1, method 2 is correct?

Method 1.

// css to show/hide sidebar.
$all_container_css = medicplus_get_container_css();


Method 2

// css to show/hide sidebar.
$medicplus_all_container_css = medicplus_get_container_css();


I’m quite confused, I didn’t get this reason for previous themes…

I really appreciate if someone can help me. It takes me back and forth with only this issue.
Thank you in advance.

You don’t need to prefix all variables. Method 1 would be enough.

1 Like