Make WordPress Core

Opened 6 years ago

Last modified 6 years ago

#28511 closed enhancement

Wp-admin #wpwrap hooks — at Version 3

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

Description (last modified by SergeyBiryukov)

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

<?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 (3)

This ticket was mentioned in IRC in #wordpress-dev by iamepic. View the logs.

6 years ago

#2 @ocean90
6 years ago

  • Keywords reporter-feedback added
  • Type changed from feature request to enhancement

Can you please provide some use cases/code examples for these hooks?

#3 @SergeyBiryukov
6 years ago

  • Description modified (diff)
Note: See TracTickets for help on using tickets.