WordPress.org

Make WordPress Core

Opened 6 years ago

Last modified 6 years ago

#28511 closed enhancement

Wp-admin #wpwrap hooks — at Initial Version

Reported by: evandentremont Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.9.1
Component: General Keywords:
Focuses: ui, administration, template Cc:

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.

Change History (0)

Note: See TracTickets for help on using tickets.