Skip to content

Commit

Permalink
Update readme and bump version to 2.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
jtsternberg committed Apr 30, 2015
1 parent d0c5c68 commit 1de5ec8
Show file tree
Hide file tree
Showing 5 changed files with 274 additions and 191 deletions.
20 changes: 15 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file.

## [Unreleased][unreleased]

*

## 2.0.6 - 2015-04-30

### Enhancements

* New metabox/form parameter, `show_on_cb`, allows you to conditionally display a cmb metabox/form via a callback. The `$cmb` object gets passed as a parameter to the callback. This complements the `'show_on_cb'` parameter that already exists for individual fields. Using this callback is similar to using the `'cmb2_show_on'` filter, but only applies to that specific metabox and it is recommended to use this callback instead as it minimizes th risk that your filter will affect other metaboxes.
Expand All @@ -11,17 +15,23 @@ All notable changes to this project will be documented in this file.
* Portuguese (Brazil) translation provided by [@lucascdsilva](https://github.com/lucascdsilva) - [#293](https://github.com/WebDevStudios/CMB2/pull/293).
* Spanish (Spain) translation updated by [@yivi](https://github.com/yivi) - [#272](https://github.com/WebDevStudios/CMB2/pull/272).
* Added group field callback parameters, `'before_group'`, `'before_group_row'`, `'after_group_row'`, `'after_group'` to complement the `'before_row'`, `'before'`, `'after'`, `'after_row'` field parameters.
* Better styling for `title` fields and `title` descriptions on options pages.
* Add a `sanitization_cb` field parameter check for the `group` field type.
* Better function/file doc-blocks to provide better documentation for automated documentation tools. See: [cmb2.io/api](http://cmb2.io/api/).
* `cmb2_print_metabox_form`, `cmb2_metabox_form`, and `cmb2_get_metabox_form` helper functions now accept two new parameters:
* an `'object_type'` parameter to explictly set that in the `$cmb` object.
* an `'enqueue_js'` parameter to explicitly disable the CMB JS enqueue. This is handy if you're not planning on using any of the fields which require JS (like color/date pickers, wysiwyg, file, etc).

### Bug Fixes

* Fix issue with oembed fields in repeatable groups where changing video changed it for all fields in a group.
* Fix empty arrays (like in the group field) saving as a value.
* Move `'cmb2_override_meta_value'` and `"cmb2_override_{$field_id}_meta_value"` filters to the `CMB2_Field::get_data()` method so that the filters are applied every time the data is requested. **THIS IS A BREAKING CHANGE:** The parameters for those filters have changed a bit. Previously, the filters accepted 5 arguments, `$value`, `$object_id`, `$field_args`, `$object_type`, `$field`. They have changed to accept 4 arguments instead, `$value`, `$object_id`, `$args`, `$field`, where `$args` is an array that contains the following:
* @type string $type The current object type
* @type int $id The current object ID
* @type string $field_id The ID of the field being requested
* @type bool $repeat Whether current field is repeatable
* @type bool $single Whether current field is a single database row
* @type string $type The current object type
* @type int $id The current object ID
* @type string $field_id The ID of the field being requested
* @type bool $repeat Whether current field is repeatable
* @type bool $single Whether current field is a single database row


## 2.0.5 - 2015-03-17
Expand Down
18 changes: 9 additions & 9 deletions init.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* Bill Erickson (@billerickson / billerickson.net)
* Andrew Norcross (@norcross / andrewnorcross.com)
*
* Version: 2.0.5
* Version: 2.0.6
*
* Text Domain: cmb2
* Domain Path: languages
Expand Down Expand Up @@ -48,7 +48,7 @@
or things might explode!
*************************************************************************/

if ( ! class_exists( 'CMB2_Bootstrap_205_Trunk', false ) ) {
if ( ! class_exists( 'CMB2_Bootstrap_206', false ) ) {

/**
* Handles checking for and loading the newest version of CMB2
Expand All @@ -61,14 +61,14 @@
* @license GPL-2.0+
* @link http://webdevstudios.com
*/
class CMB2_Bootstrap_205_Trunk {
class CMB2_Bootstrap_206 {

/**
* Current version number
* @var string
* @since 1.0.0
*/
const VERSION = '2.0.5';
const VERSION = '2.0.6';

/**
* Current version hook priority.
Expand All @@ -80,17 +80,17 @@ class CMB2_Bootstrap_205_Trunk {
const PRIORITY = 9993;

/**
* Single instance of the CMB2_Bootstrap_205_Trunk object
* Single instance of the CMB2_Bootstrap_206 object
*
* @var CMB2_Bootstrap_205_Trunk
* @var CMB2_Bootstrap_206
*/
public static $single_instance = null;

/**
* Creates/returns the single instance CMB2_Bootstrap_205_Trunk object
* Creates/returns the single instance CMB2_Bootstrap_206 object
*
* @since 2.0.0
* @return CMB2_Bootstrap_205_Trunk Single instance object
* @return CMB2_Bootstrap_206 Single instance object
*/
public static function initiate() {
if ( null === self::$single_instance ) {
Expand Down Expand Up @@ -173,6 +173,6 @@ public function l10ni18n() {
}

// Make it so...
CMB2_Bootstrap_205_Trunk::initiate();
CMB2_Bootstrap_206::initiate();

}
Loading

0 comments on commit 1de5ec8

Please sign in to comment.