Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#24327 closed defect (bug) (fixed)

'Add Media' and Title should show for all formats if Post Formats UI is disabled

Reported by: drewapicture's profile DrewAPicture Owned by:
Milestone: 3.6 Priority: high
Severity: normal Version: 3.6
Component: Post Formats Keywords: dev-feedback has-patch
Focuses: Cc:

Description

In [24037] and [24098], we opted to hide the 'Add Media' button for the Aside, Status, Image, Video, and Audio formats in lieu of their respective UIs.

However, if the Post Formats UI is deactivated through either the screen option, the filter, or lack of post_type support, the 'Add Media' button should show as before, assuming the user has the correct capabilities.

Attachments (2)

24327.diff (5.6 KB) - added by kovshenin 10 years ago.
24327.2.diff (4.0 KB) - added by kovshenin 10 years ago.

Download all attachments as: .zip

Change History (19)

#1 @nacin
10 years ago

This brings up a fairly serious UX issue: what happens when you turn off the UI? Is your structured data in any way discoverable? How can you even edit a post when the UI is off? Most of your data would be missing.

#2 @kovshenin
10 years ago

  • Cc kovshenin added

#3 @sabreuse
10 years ago

  • Cc sabreuse added

#4 @azaozz
10 years ago

Currently the show/hide UI checkbox toggles a class in two different places that affect only some elements on the screen. Thinking we should toggle a class on the body so we can properly reset the screen when the post formats UI is hidden.

Also currently we have two code blocks that check whether post formats are supported/enabled: in admin-header.php and edit-form-advanced.php (the part in the second code block is not needed).

We can easily move the check whether to show the UI ($user_wants = get_user_option...) in admin-header, allowing us to toggle a class on the body.

#5 @kovshenin
10 years ago

Working on a patch :)

@kovshenin
10 years ago

#6 @kovshenin
10 years ago

  • Keywords has-patch added; needs-patch removed

24327.diff deals with the Add Media button and the title field.

#7 @DrewAPicture
10 years ago

24327.diff works great in my testing.

#8 @ethitter
10 years ago

  • Cc erick@… added

#9 @DrewAPicture
10 years ago

  • Summary changed from 'Add Media' button should show for all formats if Post Formats UI is disabled to 'Add Media' and Title should show for all formats if Post Formats UI is disabled

#10 @azaozz
10 years ago

In 24264:

Fix showing and hiding of UI elements when disabling the Post Formats UI, props kovshenin, see #24327

@kovshenin
10 years ago

#11 @kovshenin
10 years ago

24327.2.diff enforces the post format UI display if there's some structured data associated with the post.

#12 @aaroncampbell
10 years ago

Quick test says that 24327.2.diff does exactly as advertised. Seems to work when turning it off WHILE editing an existing post with structured data as well as when it's already off before you edit said post.

#13 @ryan
10 years ago

Looks good here. Nacin didn't object.

#14 @ryan
10 years ago

In 24282:

Display the post format UI when there is structured data associated with the post regardless of the screen option.

Props kovshenin
see #24327

#15 follow-up: @kovshenin
10 years ago

Is there anything else that should be done here?

#16 in reply to: ↑ 15 @DrewAPicture
10 years ago

Replying to kovshenin:

Is there anything else that should be done here?

I think [24264] and [24282] pretty much covered it. I think we can close this as fixed.

Just so it's clear, we're only forcing the UI if the screen option is turned off and the post has a format and not forcing it if it's disabled via the filter, correct?

#17 @azaozz
10 years ago

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in [24264] and [24282].

Note: See TracTickets for help on using tickets.