Subscribe to KS RSS RSS Reader Reader RSS Reader Live

Eclipse WordPress Code Hinting


Have you installed WordPress and the Embedded Development Environment Eclipse but found that code completion (code hinting) for WordPress doesn’t work? Me too.

Solution to WordPress Code Completion Not Working

To get code completion to work in WordPress you need to add the library to your build path. If you don’t, code hinting for functions such as add_action simply will not work. Luckily it’s easy to modify the build path to add the WordPress wp-includes directory.

Adding WordPress to Eclipse Build Path.

To add the WordPress wp-includes directory to your build path, with your Eclipse PHP project highlighted in navigator choose:

  • Menu: Project > Properties
  • Select, PHP Include Path in the left had pane and the Libraries tab.
  • On the Libraries tab, click Add External Source Folder.
  • Browse to the installed wp-includes directory of WordPress and click OK.

Now you can type add_ into the PHP editor, invoke code completion, and see a list that includes add_action and add_filter, etc.

 

Related Posts

Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Copyright © Philip King 2009 King Solutions (UK)
ClickBank - Justhost - Wishlist Member

About - Contact Us
Privacy Policy - House Rules - Site Terms

Suffusion theme by Sayontan Sinha