"; foreach ($bits as $label=>$html) if ($reqlabel == preg_replace ('/\s/', '', strtolower ($label))) return $comment . $html; //no caps return ''; //the label was not found so return nothing } //Manage the HTML bits. The bits are stored in a single option as a serialised array. function ManageBits() { $bits = unserialize (get_option ('bitsofhtml')); //get the bits of HTML if (!is_array ($bits)) $bits = array(); //convert into an array if ($_POST) { //if stuff was posted to the page $labels = $_POST['labels']; $htmls = $_POST['htmls']; //get the input if (is_array ($labels) && is_array ($htmls)) { //if there is input $updatedbits = array(); //for storing the updated bits of HTML for ($i=0; $i

Manage your Bits of HTML

Use the form below to manage your bits of HTML. Insert bits of HTML into a page by adding a shortcode to the page to look up the bit, such as [bitsofhtml label="First bit"]. Spacing and capitalisation don't matter when looking up. Remove the label or HTML to remove a bit, there is a blank entry at the bottom for new ones.
Jump to: $html) { ?> .

$html) { ?>

Label: