WordPress Plugin Support - Suggestion

PHP Tools [?] extends Visual Studio with set of advanced features to work more efficiently with PHP code.

WordPress Plugin Support - Suggestion

Postby dulfe » September 27th, 2016, 12:23 pm

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!
dulfe
 
Posts: 9
Joined: July 2nd, 2013, 6:38 pm

Re: WordPress Plugin Support - Suggestion

Postby alonso01 » October 12th, 2016, 3:18 pm

+1 to this suggestion.
alonso01
 
Posts: 2
Joined: April 11th, 2016, 4:55 am

Re: WordPress Plugin Support - Suggestion

Postby Jakub Misek » October 20th, 2016, 3:14 pm

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
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2092
Joined: January 4th, 2012, 2:42 pm
Location: Prague

Re: WordPress Plugin Support - Suggestion

Postby jholliday » December 30th, 2016, 2:17 pm

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?
jholliday
 
Posts: 1
Joined: December 29th, 2016, 8:50 pm

Re: WordPress Plugin Support - Suggestion

Postby Jakub Misek » January 9th, 2017, 8:17 am

Hi,

We'll prepare detailed tutorial.

For now, project references are maintained in "Solution Explorer" tree, under your project name see node "References"
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2092
Joined: January 4th, 2012, 2:42 pm
Location: Prague


Return to PHP Tools

Who is online

Users browsing this forum: No registered users and 49 guests

cron

User Control Panel

Login

Who is online

In total there are 49 users online :: 0 registered, 0 hidden and 49 guests (based on users active over the past 5 minutes)
Most users ever online was 256 on March 28th, 2024, 9:42 am

Users browsing this forum: No registered users and 49 guests