2017 © Pedro Peláez
 

library shortcodes

image

badcow/shortcodes

  • Sunday, April 5, 2015
  • by samuelwilliams
  • Repository
  • 2 Watchers
  • 8 Stars
  • 14,539 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 1 Versions
  • 5 % Grown

The README.md

Badcow Shortcodes

This is a port of WordPress' brilliant shortcode feature for use outside of WordPress. The code has remained largely unchanged., (*1)

The purpose of this project is to use the familiar WordPress shortcode syntax in any system., (*2)

Basic Usage

$shortcodes = new Badcow\Shortcodes\Shortcodes;
$shortcodes->addShortcode('hello', function ($attributes, $content, $tagName) {
    return $attributes['greeting'] . ', ' . $content;
});

echo $shortcodes->process('My shortcode does this: [hello greeting="Konnichiwa"]world![/hello]');

Installation

Use Composer. That's what all the cool kids use., (*3)

"require" : { "badcow/shortcodes": "dev-master" }

Running Tests

phpunit /path/to/shortcodes

Build Status

Build Status, (*4)

The Versions

05/04 2015

dev-master

9999999-dev

  Sources   Download

The Requires

  • php >=5.3.9

 

by Sam Williams