Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#27187 closed defect (bug) (fixed)

Bulk edit should only display available post formats

Reported by: eightface's profile eightface Owned by: wonderboymusic's profile wonderboymusic
Milestone: 3.9 Priority: normal
Severity: normal Version: 3.7
Component: Post Formats Keywords: has-patch commit
Focuses: administration Cc:

Description

Currently, the the bulk editor will display all possible post formats. It should probably only show the ones specified by the theme, to prevent weird things from happening.

Attachments (3)

27187.diff (1.1 KB) - added by eightface 11 years ago.
27187.2.diff (1.2 KB) - added by eightface 11 years ago.
Use 0 for standard option value, check if theme supports post-formats
27187.3.diff (1.2 KB) - added by eightface 11 years ago.
Use function to get standard post format title

Download all attachments as: .zip

Change History (7)

@eightface
11 years ago

#1 follow-up: @ocean90
11 years ago

  • Milestone changed from Awaiting Review to 3.9
  • Version changed from trunk to 3.7

Hello eightface, thanks for the report and the patch.

I think this is a valid bug and we should make it consistent with post_format_meta_box().

Patch looks good so far. Only some minor things:

  • <option value="standard">Standard</option> should be <option value="0"><?php echo get_post_format_string( 'standard' ); ?></option>
  • Since we're showing only theme supported formats a current_theme_supports( 'post-formats' ) check should be added.

@eightface
11 years ago

Use 0 for standard option value, check if theme supports post-formats

@eightface
11 years ago

Use function to get standard post format title

#2 @eightface
11 years ago

Thanks! First time submitting a ticket/patch. Not as terrifying as it seemed. Admittedly the UI changes here have made it a lot friendlier.

#3 in reply to: ↑ 1 @SergeyBiryukov
11 years ago

  • Keywords has-patch commit added

Replying to ocean90:

Since we're showing only theme supported formats a current_theme_supports( 'post-formats' ) check should be added.

My initial thought was that if the current theme doesn't support post formats, we should still be able to change the format to Standard. However, the Format meta box currently has the same check, so this would be consistent.

27187.3.diff looks good to me.

#4 @wonderboymusic
11 years ago

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

In 27762:

The bulk editor and post format meta box should use the same checks for available post formats.

Props eightface.
Fixes #27187.

Note: See TracTickets for help on using tickets.