[wp-trac] [WordPress Trac] #12563: New action on body open

WordPress Trac noreply at wordpress.org
Fri Sep 13 16:02:23 UTC 2013


#12563: New action on body open
-----------------------------+--------------------------
 Reporter:  joostdevalk      |       Owner:  joostdevalk
     Type:  enhancement      |      Status:  closed
 Priority:  normal           |   Milestone:
Component:  Themes           |     Version:  3.1
 Severity:  normal           |  Resolution:  duplicate
 Keywords:  has-patch close  |
-----------------------------+--------------------------

Comment (by Denis-de-Bernardy):

 Replying to nacin:
 > I'm marking this ticket as a duplicate of #21506.

 Imho, there isn't that much overlap.

 This ticket is about a separate hook, geared towards (admittedly in-
 optimally written) code that would need to insert stuff immediately after
 the <body> tag. The ticket references Google Analytics code that has
 changed since, but there are separate use-cases that keep this other hook
 a valid issue. Two among them that I can think of off the top of my head:

 1. The occasional need to start an output buffer that only affects the
 contents of the <body> tag, without replying to regexp-fu such as outlined
 by Mike further up.

 2. A/B testing related code (Google web optimizer comes to mind, or
 whatever its name is nowadays, but there are other such scripts used in
 internet marketing spheres). These frequently need code to be inserted
 after the <body> tag rather than before </head>.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/12563#comment:33>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list