« first day (2248 days earlier)      last day (2704 days later) » 

4:29 PM
how the heck one is supposed to work with widgets in customizer? code is completely different, normal hooks don't fire, no hooks in sight in general...
 
5:08 PM
@rarst, which hook do you need?
 
I need to add timestamp to instance for caching github.com/Rarst/fragment-cache/blob/…
 
ok, but you probably do not want to trigger caching while in the customizer?
 
I already killed it in customizer... issue is I need timestamp in instance so it acts as salt for cache and customizer processed instance completely differently
thinking maybe I can unpack and repack instance in ajax hook before customizer update routine gets to it...
 
 
1 hour later…
6:33 PM
@Rarst hmm now I see what you trying to do and you are probably right about that specific filter not firing. I guess that the customizer surpresses all writes to the DB which means also the update calbacks, until the actual save is done
 
customizer is saving this too... somehow. it just does it in completely different code path
 
yes
I think it just writes the full option
What about just nulifying the cache after the customizer save?
 
I do this for menus since they are a bigger mess... widgets worked fine with clear contained instances, don't want to make it more broad
 
well, seems like weston is monitoring the customizer tag... so maybe worth asking about it
but the other option is to hook on the option update action
slightly better than the full save ;)
 
yeah, I am about to dump option saves to see what's going on...
 
6:46 PM
it has to write to the widget option in the end
still not clean, but more localized
 
ugh, options store multiple widgets instances per widget type... aaa!
 
7:06 PM
holy hack, made it work with repackaging instance :)
 
7:40 PM
?
 
so if you want that way, not sure if it is possible, but maybe you can just add an hidden field to the widgets form?
and yes, I will not jusge, desperate times etc ;)
 
ugh, messing with interfaces in WP typicalle goes even worse than messing with data
widget part of customizer is 2k lines of code in a single class :\
 
I thought about always inserting it into the form, not just the customizer
 
which form? again, admin UI is completely different from Customizer UI
 
7:55 PM
the widget form()
you save the time as part of the instance, right?
if you can add an hidden field with a zero value maybe it will be more elegant than repackaging
 
does Customizer even call that?
 
yes
it uses the same ajax as the widget admin
btw, the possible point of failure with repackaging is the changeset of 4.7. You will probably not have the data in a post variable, but maybe just a direct option update (just assuming how that feature works)
.... but as much as it is fun to reverse engineer the customizer, it is bed time for me. good luck with that
 
8:16 PM
it doesn't look same at all, ajax action is different, handler is different
 

« first day (2248 days earlier)      last day (2704 days later) »