Permalink
Browse files

cleanup

  • Loading branch information...
farinspace committed Jun 29, 2011
1 parent 7de98d8 commit 790f7bebd1bdc77885183947eeee345af0bb5055
View
@@ -1,10 +1,5 @@
Thanks to all who have given their feedback and ideas, including:
Christian Hochfilzer
-power user, code testing, lots of good questions
-
-Adam van den Hoven
-provided several useful code ideas/contributions
-
-Suso Guez
-provided fix for field names with dashes, http://farinspace.com/wpalchemy-metabox/comment-page-1/#comment-3156
+Kathy Darling
+Luke Mcdonald
View
@@ -1,15 +1,8 @@
-[WordPress MetaBox PHP Class][wpalchemy]
+[WPAlchemy WordPress MetaBox PHP Class][wpalchemy]
=========================
Please read the [extended documentation][wpalchemy] for full details.
Some of these files are for demonstration purposes, be careful not to overwrite your existing `functions.php` file, you may want to create a backup.
-You should place these files in your current theme directory:
-
-* /current_theme_folder/functions.php
-* /current_theme_folder/WPAlchemy/MetaBox.php
-* /current_theme_folder/custom/meta.css
-* /current_theme_folder/custom/meta.php
-
-[wpalchemy]: http://farinspace.com/wpalchemy-metabox/ "WPAlchemy MetaBox PHP Class"
+[wpalchemy]: http://farinspace.com/wpalchemy-metabox/ "WPAlchemy MetaBox PHP Class"
View
@@ -1 +0,0 @@
-CONTENTS
View
@@ -1,54 +0,0 @@
-<?php
-
-// custom constant (opposite of TEMPLATEPATH)
-define('_TEMPLATEURL', WP_CONTENT_URL . '/' . stristr(TEMPLATEPATH, 'themes'));
-
-include_once 'WPAlchemy/MetaBox.php';
-
-// include css to style the custom meta boxes, this should be a global
-// stylesheet used by all similar meta boxes
-if (is_admin())
-{
- wp_enqueue_style('custom_meta_css', _TEMPLATEURL . '/custom/meta.css');
-}
-
-$custom_metabox = new WPAlchemy_MetaBox(array
-(
- 'id' => '_custom_meta', // underscore prefix hides fields from the custom fields area
- 'title' => 'My Custom Meta',
- 'template' => TEMPLATEPATH . '/custom/simple_meta.php',
-));
-
-// add a second custom meta box
-$custom_metabox2 = new WPAlchemy_MetaBox(array
-(
- 'id' => '_custom_meta2',
- 'title' => 'My Custom Meta (full)',
- 'types' => array('page','events'), // added only for pages and to custom post type "events"
- 'context' => 'normal', // same as above, defaults to "normal"
- 'priority' => 'high', // same as above, defaults to "high"
- 'template' => TEMPLATEPATH . '/custom/full_meta.php'
-));
-
-$custom_checkbox_mb = new WPAlchemy_MetaBox(array
-(
- 'id' => '_custom_checkbox_meta',
- 'title' => 'Checkbox Inputs',
- 'template' => TEMPLATEPATH . '/custom/checkbox_meta.php',
-));
-
-$custom_radio_mb = new WPAlchemy_MetaBox(array
-(
- 'id' => '_custom_radio_meta',
- 'title' => 'Radio Inputs',
- 'template' => TEMPLATEPATH . '/custom/radio_meta.php'
-));
-
-$custom_select_mb = new WPAlchemy_MetaBox(array
-(
- 'id' => '_custom_select_meta',
- 'title' => 'Select Inputs',
- 'template' => TEMPLATEPATH . '/custom/select_meta.php'
-));
-
-/* End of file */
@@ -0,0 +1,15 @@
+<?php
+
+include_once 'metaboxes/setup.php';
+
+include_once 'metaboxes/simple-spec.php';
+
+include_once 'metaboxes/full-spec.php';
+
+include_once 'metaboxes/checkbox-spec.php';
+
+include_once 'metaboxes/radio-spec.php';
+
+include_once 'metaboxes/select-spec.php';
+
+/* eof */
@@ -0,0 +1,10 @@
+<?php
+
+$custom_checkbox_mb = new WPAlchemy_MetaBox(array
+(
+ 'id' => '_custom_checkbox_meta',
+ 'title' => 'Checkbox Inputs',
+ 'template' => get_stylesheet_directory_uri() . '/metaboxes/checkbox-meta.php',
+));
+
+/* eof */
File renamed without changes.
@@ -0,0 +1,13 @@
+<?php
+
+$full_mb = new WPAlchemy_MetaBox(array
+(
+ 'id' => '_full_meta',
+ 'title' => 'Full Inputs',
+ 'types' => array('page', 'events'), // added only for pages and to custom post type "events"
+ 'context' => 'normal', // same as above, defaults to "normal"
+ 'priority' => 'high', // same as above, defaults to "high"
+ 'template' => TEMPLATEPATH . '/custom/full_meta.php'
+));
+
+/* eof */
File renamed without changes.
@@ -0,0 +1,10 @@
+<?php
+
+$custom_radio_mb = new WPAlchemy_MetaBox(array
+(
+ 'id' => '_custom_radio_meta',
+ 'title' => 'Radio Inputs',
+ 'template' => get_stylesheet_directory_uri() . '/metaboxes/radio-meta.php',
+));
+
+/* eof */
@@ -0,0 +1,10 @@
+<?php
+
+$custom_select_mb = new WPAlchemy_MetaBox(array
+(
+ 'id' => '_custom_select_meta',
+ 'title' => 'Select Inputs',
+ 'template' => get_stylesheet_directory_uri() . '/metaboxes/select-meta.php',
+));
+
+/* eof */
@@ -0,0 +1,8 @@
+<?php
+
+include_once WP_CONTENT_DIR . '/wpalchemy/MetaBox.php';
+
+// global styles for the meta boxes
+if (is_admin()) wp_enqueue_style('wpalchemy-metabox', get_stylesheet_directory_uri() . '/metaboxes/meta.css');
+
+/* eof */
@@ -0,0 +1,10 @@
+<?php
+
+$custom_metabox = $simple_mb = new WPAlchemy_MetaBox(array
+(
+ 'id' => '_custom_meta',
+ 'title' => 'My Custom Meta',
+ 'template' => get_stylesheet_directory_uri() . '/metaboxes/simple-meta.php',
+));
+
+/* eof */
File renamed without changes.

0 comments on commit 790f7be

Please sign in to comment.