Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Justin Sternberg
@jtsternberg
@pglewis yah, that's fine
PG Lewis
@pglewis
I'll collect 'em all and submit a PR at the end of the rabbit hole here
cggit
@cggit
@jtsternberg with escape_cb false it still goes from the &.a.m.p.; to &
Justin Sternberg
@jtsternberg
@gc
@cggit then you may also need: 'sanitization_cb' => false // to disable
cggit
@cggit
@jtsternberg thanks I had looked there but failed. Having both set to false didnt work but only having the saniatize_cb false did the trick
Justin Sternberg
@jtsternberg
@pglewis ping
PG Lewis
@pglewis
acknowledged
Justin Sternberg
@jtsternberg
re: https://github.com/WebDevStudios/CMB2/pull/449/files I think we should revamp to use the new fields/metabox API vs using the fields array
I can do that quick, but I wouldn't be able to verify that it works for the scenarios that you are testing against
PG Lewis
@pglewis
what does it change?
PG Lewis
@pglewis
not sure how/where it would be implemented or what it touches
Justin Sternberg
@jtsternberg
no problem.. still thinking it through
PG Lewis
@pglewis
my current branch passes all but 3 tests as it stands with the same tests that I have on our trunk fork (the same as what's in the PR)
it's pretty far diverged from trunk otherwise, though, as you might guess
but my focus has been on passing existing tests first to validate back-compat that far
then test more with real metaboxes, which would likely precipitate new tests to bolster things again
but if another refactor is beneficial, I'll not let that deter me
I haven't ripped into CMB2_Field too much yet
most of it has been on the CMB2 class, but that's all-encompassing
PG Lewis
@pglewis
but definitely let me know what you're brainstorming, I can modify my course of action here to accommodate if needed
since you said "I can do that quick", I'd have to assume it's not a giant refactor. Either that or just a case of optimism ;)
Justin Sternberg
@jtsternberg
Nevermind... the modifications to the tests are good
PG Lewis
@pglewis
I needed to give explicit field names to the data arrays, that's the one oddball thing
but it makes sense that it should be that way... creation of the field is going to name them by field ID and not the original indexes 0, 1, 2 when omitted
God knows it'll find the one guy out there relying on those index values upon release though
Justin Sternberg
@jtsternberg
No, that's the way it should be. I'm actually working on a method that will convert fields arrays to using the add_field methods
PG Lewis
@pglewis
it'll still take field arrays without names, you just can't rely on those numeric indexes the way I've refactored... fields always get the name set on creation, and they're always created
but I wanna make sure I stay on the same page as you
if you're reworking add_field... well, obviously I'm hacking add_field too
in fact, all the nesting I built in the example was done exclusively via add_field
Justin Sternberg
@jtsternberg
no, this is what I'm working on.. sounds like maybe a little overlap. Let me know: http://b.ustin.co/1bcue
PG Lewis
@pglewis
since fields can be groups now, I can call add_field on a field group, not just a metabox
I didn't use add_group_field once for the example in the screenshot
Justin Sternberg
@jtsternberg
hmmm.. let me try to re-do that diff
PG Lewis
@pglewis
this gives you an idea of how far removed my branch is:
$meta_box doesn't even exist
and everything to do with fields and field collections is moved out to the new class
when boiled down at that point, it's basically a bunch of getters and setters and nonce management
PG Lewis
@pglewis
and show_form, of course
Justin Sternberg
@jtsternberg
does that conflict with your stuff?
basically, if they add fields an an old-school array, it loops through them and adds them the right way
PG Lewis
@pglewis
probably, but it's not exactly a giant changeset
I'm trying to merge back up from your trunk, to ours, and up to my branch
test changes I put in our trunk and submit the PR from there
so if you make changes I'll end up merging them in on my own, if that means refactoring it for working the "new way"
Justin Sternberg
@jtsternberg
that's a lot of setters/getters. Is there any reason there should be a method for all of them, vs one setter/getter?