polarblau / meta_wordpress

Use your favorite meta languages such as Haml, Sass and Coffeescript to bootstrap and build Wordpress themes.
MIT License
9 stars 1 forks source link

Add shortcut method for php("echo …") #18

Closed polarblau closed 11 years ago

polarblau commented 11 years ago

This might be neat:

- php("$foo = 'foobar'")
-# <?php $foo = 'foobar' ?>

= php("$foo")
-# <?php echo "$foo" ?>

but I don’t think this should be possible without modifying the Haml parser (and go a bit against Haml's general logic as well.

A possible work-around might be something like this:

- php("$foo = 'foobar'")
-# <?php $foo = 'foobar' ?>

= php_e("$foo")
-# <?php echo "$foo" ?>