[wp-hackers] styles, scripts & a meta box = problem
24/7
24-7 at gmx.net
Thu Jun 9 21:01:02 UTC 2011
Hi list,
in the continous efforts to make most of my theme code generic and avoid
coding the same stuff over and over again, I started writing my own little
set of classes to build form fields (standard html, colorpicker, datepicker
& media upload) for admin pages & meta boxes. At first it seemed pretty
straight forward as WordPress even includes all of the necessary styles &
scripts (just had to include a datepicker).
But then i ran into the following problem (please read over here in detail
[1]): I can't load any styles & scripts using the "BackPress script/styles
procedural API" - wp_enqueue/register_script/style();
Meta Boxes are a great concept and have them working out of the box with
just a call to a function is extremly kool - and same goes for adding styles
and scripts. But what are meta boxes for? They are here for adding
additional input fields. And they have the kool drag & drop and open/close
jQuery feature. But they don't allow me adding stuff at a level of equal
koolness inside.
So is there any idea on how i could intercept meta box callbacks early
enough to let styles & scripts get registered? I'm searching for a solution
that avoids splitting my classes just to allow to use them not only on admin
pages, but on meta boxes too? Or: is there any idea on where a core-patch
should start to allow the inner life of a meta box be as kool as the box
itself?
Thanks in advance!
K.
[1] http://wordpress.stackexchange.com/q/19610/385
More information about the wp-hackers
mailing list