Page 1 of 1

WordPress Plugin Support - Suggestion

PostPosted: September 27th, 2016, 12:23 pm
by dulfe
Hello,

It would be a great option to support WordPress Plugin Projects, for currently, if I want to create a plugin and I want to get intellisense for WordPress files, I have to create a project and add all the WordPress files to it and to source code.

A way to do it could be by adding the WordPress files as "External References", so it can be indexed but excluded from the main project (PhpStorm does this)... it will also allow a cleaner folder structure because it only has MY files instead of WordPress files.

Thank you for this great project!

Re: WordPress Plugin Support - Suggestion

PostPosted: October 12th, 2016, 3:18 pm
by alonso01
+1 to this suggestion.

Re: WordPress Plugin Support - Suggestion

PostPosted: October 20th, 2016, 3:14 pm
by Jakub Misek
Hi,

You can do it exactly as you said.

1. Create two projects - YourPlugin and WordPress
2. Add WordPress to references of YourPlugin
3. Optionally add YourPlugin as a reference to WordPress and specify Path in the reference properties.

Please let us know if it helps.

Thanks

Re: WordPress Plugin Support - Suggestion

PostPosted: December 30th, 2016, 2:17 pm
by jholliday
Can you please provide more details on this approach? I not getting how adding a reference to the WordPress project from the Plugin project is supposed to work. What exactly happens when you add a project reference to a PHP project?

Or do you mean using the "Add as Link" option from the "Add Existing Item" command in Visual Studio? In that case, you would need to first replicate the WordPress folder structure (creating them all), and then recursively add all of the files in the WordPress folder as externally linked files, correct? Wouldn't it be easier to just keep a copy of WordPress and then simply drag it into a new PHP project for each Plugin?

What am I missing?

Re: WordPress Plugin Support - Suggestion

PostPosted: January 9th, 2017, 8:17 am
by Jakub Misek
Hi,

We'll prepare detailed tutorial.

For now, project references are maintained in "Solution Explorer" tree, under your project name see node "References"