wp/wp-content/plugins/option-tree/assets/theme-mode/demo-meta-boxes.php
changeset 0 d970ebf37754
child 5 5e2f62d02dcd
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/wp/wp-content/plugins/option-tree/assets/theme-mode/demo-meta-boxes.php	Wed Nov 06 03:21:17 2013 +0000
@@ -0,0 +1,63 @@
+<?php
+/**
+ * Initialize the meta boxes. 
+ */
+add_action( 'admin_init', '_custom_meta_boxes' );
+
+/**
+ * Meta Boxes demo code.
+ *
+ * You can find all the available option types
+ * in demo-theme-options.php.
+ *
+ * @return    void
+ *
+ * @access    private
+ * @since     2.0
+ */
+function _custom_meta_boxes() {
+  
+  /**
+   * Create a custom meta boxes array that we pass to 
+   * the OptionTree Meta Box API Class.
+   */
+  $my_meta_box = array(
+    'id'          => 'my_meta_box',
+    'title'       => 'Demo Meta Box',
+    'desc'        => '',
+    'pages'       => array( 'post' ),
+    'context'     => 'normal',
+    'priority'    => 'high',
+    'fields'      => array(
+      array(
+        'label'       => 'Background',
+        'id'          => 'my_background',
+        'type'        => 'background',
+        'desc'        => 'BlahLorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
+        'std'         => '',
+        'rows'        => '',
+        'post_type'   => '',
+        'taxonomy'    => '',
+        'class'       => ''
+      ),
+      array(
+        'label'       => 'Category Checkbox',
+        'id'          => 'my_category_checkbox',
+        'type'        => 'category-checkbox',
+        'desc'        => 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
+        'std'         => '',
+        'rows'        => '',
+        'post_type'   => '',
+        'taxonomy'    => '',
+        'class'       => ''
+      )
+    )
+  );
+  
+  /**
+   * Register our meta boxes using the 
+   * ot_register_meta_box() function.
+   */
+  ot_register_meta_box( $my_meta_box );
+
+}
\ No newline at end of file