function metaItems($field, $options = array()) { $defaultOptions = array('fields' => array(), 'data' => 'post_meta'); $options = array_merge($defaultOptions, $options); // Noncename needed to verify where the data originated wp_nonce_field(basename(__FILE__), $field . '_nonce'); wp_enqueue_script('osteo-meta-items-scripts', plugins_url('osteo-meta-fields/js/meta-items.js'), array(), '20120206', true); ?> <div class="<?php echo $field; ?> items osteo-meta-styles"> <?php allItems($field, $options); ?> <div class="add-item last"><i class="icon-plus-circle"></i></div> </div> <?php }
<label class="adminLabel" for="image">Image File:</label> <input type="text" id="image" name="image"><br /> <label class="adminLabel" for="discount">Discount:</label> <input type="text" id="discount" name="discount"><br /> <label class="adminLabel" for="mType">Music Type:</label> <input type="text" id="mType" name="mType"><br /> <label class="adminLabel" for="desc">Description:</label> <textarea name="desc" id="desc" cols="50" rows="7"></textarea><br /> <label class="adminLabel" for="pass">Password:</label> <input type="password" id="pass" name="pass"><br /> <div id="greenHover"><input type="submit" name="Submit" class="greenAdminButton" value="Add"></div> </form> </div> <p class="adminTitleBig">Discontinue Products</p> <?php allItems(); ?> <p class="adminTitleBig">Reviews</p> <div id="adminReviews"> <?php allReviews(); ?> </div> <form id="adminReturn" action="myAccount.php"> <button style="float:right;" class="blueButton">Return to Site</button> </form> </div> <div id="footer"> <p id="cpy">© 2013 Simon Barton</p> </div> </body>