[wp-trac] [WordPress Trac] #4146: admin_head fires too early

WordPress Trac wp-trac at lists.automattic.com
Fri Apr 13 21:37:47 GMT 2007


#4146: admin_head fires too early
----------------------------+-----------------------------------------------
 Reporter:  elharo          |       Owner:  anonymous
     Type:  defect          |      Status:  new      
 Priority:  normal          |   Milestone:  2.4      
Component:  Administration  |     Version:           
 Severity:  normal          |    Keywords:           
----------------------------+-----------------------------------------------
 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.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/4146>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list