-
Notifications
You must be signed in to change notification settings - Fork 573
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Non-Repeatable Groups - Issue/93 #159
Conversation
@marcusbattle can you merge master into your branch as it's pretty far out of date. |
Sure thing! On Tue, Jan 27, 2015 at 4:11 PM, Justin Sternberg [email protected]
|
Hey Justin, my branch has been updated. Let me know if you need anything else. |
I think this could be simplified further looking at it (also just ran into needing a non repeatable group). Passing |
Finally got this feature merged. I made a few updates/tweaks (things like @pmgarman mentioned). You can see all the changes here: 0d3f706...6350d5e |
* Ability to use non-repeatable group fields by setting the `'repeatable'` field param to `false` when registering a group field type. Props [marcusbattle](https://github.com/marcusbattle), ([#159](CMB2/CMB2#159)). * Add and enqeueue a front-end specific CSS file which adds additional styles which are typically covered by wp-admin css. ([#311](CMB2/CMB2#311)) * Better handling of the CMB2 javascript (and CSS) required dependencies array. Dependencies are now only added conditionally based on the field types that are actually visible. ([#136](CMB2/CMB2#136)) * **THIS IS A BREAKING CHANGE:** The `group` field type's `'show_on_cb'` property now receives the `CMB2_Field` object instance as an argument instead of the `CMB2` instance. If you're using the `'show_on_cb'` property for a `group` field, please adjust accordingly. _note: you can still retrieve the `CMB2` instance via the `cmb2_get_metabox` helper function._ * New dynamic hook, `"cmb2_save_{$object_type}_fields_{$this->cmb_id}"`, to complement the existing `"cmb2_save_{$object_type}_fields"` hook. * New CMB2 property, `enqueue_js`, to disable the enqueueing of the CMB2 Javascript. * German translation provided by Friedhelm Jost. ### Bug Fixes * Fix incorrect repeatable group title number. ([#310](CMB2/CMB2#310)) * Fix obscure bug which prevented group field arguments from being passed to the sub-fields (like `show_names` and `context`). * Fixed occasional issue when adding a group row, the previous row's content would be cloned. ([#257](CMB2/CMB2#257)) git-svn-id: https://plugins.svn.wordpress.org/cmb2/trunk@1169742 b8457f37-d9ea-0310-8a92-e5e31aec5664
* Ability to use non-repeatable group fields by setting the `'repeatable'` field param to `false` when registering a group field type. Props [marcusbattle](https://github.com/marcusbattle), ([#159](CMB2/CMB2#159)). * Add and enqeueue a front-end specific CSS file which adds additional styles which are typically covered by wp-admin css. ([#311](CMB2/CMB2#311)) * Better handling of the CMB2 javascript (and CSS) required dependencies array. Dependencies are now only added conditionally based on the field types that are actually visible. ([#136](CMB2/CMB2#136)) * **THIS IS A BREAKING CHANGE:** The `group` field type's `'show_on_cb'` property now receives the `CMB2_Field` object instance as an argument instead of the `CMB2` instance. If you're using the `'show_on_cb'` property for a `group` field, please adjust accordingly. _note: you can still retrieve the `CMB2` instance via the `cmb2_get_metabox` helper function._ * New dynamic hook, `"cmb2_save_{$object_type}_fields_{$this->cmb_id}"`, to complement the existing `"cmb2_save_{$object_type}_fields"` hook. * New CMB2 property, `enqueue_js`, to disable the enqueueing of the CMB2 Javascript. * German translation provided by Friedhelm Jost. ### Bug Fixes * Fix incorrect repeatable group title number. ([#310](CMB2/CMB2#310)) * Fix obscure bug which prevented group field arguments from being passed to the sub-fields (like `show_names` and `context`). * Fixed occasional issue when adding a group row, the previous row's content would be cloned. ([#257](CMB2/CMB2#257)) git-svn-id: https://plugins.svn.wordpress.org/cmb2/trunk@1169744 b8457f37-d9ea-0310-8a92-e5e31aec5664
Hey Justin, here's the updates for issue 93. I'm not sold on the dom and how to modify the CSS so I could use your help there, but the base logic for non-repeatable fields is present.