Is this syntax correct?

PhpStorm marks this as incorrect... is there an obvious error I am missing here? Why is it flagging it at the end of the PHP tag?

Thanks in advance...



Attachment(s):
what_is_incorrect_here.jpg
0
Avatar
Permanently deleted user

Most likely you do not have the wordpress code base included in the project, only the theme / plugin you are developing. So phpstorm cannot locate those functions.

Download wordpress and unpack it in a directory somewhere. Then go to Settings > Directories and click "Add Content Root". Select your unpacked wordpress files and away you go.

0
Avatar
Permanently deleted user

Could the same could be accomplished by New Project via Remote Files, and specifying public_html as root? Tedious, I know, but I am curious if PhpStorm sees this as the same?

I will do as you suggest and post back.

Thanks!

0
Avatar
Permanently deleted user

Doing this will most likely download your entire public_html folder into a new folder on your local computer.

So it would work, as this would include all the wordpress code and all the theme code that you wish to change.

I prefer having a separate wordpress folder shared between all phpstorm wordpress projects, and a separate folder for each theme. Otherwise you'll end up with mutliple uneccessary copies of wordpress all about your computer if you start working on multiple wordpress websites.

0
Avatar
Permanently deleted user

ok, that makes more sense... just learning it. about to get it mapped... crossing fingers - tx!

0

请先登录再写评论。