WordPress code templates for Aptana

What’s you IDE of choice when it comes to web development? I use Aptana Studio which absolutely rocks when it comes to web development. By default, Aptana doesn’t have a PHP editor but you can install it after you install the default Aptana installation from the AptanaMy Aptana menu option. A page will open with some plugins you can add to Aptana and this is where you will find PHP support.

Aptana IDE

So, what about WordPress? does Aptana supports WordPress? well, Aptana has HTML, CSS, PHP autocompletion and it also support libraries like jQuery. To enable jQuery autocompletion open the References panel and under the Global References section check (if it’s not checked already) the jQuery 1.2 or 1.3 support; you will instantly get jQuery autocompletion. However, WordPress autocompletion is not yet supported so I’ve been writing a bunch of what Aptana calls Code Templates to assist me while coding a WordPress theme or plugin. It’s no rocket science, all you have to do is (having Aptana PHP installed of course, since WP is written on PHP) go to WindowPreferences. Then, on the tree, go to Aptana-Editors-PHP-Code Templates

Aptana Preferences

Like I said, I’ve started writing some templates, so you can download these WordPress code templates for Aptana 1.2 and import them to the Code Templates. The Code Templates are variable based so, for example, you can write (see the image above) the hook name to add an action to, and it will append the hook name to whatever function name you add (it’s the way I write action and filter functions). I’ve included the WordPress loop by Justin Tadlock, explained in great detail on its website, as an example of a large code template, and you can trigger it typing the_loop on the Aptana PHP editor. Other code templates like the ones triggered by _openfile  and _savefile (for opening and saving a file in a WordPress option page) make heavy use of variables.

I wonder why there’s still no IDE that supports WordPress syntax, given that it has become so widely spread on the last two years. We can only expect that 2009 will be the year where an IDE add WordPress syntax. Maybe Aptana is the one, it has been growing amazingly in the last year and I hope it will continue doing it.

I wonder, do you know of any IDE supporting WordPress? which is your IDE of choice? I will be adding more WordPress Code Templates for Aptana so stay tuned!

69 thoughts on “WordPress code templates for Aptana”

  1. Thanks Elio, I do not got to uninstall my current version of Aptana, the most installed version 1.5 and am using the php plugin Aptana, which really is much more powerful, and works much better, already imported the codes and is working very well with wordpress! Thanks for the tip! hugs

  2. Hello again, lol, I wonder if you plan to put this project code template tags like the_title (), the_content, is_category, finally, tags used to control the content received from the posts, archives etc. .. !?

    1. Indeed. It has always been my idea. There’s always something more interesting though :S As soon as I add something I will upload it here.

  3. Да, тут до меня побывало прличное количество читателей. ) блог отличный саветую читать))

  4. I´m using Aptana studio 3, i have installed the wordpress ruble. When i create a new php file i can see any wordpress auto-completion. I have tried commands->WordPress->choosen command and i get an error: “Command ‘my choosen command’ is not defined.

Leave a Reply