PHPStroms + Wordpress - undefined functions
Answered
Hey there,
Im want to develop a wordpress plugin, so I created a WP plugin project.
I have Wordpress running on XAMPP, I set the include path for the relevant WP installation.
I have autocomplete and I can enter functions using ctrl+Right click normally.
However, everytime I try to run the plugin specifically, I get for example: Call to undefined function add_filter()
ANy suggestions?
Please sign in to leave a comment.
Do you get this when you actually run the code?
If so, have you placed the plugin into the web root?
Hey Eugene,
Yes the plugin is the web root.
If Wordpress is included in the correct place, so it now to call the necessary PHP files to run these WP hooks?
Thanks
Now, I paid more attention to what you said initially, and do not quite get what you mean by "run the plugins specifically". Could you please explain it?
As far as I understand, you need to run WordPress itself, and include the plugin code there: http://wordpress.stackexchange.com/questions/7398/how-to-include-php-files-in-plugins-the-correct-way
Hey Eugene,
I figured out my mistake, Im used to working with Python so I kept the same state of mind...
Working anyhow :) Thanks!
@Guyeshet. It would have been more kind of you if you had written how you figured out your mistake.
woogon :)