[wp-hackers] Bug: admin_head called early

Elliotte Harold elharo at metalab.unc.edu
Fri Apr 13 21:36:34 GMT 2007


The admin_head hook is documented as:

     Executes in the <head> section of the admin panel. Useful for 
insertion of additional content.


However I think it actually fires early, before the head. I'm seeing 
output like this when I hook into it:


<style type="text/css">#ed_lookup, #ed_spell { display:none; } </style>
         <script type='text/javascript'>
var emButton = document.getElementById('ed_em')
emButton.setAttribute('value', 'em')
 ></script>        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 
Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Mokka mit Schlag &rsaquo; Create New Post &#8212; WordPress</title>
<link rel="stylesheet" 
href="http://www.elharo.com/blog/wp-admin/wp-admin.css?version=2.1.3" 
type="text/css" />
...

The first style and script element are from my nascent plugin. Notice 
that they show up before the DOCTYPE and root element. They should show 
up in the head element after the <head> start-tag.

-- 
Elliotte Rusty Harold  elharo at metalab.unc.edu
Java I/O 2nd Edition Just Published!
http://www.cafeaulait.org/books/javaio2/
http://www.amazon.com/exec/obidos/ISBN=0596527500/ref=nosim/cafeaulaitA/


More information about the wp-hackers mailing list