[wp-trac] [WordPress Trac] #21506: Standard Theme Hooks

WordPress Trac noreply at wordpress.org
Sun Nov 2 14:30:53 UTC 2014


#21506: Standard Theme Hooks
---------------------------+-----------------------------
 Reporter:  mfields        |       Owner:
     Type:  enhancement    |      Status:  new
 Priority:  normal         |   Milestone:  Future Release
Component:  Bundled Theme  |     Version:
 Severity:  normal         |  Resolution:
 Keywords:  dev-feedback   |     Focuses:
---------------------------+-----------------------------

Comment (by GaryJ):

 Replying to [comment:80 ryno267]:
 > Jumping in... still need to drop in, say, Google Tag Manager code
 immediately after the opening <body> tag.
 > Seems that even in older themes, having a get_header_after wouldn't
 solve the problem as tons of themes still have header and nav code after
 the <body> tag in header.php.

 Another example for a commonly accepted hook right after `<body>` is to
 allow a body class of `no-js` to be toggled immediately to `js` with a
 [https://github.com/GaryJones/genesis-js-no-js/blob/master/includes/class-
 genesis-js-no-js.php#L50 short inline script], allowing styles for JS / no
 JS to apply instantly without any flash of incorrect content.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/21506#comment:83>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list