Make WordPress Core

Opened 13 years ago

Closed 9 years ago

#16555 closed defect (bug) (fixed)

Post format metabox shows duplicate 'standard' format

Reported by: ptahdunbar's profile ptahdunbar Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 4.1 Priority: low
Severity: normal Version: 3.1
Component: Post Formats Keywords: has-patch
Focuses: Cc:


Having 'standard' within add_theme_support makes the standard option show up twice within the post format metabox on the write/edit screen.

add_theme_support( 'post-formats', array( 'standard', 'aside', 'chat', 'gallery', 'link', 'image', 'quote', 'status', 'video', 'audio' ) );

Patch fixes this by skiping over standard since it's hardcoded in the metabox.

Attachments (4)

ticket.16555.diff (989 bytes) - added by ptahdunbar 13 years ago.
16555.diff (779 bytes) - added by nacin 13 years ago.
Hacky way to do this.
16555.2.diff (653 bytes) - added by pushplaybang 9 years ago.
fixing it in theme.php
16555.3.diff (617 bytes) - added by obenland 9 years ago.

Download all attachments as: .zip

Change History (12)

#1 @nacin
13 years ago

This should probably happen in add_theme_support() directly.

13 years ago

Hacky way to do this.

#2 @nacin
13 years ago

  • Milestone changed from Awaiting Review to Future Release
  • Priority changed from normal to low

Probably just wontfix, or at least low priority into the future. Simple way to avoid this is removing support for 'standard'. All themes support 'standard' by default.

#3 @iseulde
11 years ago

  • Component changed from General to Post Formats

9 years ago

fixing it in theme.php

#4 @pushplaybang
9 years ago

Added a pretty simple fix for this in the add_theme_support function, removing it from the input array with array_splice.

9 years ago

#5 follow-up: @obenland
9 years ago

16555.3.diff corrects the whitelist, rather than the user input.

#6 in reply to: ↑ 5 @pushplaybang
9 years ago

Replying to obenland:

16555.3.diff corrects the whitelist, rather than the user input.

nice one.

#7 @SergeyBiryukov
9 years ago

  • Milestone changed from Future Release to 4.1

#8 @SergeyBiryukov
9 years ago

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

In 30038:

Don't display Standard post format twice in the meta box if the theme unnecessarily mentions it in the add_theme_support() call.

props ptahdunbar, nacin, pushplaybang, obenland.
fixes #16555.

Note: See TracTickets for help on using tickets.