Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Commit

Permalink
### 2.0.3 - 2015-03-15
Browse files Browse the repository at this point in the history
##### Enhancements

* New constant, `CMB2_DIR`, which stores the file-path to the CMB2 directory.
* `text_date`, `text_time`, `text_date_timestamp`, `text_datetime_timestamp`, and ` text_datetime_timestamp_timezone` field types now take an arguments array so they can be extended by custom field types.
* Removed auto-scroll when adding groups. To re-add the feature, use the [snippet/plugin here](https://github.com/WebDevStudios/CMB2-Snippet-Library/blob/master/javascript/cmb2-auto-scroll-to-new-group.php). ([#205](CMB2/CMB2#205))
* Updated Timepicker utilizing the [@trentrichardson](https://github.com/trentrichardson) jQuery Timepicker add-on (https://github.com/trentrichardson/jQuery-Timepicker-Addon), and updated Datepicker styles. Props [JonMasterson](https://github.com/JonMasterson). ([#204](CMB2/CMB2#204), [#206](CMB2/CMB2#206), [#45](CMB2/CMB2#45)).
* Added a callback option for the field default value. The callback gets passed an array of all the field parameters as the first argument, and the field object as the second argument. (which means you can get the post id using `$field->object_id`). ([#233](CMB2/CMB2#233)).
* New `CMB2::get_field()` method and `cmb2_get_field` helper function for retrieving a `CMB2_Field` object from the array of registered fields for a metabox.
* New `CMB2::get_sanitized_values()` method and `cmb2_get_metabox_sanitized_values` helper function for retrieving sanitized values from an array of values (usually `$_POST` data).
* New `'save_fields'` metabox property that can be used to disable (by setting `'save_fields' => false`) the automatic saving of the fields when the form is submitted. These can be useful when you want to handle the saving of the fields yourself, or want to use submitted data for other purposes like generating new posts, or sending emails, etc.

##### Bug Fixes

* Fix commented out text_datetime_timestamp_timezone field registration example in `example-functions.php`. Props [cliffordp](https://github.com/cliffordp), ([#203](CMB2/CMB2#203)).
* Fix sidebar styling for money fields and fields with textareas. ([#234](CMB2/CMB2#234))
* Fix `CMB2_Sanitize` class to properly use the stripslashed value (which was added in [#162](CMB2/CMB2#162) but never used). Props [dustyf](https://github.com/dustyf), ([#241](CMB2/CMB2#241)).

git-svn-id: https://plugins.svn.wordpress.org/cmb2/trunk@1113335 b8457f37-d9ea-0310-8a92-e5e31aec5664
  • Loading branch information
jtsternberg committed Mar 15, 2015
1 parent 5cf30d0 commit eaa7bdc
Show file tree
Hide file tree
Showing 19 changed files with 1,292 additions and 542 deletions.
21 changes: 20 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,26 @@ All notable changes to this project will be documented in this file.

## [Unreleased][unreleased]

*
*

## 2.0.3 - 2015-03-15

### Enhancements

* New constant, `CMB2_DIR`, which stores the file-path to the CMB2 directory.
* `text_date`, `text_time`, `text_date_timestamp`, `text_datetime_timestamp`, and ` text_datetime_timestamp_timezone` field types now take an arguments array so they can be extended by custom field types.
* Removed auto-scroll when adding groups. To re-add the feature, use the [snippet/plugin here](https://github.com/WebDevStudios/CMB2-Snippet-Library/blob/master/javascript/cmb2-auto-scroll-to-new-group.php). ([#205](https://github.com/WebDevStudios/CMB2/issues/205))
* Updated Timepicker utilizing the [@trentrichardson](https://github.com/trentrichardson) jQuery Timepicker add-on (https://github.com/trentrichardson/jQuery-Timepicker-Addon), and updated Datepicker styles. Props [JonMasterson](https://github.com/JonMasterson). ([#204](https://github.com/WebDevStudios/CMB2/issues/204), [#206](https://github.com/WebDevStudios/CMB2/issues/206), [#45](https://github.com/WebDevStudios/CMB2/issues/45)).
* Added a callback option for the field default value. The callback gets passed an array of all the field parameters as the first argument, and the field object as the second argument. (which means you can get the post id using `$field->object_id`). ([#233](https://github.com/WebDevStudios/CMB2/issues/233)).
* New `CMB2::get_field()` method and `cmb2_get_field` helper function for retrieving a `CMB2_Field` object from the array of registered fields for a metabox.
* New `CMB2::get_sanitized_values()` method and `cmb2_get_metabox_sanitized_values` helper function for retrieving sanitized values from an array of values (usually `$_POST` data).
* New `'save_fields'` metabox property that can be used to disable (by setting `'save_fields' => false`) the automatic saving of the fields when the form is submitted. These can be useful when you want to handle the saving of the fields yourself, or want to use submitted data for other purposes like generating new posts, or sending emails, etc.

### Bug Fixes

* Fix commented out text_datetime_timestamp_timezone field registration example in `example-functions.php`. Props [cliffordp](https://github.com/cliffordp), ([#203](https://github.com/WebDevStudios/CMB2/pull/203)).
* Fix sidebar styling for money fields and fields with textareas. ([#234](https://github.com/WebDevStudios/CMB2/issues/234))
* Fix `CMB2_Sanitize` class to properly use the stripslashed value (which was added in [#162](https://github.com/WebDevStudios/CMB2/pull/162) but never used). Props [dustyf](https://github.com/dustyf), ([#241](https://github.com/WebDevStudios/CMB2/pull/241)).

## 2.0.2 - 2015-02-15

Expand Down
21 changes: 18 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
### NOTE: The issues section is for bug reports and feature requests only.
# Contributing to CMB2

Thank you for your interest in contributing back to CMB2. Please help us review your issues and/or merge your pull requests by following the below guidelines.

#### NOTE: The issues section is for bug reports and feature requests only.
_Support is not offered for this library, and the likelihood that the maintainers will respond is very low. If you need help, please use [stackoverflow](http://stackoverflow.com/search?q=cmb), or the [wordpress.org plugin forums](http://wordpress.org/support/plugin/cmb2)._

Before reporting a bug
---
1. Search issue tracker for similar issues.
2. Install the trunk version of CMB2.
1. Search [issues](https://github.com/WebDevStudios/CMB2/issues) to see if the issue has been previously reported.
2. Install the trunk version of CMB2 and test there.


How to report a bug
Expand All @@ -24,6 +28,17 @@ All contributions welcome. If you would like to submit a pull request, please fo
3. **Check out the trunk version of CMB2.** If you submit to the master branch, the PR will be closed with a link back to this document.
4. **Verify your issue still exists in the trunk branch.**
5. Make changes to your clone of the repository.
1. Please follow the [WordPress code standards](https://make.wordpress.org/core/handbook/coding-standards).
2. If possible, and if applicable, please also add/update unit tests for your changes.
3. Please add documentation to any new functions, methods, actions and filters.
4. When committing, reference your issue (if present) and include a note about the fix.
6. [Submit a pull request](https://help.github.com/articles/creating-a-pull-request/).

**Note:** You may gain more ground and avoid unecessary effort if you first open an issue with the proposed changes, but this step is not necessary.

Additional Resources
---
* [CMB2 Snippet Library](https://github.com/WebDevStudios/CMB2-Snippet-Library)
* [General GitHub Documentation](http://help.github.com/)
* [GitHub Pull Request documentation](http://help.github.com/send-pull-requests/)
* [PHPUnit Tests Guide](http://phpunit.de/manual/current/en/writing-tests-for-phpunit.html)
20 changes: 0 additions & 20 deletions bootstrap.php
Original file line number Diff line number Diff line change
@@ -1,25 +1,5 @@
<?php

/**
* Helper function to provide directory path to CMB
* @since 2.0.0
* @param string $path Path to append
* @return string Directory with optional path appended
*/
function cmb2_dir( $path = '' ) {
static $cmb2_dir = null;
if ( is_null( $cmb2_dir ) ) {
$cmb2_dir = trailingslashit( dirname( __FILE__ ) );
}
return $cmb2_dir . $path;
}

/**
* Include helper functions,
* and more importantly, the class/file autoloader
*/
require_once cmb2_dir( 'includes/helper-functions.php' );

/**
* Fires when CMB2 is included/loaded
*
Expand Down
Loading

0 comments on commit eaa7bdc

Please sign in to comment.