Opened 11 months ago
Closed 11 months ago
#21104 closed defect (bug) (fixed)
Taxonomies on attachments should not generate UI is show_ui is false
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 3.5 |
| Component: | Media | Version: | 3.4 |
| Severity: | normal | Keywords: | has-patch commit |
| Cc: | ben@… |
Description
Currently if you register a taxonomy and associate it with attachments, the show_ui argument does not affect whether WordPress generates the UI for the taxonomy in the media item edit form. If show_ui is false, then no UI should be generated anywhere in any admin screen.
$args = array( 'label' => 'Test Taxonomy', 'show_ui' => false, ); register_taxonomy( 'test', array( 'attachment' ), $args );
Attachments (1)
Change History (7)
simonwheatley — 11 months ago
comment:1
simonwheatley — 11 months ago
Fix seems pretty simple, just check for show_ui in get_attachment_fields_to_edit at the same point as we check for the public argument. See patch above.
comment:2
SergeyBiryukov — 11 months ago
- Milestone changed from Awaiting Review to 3.5
- Keywords commit added; dev-feedback removed
Before doing this, I just wanted to confirm that show_ui is true by default for register_taxonomy(). That is the case, so I am good with this.
comment:5
markjaquith — 11 months ago
show_ui is null by default, and falls through to the value of public, which is true by default.
comment:6
markjaquith — 11 months ago
- Owner set to markjaquith
- Resolution set to fixed
- Status changed from new to closed
In [21240]:

Patch to prevent taxonomy fields showing on media item edit form if show_ui is false