WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 4 years ago

#16555 closed defect (bug) (fixed)

Post format metabox shows duplicate 'standard' format

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

Description

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 7 years ago.
16555.diff (779 bytes) - added by nacin 7 years ago.
Hacky way to do this.
16555.2.diff (653 bytes) - added by pushplaybang 4 years ago.
fixing it in theme.php
16555.3.diff (617 bytes) - added by obenland 4 years ago.

Download all attachments as: .zip

Change History (12)

#1 @nacin
7 years ago

This should probably happen in add_theme_support() directly.

@nacin
7 years ago

Hacky way to do this.

#2 @nacin
7 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
5 years ago

  • Component changed from General to Post Formats

@pushplaybang
4 years ago

fixing it in theme.php

#4 @pushplaybang
4 years ago

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

@obenland
4 years ago

#5 follow-up: @obenland
4 years ago

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

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

Replying to obenland:

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

nice one.

#7 @SergeyBiryukov
4 years ago

  • Milestone changed from Future Release to 4.1

#8 @SergeyBiryukov
4 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.