Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Jared Atchison committed Mar 25, 2011
0 parents commit cfd80fc
Show file tree
Hide file tree
Showing 49 changed files with 1,688 additions and 0 deletions.
30 changes: 30 additions & 0 deletions README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
=== Custom Metaboxes and Fields ===
Contributors: Andrew Norcross (@norcross / andrewnorcross.com)
Jared Atchison (@jaredatch / jaredatchison.com)
Bill Erickson (@billerickson / billerickson.net)
Version: 0.4
Requires at least: 3.0
Tested up to: 3.1

== Description ==

This will create metaboxes with custom fields that will blow your mind.

== Installation ==

This script is easy to install. If you can't figure it out you probably shouldn't be using it.

1. Place `metabox` directory inside a 'lib' directory of your (activated) theme. E.g. inside /themes/twentyten/lib/.
2. Edit theme's function.php to include /lib/metabox/init.php.
3. See example-functions.php for further guidance.

== Frequently Asked Questions ==

None yet.

== Changelog ==

= 0.4 =
* Think we have a release that is mostly working. We'll say the initial release :)


127 changes: 127 additions & 0 deletions example-functions.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
<?php

// Include & setup custom metabox and fields
$prefix = 'cmb_';
$meta_boxes = array();

$meta_boxes[] = array(
'id' => 'test_metabox',
'title' => 'Test Metabox',
'pages' => array('page'), // post type
'context' => 'normal',
'priority' => 'high',
'show_names' => true, // Show field names on the left
'fields' => array(
array(
'name' => 'Test Text',
'desc' => 'field description (optional)',
'id' => $prefix . 'test_text',
'type' => 'text'
),
array(
'name' => 'Test Text Small',
'desc' => 'field description (optional)',
'id' => $prefix . 'test_textsmall',
'type' => 'text_small'
),
array(
'name' => 'Test Text Medium',
'desc' => 'field description (optional)',
'id' => $prefix . 'test_textmedium',
'type' => 'text_medium'
),
array(
'name' => 'Test Date Picker',
'desc' => 'field description (optional)',
'id' => $prefix . 'test_textdate',
'type' => 'text_date'
),
array(
'name' => 'Test Money',
'desc' => 'field description (optional)',
'id' => $prefix . 'test_textmoney',
'type' => 'text_money'
),
array(
'name' => 'Test Text Area',
'desc' => 'field description (optional)',
'id' => $prefix . 'test_textarea',
'type' => 'textarea'
),
array(
'name' => 'Test Text Area Small',
'desc' => 'field description (optional)',
'id' => $prefix . 'test_textareasmall',
'type' => 'textarea_small'
),
array(
'name' => 'Test Title Weeeee',
'desc' => 'This is a title description',
'type' => 'title'
),
array(
'name' => 'Test Select',
'desc' => 'field description (optional)',
'id' => $prefix . 'test_select',
'type' => 'select',
'options' => array(
array('name' => 'Option One', 'value' => 'standard'),
array('name' => 'Option Two', 'value' => 'custom'),
array('name' => 'Option Three', 'value' => 'none')
)
),
array(
'name' => 'Test Radio inline',
'desc' => 'field description (optional)',
'id' => $prefix . 'test_radio',
'type' => 'radio_inline',
'options' => array(
array('name' => 'Option One', 'value' => 'standard'),
array('name' => 'Option Two', 'value' => 'custom'),
array('name' => 'Option Three', 'value' => 'none')
)
),
array(
'name' => 'Test Radio',
'desc' => 'field description (optional)',
'id' => $prefix . 'test_radio',
'type' => 'radio',
'options' => array(
array('name' => 'Option One', 'value' => 'standard'),
array('name' => 'Option Two', 'value' => 'custom'),
array('name' => 'Option Three', 'value' => 'none')
)
),
array(
'name' => 'Test Checkbox',
'desc' => 'field description (optional)',
'id' => $prefix . 'test_checkbox',
'type' => 'checkbox'
),
array(
'name' => 'Test Multi Checkbox',
'desc' => 'field description (optional)',
'id' => $prefix . 'test_multicheckbox',
'type' => 'multicheck',
'options' => array(
'check1' => 'Check One',
'check2' => 'Check Two',
'check3' => 'Check Three',
)
),
array(
'name' => 'Test wysiwyg',
'desc' => 'field description (optional)',
'id' => $prefix . 'test_wysiwyg',
'type' => 'wysiwyg'
),
array(
'name' => 'Test Image',
'desc' => 'Upload an image or enter an URL.',
'id' => $prefix . 'test_image',
'type' => 'file'
),
)
);

