WordPress.org

Ready to get started?Download WordPress

Forums

PHP Snippets
simple, and it works for javascript too! (1 post)

5 stars
  1. jessibird
    Member
    Posted 1 year ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.