[wp-hackers] admin menu equivalent of template_redirect?
wordpress at dd32.id.au
Sat Oct 18 04:33:45 GMT 2008
I have a feeling that you wont be able to achieve that.
AFAIK, The headers included before the post is queried, And the admin
interface doesnt use the same Query functions like the front end does.
Your best bet is probably going to be enqueue them for all posts/pages,
and hook onto the footer to echo <script>$myscript.enable()</script>
possibly. you might also want to check if $post_id is set on the
admin_init hook, I doubt it is, but if it is, you can base it off that.
On Sat, 18 Oct 2008 15:24:49 +1100, Casey Bisson <casey.bisson at gmail.com>
> The template_redirect hook works wonders on the public side, allowing
> my plugins to evaluate the found posts and execute conditional code
> based on the results. Is there any equivalent to that inside the
> Reason: I'm manipulating the post and page editor screens via jQuery,
> but only if the page/post has certain post_meta. How can I check for
> the existence of that post_meta in time to queue the appropriate js
> and css?
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers