Wordpress Help

wordpress
cms
themeforest

#1

I am trying to develop an approve html template to wordpres for themeforest. for that case i was planing to use LayerWP freamework that themeforest provide and recommended. but the problem is----

when i am downloading LayerWP framework theme i am getting all functions with prefix Layers and each of them connected with another function. also its too complected to change all names also not safe. There are almost 150 files. what way themeforest suggest ?

Underscore provide auto Prefix but LayerWp don’t provide that.

QUS-- is envato approve item with function name started with prefix “layerswp” like
( layers_after_list_title ) or do i need to change all functions of LayerWP framework files

Experienced author please advice. I am stuck on this simple problem now.
do i need to add prefix ? or leave it on its way…


#2

Hi there,

The answer is simple. You must prefix all functions, classes, variables from your theme. You can’t have functions names starting with “layers_”. All of them needs to be changed into “yourtheme_”.

You can replace all of them all over your files by doing a mass find and replace :).

Regards


#3

Thank you, very much for your comment…

I know you might say stupid after reading my message, but please don’t say…

I use sublime. when i put layer and search in in files i got lots of name but unfortunately those are not all. after replacing that i got lots of layers words in files. is there any easiest way to do it.


#4

You must go through files and see what patterns needs to be changed.

For example, as I did before, run a find and replace for layers_ and replace it with yourtheme_

Then replace all textdomains by searching for ‘layers’ and replace it with ‘yourtheme’.(also include the quotes is search)

Then, find and replace the prefix of scripts/styles when enqueue them. Find ‘layers-’ and replace it with ‘yourtheme-’.

After doing these three replaces, you can go through files and replace manually remaining strings.

Regards