WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 5 months ago

#37200 new enhancement

Add wrappers with IDs to user-edit.php

Reported by: TeemuSuoranta Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.6
Component: Users Keywords:
Focuses: ui, administration Cc:
PR Number:

Description

The HTML markup of the user edit screen has been missing some classes and IDs that would make it easier to hide different sections. An earlier patch #29348 introduced ids for the <tr> elements but there is still more to do.

The different sections have all <h2> headings and <table class="form-table"> tables. It's hard to select these sections with CSS or JS because there is no identifiers. To take the initiative from #29348 to a bit further, I would add wrapper <div> elements to these sections.

I used following naming:
Section title: Additional Capabilities
Section wrapper id: user-additional-capabilities-section

This way, the naming is simalar to the <tr> wrappers (like "user-capabilities-wrap") but has it's own logic that separates these two.

This patch makes it easy to hide the title of a section or hide the whole table of chosen section.

Attachments (1)

#37200.diff (2.3 KB) - added by TeemuSuoranta 3 years ago.
My patch. I created it with SourceTree from Git mirror, I hope it's okay.

Download all attachments as: .zip

Change History (1)

@TeemuSuoranta
3 years ago

My patch. I created it with SourceTree from Git mirror, I hope it's okay.

Note: See TracTickets for help on using tickets.