Make WordPress Core

Opened 14 years ago

Closed 14 years ago

#15393 closed enhancement (fixed)

Better support for portability with Post Formats

Reported by: itsananderson's profile itsananderson Owned by:
Milestone: 3.1 Priority: normal
Severity: normal Version: 3.1
Component: Themes Keywords:
Focuses: Cc:

Description

The portability enhancements added by Post Formats are fairly self evident, but the current implementation falls a little short. Consider the following use case:

User installs a theme that supports post format X. User creates one or more posts and selects format X for those posts. User installs and enables a different theme that doesn't support format X. If the user edits one of the posts, its format is automatically reverted back to "Default", and there doesn't seem to be a workaround. If the user then switches back to the original theme, or the new theme adds support for format X, any posts that have been edited will have lost their X format association.

The enhancement I am proposing should be pretty simple. If a post is associated with a format that isn't currently supported, that format should be added to the Post Format drop-down anyway (for that post only). If the user edits the post and changes to a different format, the X format will no longer be displayed as an option, but as long as they don't do that, they can edit the post without reverting the post format to "Default".

The following screenshot hopefully illustrates what I'm trying to explain:

http://twitpic.com/35y9fd

Attachments (1)

meta-boxes.php.diff (576 bytes) - added by anderswc 14 years ago.
Initial (very simple) pass at implementing this. Doesn't contain the warning message mentioned in the comments.

Download all attachments as: .zip

Change History (6)

#1 @chipbennett
14 years ago

Should this include some sort of warning dialogue that is presented if the post-format type is changed from a "legacy" (i.e. Theme-unsupported) type, to notify the user that the change cannot be undone once the Post is saved? Something like:

Note: This Post currently uses a Post Format type not supported by your current Theme. If you change the Post Format type, you will not be able to re-select the current Post Format again unless you switch to a Theme that supports this type.

#2 @anderswc
14 years ago

Good point. I'm not exactly a UI guy, but an actual dialog would probably be a little to intrusive. Perhaps always showing a warning message similar to the "This isn't the latest version of this post" warning would be better. Something like this:

http://www.itsananderson.com/wp-content/uploads/edit-post-warning.png

@anderswc
14 years ago

Initial (very simple) pass at implementing this. Doesn't contain the warning message mentioned in the comments.

#3 @nacin
14 years ago

  • Milestone changed from Awaiting Review to 3.1

Screenshot makes sense. Not sure a giant warning is necessary. We need to figure out the right workflow here.

#4 @markjaquith
14 years ago

Don't think warning is necessary. anderswc — thanks for the patch! in the future, stick to tabs for indentation (it's our standard).

#5 @markjaquith
14 years ago

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

(In [16316]) Always add in the current post format, in case the theme was switched to one that does not support it. props anderswc. fixes #15393. see #14746

Note: See TracTickets for help on using tickets.