Support » Plugin: PHP Snippets » simple, and it works for javascript too!

  • This plugin includes and executes the code you put in your snippets. I tried putting javascript in a snippet instead of php, and that worked fine, too! You still name the snippet file yoursnippetname.snippet.php; just don’t use any php tags, instead, put your js in there with script tags and all.

    Love how I, as the webmaster, have full control over the snippets (which are stored outside the website directory), while making it possible for my less web-savvy coworkers put the snippet they want where they want it on a page. See, this plugin provides a button in the visual editor to show you the list of snippet shortcodes, then choose and insert one.

    In other words, this lets me protect my code from the bumbling of my coworkers, while giving them maximum flexibility in using that code wherever they want. I think this is going to be a mainstay on the site I’m building.

  • The topic ‘simple, and it works for javascript too!’ is closed to new replies.