/*
Plugin Name: Fake Plugin (Meta Boxes)
Plugin URI: http://baylorrae.com
Description: What a cool thing
Author: Baylor Rae'
Version: Beta
Author URI: http://baylorrae.com/
*/
include 'WP-Elements.class.php';
// ============
// = Form Box =
// ============
$poem = new metaBox(array('isFormBox' => true, 'id' => 'whatDoYaThink', 'title' => 'What Do Ya Think'));
$poem->addInput(array('id' => 'tellme', 'label' => 'Tell Me'));
$poem->addTextarea(array('id' => 'more', 'label' => 'Give Me More'));
$poem->addEditor(array('id' => 'evenmore', 'label' => "Don't Hold Back On Me"));
// A single checkbox
$poem->addCheckbox(array('id' => 'isSpecial', 'label' => 'Is Special?', 'title' => 'Status'));
// Multiple checkboxes
// checked always defaults to false
$poem->addCheckbox(array('id' => 'repairs', 'label' => 'Repairs Include', 'options' => array('Engine' => array('id' => 'engine', 'checked' => true), 'Tires' => array('id' => 'tires'), 'Brake Lights' => array('id' => 'brakelights', 'checked' => true))));
$poem->addRadiobuttons(array('id' => 'gender', 'label' => 'Gender', 'value' => 'male', 'options' => array('Male' => 'male', 'Female' => 'female')));
$poem->addDropdown(array('id' => 'type', 'label' => 'Type', 'options' => array('Car' => 'car', 'Truck' => 'truck', 'Motorcycle' => 'motorcycle')));
// ===============
// = Regular Box =
// ===============
$box2 = new metaBox(array('id' => 'box2', 'title' => 'This is my second box', 'context' => 'side'));
$box2->html('<p>Please click on my <a href="#">link</a></p>');
$box2->paragraph('Please tell me something');