require_once('metabox/init.php');
89 changes: 89 additions & 0 deletions images/.svn/all-wcprops
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
K 25
svn:wc:ra_dav:version-url
V 71
/jaredatch/WordPressCRM/svn/!svn/ver/3/twentyten-crm/lib/metabox/images
END
ui-icons_2e83ff_256x240.png
K 25
svn:wc:ra_dav:version-url
V 99
/jaredatch/WordPressCRM/svn/!svn/ver/3/twentyten-crm/lib/metabox/images/ui-icons_2e83ff_256x240.png
END
ui-bg_glass_95_fef1ec_1x400.png
K 25
svn:wc:ra_dav:version-url
V 103
/jaredatch/WordPressCRM/svn/!svn/ver/3/twentyten-crm/lib/metabox/images/ui-bg_glass_95_fef1ec_1x400.png
END
ui-icons_888888_256x240.png
K 25
svn:wc:ra_dav:version-url
V 99
/jaredatch/WordPressCRM/svn/!svn/ver/3/twentyten-crm/lib/metabox/images/ui-icons_888888_256x240.png
END
ui-bg_glass_55_fbf9ee_1x400.png
K 25
svn:wc:ra_dav:version-url
V 103
/jaredatch/WordPressCRM/svn/!svn/ver/3/twentyten-crm/lib/metabox/images/ui-bg_glass_55_fbf9ee_1x400.png
END
ui-bg_glass_75_dadada_1x400.png
K 25
svn:wc:ra_dav:version-url
V 103
/jaredatch/WordPressCRM/svn/!svn/ver/3/twentyten-crm/lib/metabox/images/ui-bg_glass_75_dadada_1x400.png
END
ui-bg_flat_75_ffffff_40x100.png
K 25
svn:wc:ra_dav:version-url
V 103
/jaredatch/WordPressCRM/svn/!svn/ver/3/twentyten-crm/lib/metabox/images/ui-bg_flat_75_ffffff_40x100.png
END
ui-bg_glass_75_e6e6e6_1x400.png
K 25
svn:wc:ra_dav:version-url
V 103
/jaredatch/WordPressCRM/svn/!svn/ver/3/twentyten-crm/lib/metabox/images/ui-bg_glass_75_e6e6e6_1x400.png
END
ui-bg_glass_65_ffffff_1x400.png
K 25
svn:wc:ra_dav:version-url
V 103
/jaredatch/WordPressCRM/svn/!svn/ver/3/twentyten-crm/lib/metabox/images/ui-bg_glass_65_ffffff_1x400.png
END
ui-bg_highlight-soft_75_cccccc_1x100.png
K 25
svn:wc:ra_dav:version-url
V 112
/jaredatch/WordPressCRM/svn/!svn/ver/3/twentyten-crm/lib/metabox/images/ui-bg_highlight-soft_75_cccccc_1x100.png
END
ui-icons_cd0a0a_256x240.png
K 25
svn:wc:ra_dav:version-url
V 99
/jaredatch/WordPressCRM/svn/!svn/ver/3/twentyten-crm/lib/metabox/images/ui-icons_cd0a0a_256x240.png
END
ui-bg_flat_0_aaaaaa_40x100.png
K 25
svn:wc:ra_dav:version-url
V 102
/jaredatch/WordPressCRM/svn/!svn/ver/3/twentyten-crm/lib/metabox/images/ui-bg_flat_0_aaaaaa_40x100.png
END
ico-delete.png
K 25
svn:wc:ra_dav:version-url
V 86
/jaredatch/WordPressCRM/svn/!svn/ver/3/twentyten-crm/lib/metabox/images/ico-delete.png
END
ui-icons_454545_256x240.png
K 25
svn:wc:ra_dav:version-url
V 99
/jaredatch/WordPressCRM/svn/!svn/ver/3/twentyten-crm/lib/metabox/images/ui-icons_454545_256x240.png
END
ui-icons_222222_256x240.png
K 25
svn:wc:ra_dav:version-url
V 99
/jaredatch/WordPressCRM/svn/!svn/ver/3/twentyten-crm/lib/metabox/images/ui-icons_222222_256x240.png
END
Loading

0 comments on commit cfd80fc

Please sign in to comment.