[wp-trac] [WordPress Trac] #28511: Wp-admin #wpwrap hooks

WordPress Trac noreply at wordpress.org
Thu Jun 12 21:05:57 UTC 2014


#28511: Wp-admin #wpwrap hooks
-------------------------------+-------------------------------------------
 Reporter:  evandentremont     |       Owner:
     Type:  enhancement        |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  General            |     Version:  3.9.1
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |     Focuses:  ui, administration, template
-------------------------------+-------------------------------------------
Description changed by SergeyBiryukov:

Old description:

> A header and footer to the back end has been required twice in the last
> month in my office. While researching this, I came across multiple
> threads on Stack Exchange, etc. but none had a real solution.
>
> Turns out there is no hook to do so.
>
> On a development site, I added
> <?php do_action( 'pre_admin_header' ); ?>
> <div style="position:relative;">
>
> to admin-header.php; right after <div id="wpwrap"> and
>
> </div>
> <?php do_action( 'post_admin_footer' ); ?>
>
> to admin-footer.php.
>
> right before <!-- wpwrap --> </div>
>

> It functions as expected, all positioning is correct within the wrapper.
>
> Some concern was raised in #wordpress-dev about maintainability, but
> realistically, I can't see this being an issue to support or maintain. As
> it is, #wpwrap is simply a wrapper for the rest of the admin. Adding an
> additonal div before and after the admin is output shouldn't break that,
> and realistically could be moved without issue if the structure of the
> backend changes.

New description:

 A header and footer to the back end has been required twice in the last
 month in my office. While researching this, I came across multiple threads
 on Stack Exchange, etc. but none had a real solution.

 Turns out there is no hook to do so.

 On a development site, I added
 {{{
 <?php do_action( 'pre_admin_header' ); ?>
 <div style="position:relative;">
 }}}
 to `admin-header.php`; right after `<div id="wpwrap">` and
 {{{
 </div>
 <?php do_action( 'post_admin_footer' ); ?>
 }}}
 to `admin-footer.php`. right before `<!-- wpwrap --> </div>`

 It functions as expected, all positioning is correct within the wrapper.

 Some concern was raised in #wordpress-dev about maintainability, but
 realistically, I can't see this being an issue to support or maintain. As
 it is, #wpwrap is simply a wrapper for the rest of the admin. Adding an
 additonal div before and after the admin is output shouldn't break that,
 and realistically could be moved without issue if the structure of the
 backend changes.

--

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


More information about the wp-trac mailing list