Commits

Doug Stewart  committed 719f316

Documentation fixes, mainly.

  • Participants
  • Parent commits 016ee99

Comments (0)

Files changed (5)

File include/metaboxes/init.php

 <?php
-/**
- *	Script Name: 	Custom Metaboxes and Fields
- *	Contributors: 	Andrew Norcross (@norcross / andrewnorcross.com)
- *					Jared Atchison (@jaredatch / jaredatchison.com)
- *					Bill Erickson (@billerickson / billerickson.net)
- *	Description: 	This will create metaboxes with custom fields that will blow your mind.
- *	Version: 		0.9
- *	@package		Custom-Meta-Boxes
+/*
+Script Name: 	Custom Metaboxes and Fields
+Contributors: 	Andrew Norcross (@norcross / andrewnorcross.com)
+				Jared Atchison (@jaredatch / jaredatchison.com)
+				Bill Erickson (@billerickson / billerickson.net)
+Description: 	This will create metaboxes with custom fields that will blow your mind.
+Version: 		0.9
 */
 
 /**
  * Validate value of meta fields
  * Define ALL validation methods inside this class and use the names of these 
  * methods in the definition of meta boxes (key 'validate_func' of each field)
- * 
- * @package	Custom-Meta-Boxes
  */
 class cmb_Meta_Box_Validate {
 	function check_text( $text ) {
  * Defines the url to which is used to load local resources.
  * This may need to be filtered for local Window installations.
  * If resources do not load, please check the wiki for details.
- *
- * @package	Custom-Meta-Boxes
  */
 define( 'CMB_META_BOX_URL', apply_filters( 'cmb_meta_box_url', trailingslashit( str_replace( WP_CONTENT_DIR, WP_CONTENT_URL, dirname( __FILE__ ) ) ) ) );
 
 /**
  * Create meta boxes
- *
- * @package	Custom-Meta-Boxes
  */
 class cmb_Meta_Box {
 	protected $_meta_box;
 				case 'colorpicker':
 					$meta = '' !== $meta ? $meta : $field['std'];
 					$hex_color = '(([a-fA-F0-9]){3}){1,2}$';
-
 					if ( preg_match( '/^' . $hex_color . '/i', $meta ) ) // Value is just 123abc, so prepend #.
 						$meta = '#' . $meta;
 					elseif ( ! preg_match( '/^#' . $hex_color . '/i', $meta ) ) // Value doesn't match #123abc, so sanitize to just #.
 					echo '<textarea name="', $field['id'], '" id="', $field['id'], '" cols="60" rows="10" class="cmb_textarea_code">', '' !== $meta ? $meta : $field['std'], '</textarea>','<p class="cmb_metabox_description">', $field['desc'], '</p>';
 					break;					
 				case 'select':
+					if( empty( $meta ) && !empty( $field['std'] ) ) $meta = $field['std'];
 					echo '<select name="', $field['id'], '" id="', $field['id'], '">';
 					foreach ($field['options'] as $option) {
 						echo '<option value="', $option['value'], '"', $meta == $option['value'] ? ' selected="selected"' : '', '>', $option['name'], '</option>';

File lb-colorbox.php

  * Plugin Name: LB ColorBox
  * Plugin URI: http://literalbarrage.org/blog/code/colorbox
  * Description: Store custom color swatches as custom posts for fun and profit (and use in themes!).
- * Version: 0.5
+ * Version: 0.5.1
  * Author: Doug Stewart
  * Author URI: http://literalbarrage.org/blog/
  *
 Donate link: htttp://literalbarrage.org/blog/code/lb-colorbox
 Tags: colors, swatches, Kuler
 Requires at least: 3.3
-Tested up to: 3.3.1
-Stable tag: 0.5
+Tested up to: 3.3.2
+Stable tag: 0.5.1
  
 Collect and share color swatches, then use them in themes. Easy peasy.
 
 
 Collect color schemes. Use 'em, display 'em, go nuts.
 
-LB Colorbox is a new way to collect color schemes and tuck them away inside of WordPress for safe keeping. If you've ever admired the palettes available at [ColourLovers](http://www.colourlovers.com/), [StudioPress](http://www.studiopress.com/palettes), [Colllor](http://colllor.com) or elsewhere, you can now recreate that functionality from the safety of your own WordPress home.
+LB Colorbox is a new way to collect color schemes and tuck them away inside of WordPress for safe keeping. If you've ever admired the palettes available at [ColourLovers](http://www.colourlovers.com/), [StudioPress](http://www.studiopress.com/palettes), [Colllor](http://colllor.com) or elsewhere, you can now recreate that functionality from the safety of your own WordPress home. It stores your swatches as Custom Post Types inside of WordPress.
 
 You can also directly import color schemes from Adobe's [Kuler service](http://kuler.adobe.com/). You'll need to apply for a [Kuler API key](http://kuler.adobe.com/api/) in order to use this feature, but once you've done so, a wealth of options are available to you.
 == Installation ==
 1. Configure LB Colorbox options under 'Settings'->'ColorBox'
 1. Start adding ColorBoxes under the 'ColorBoxes' menu item.
 
+= Enabling Kuler functionality = 
+
+1. Go to [http://kuler.adobe.com/api](http://kuler.adobe.com/api) and sign up for an Adobe account/Kuler API key
+1. Navigate to Settings->ColorBox
+1. Enter your Kuler API key
+1. (Optional) Set the number of Kulers you wish to retrieve (defaults to 20 at a time)
+1. Click Save
+1. Kulers will now be listed under the top-level ColorBoxes menu item
+
 == Frequently Asked Questions ==
 
 = Where are the settings? =
 
-Under Settings->ColorBox
+Under `Settings->ColorBox`.
+
+= Where are ColorBoxes managed/created? = 
+
+All ColorBoxes can be managed under a new top-level menu item labeled `ColorBoxes`.
+
+= Where are the ColorBoxes displayed (i.e., what's their permalink base)? =
+
+ColorBoxes are viewable at `[YOUR WORDPRESS URL]/colorbox/` by default.
+
+= Where can I view individual ColorBoxes? =
+
+You can view each ColorBox at `[YOUR WORDPRESS URL]/colorbox/[COLORBOX SLUG]/`.
+
+= Can I change the permalink base? =
+
+Not currently.
 
 == Screenshots ==
 
 1. Create your own swatches and save them as Custom Post Types
 2. Supports direct imports from Adobe's Kuler tool
+3. Custom Post Type
+4. Saving a Kuler
 
 == Changelog ==
 
+= 0.5.1 =
+* README updates
+
 = 0.5 =
 * Initial plugin release.
 
 == Upgrade Notice ==
+= 0.5.1 =
+README updates
 
 = 0.5 =
 Intial plugin release.

File screenshot-3.png

Added
New image

File screenshot-4.png

Added
New image