WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#18014 closed defect (bug) (invalid)

Post Formats are not extendable

Reported by: taeo Owned by:
Milestone: Priority: normal
Severity: major Version: 3.2
Component: Taxonomy Keywords: has-patch
Focuses: Cc:

Description

The post-format functions, specifically get_post_format_strings() in post.php do not contain filters to allow modification or extension of the allowed post-formats.

Patching the problem should be as simple as adding a filter to get_post_format_strings() as such...

line 5139 in wp-includes/post.php
return apply_filters( 'post_format_strings', $strings );

Change History (7)

comment:1 @taeo4 years ago

  • Cc taeo920@… added

comment:2 follow-up: @jorbin4 years ago

What is your use case?

Post Formats aren't meant to be modified. see http://andrewnacin.com/2011/01/27/on-standardized-post-formats/ for an explanation for why they are standardized.

comment:3 @nacin4 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

comment:4 in reply to: ↑ 2 ; follow-ups: @taeo4 years ago

Replying to jorbin:

What is your use case?

Post Formats aren't meant to be modified. see http://andrewnacin.com/2011/01/27/on-standardized-post-formats/ for an explanation for why they are standardized.

Ah. I can see Andrew's point. I can see the benefit of standardization - it allows easy portability between themes that support the feature.

My use case: I am building a multimedia heavy blog for a client. They want to style posts slightly differently based on their media type but keep them all in the same feed/post-type. Post-formats fit like a glove for them except for one tiny piece - they want to have a "list" format ( e.g. a top 5 movies post ).

I know I could roll my own and make this a custom taxonomy but it stings to do that when the post-format feature is already so perfect for the situation. The UI is already there and I already started selecting formats for posts.

If it is determined that this doesn't belong in core then I respect that decision but a one line change seems like a small favor to ask :-)

comment:5 in reply to: ↑ 4 ; follow-up: @jkudish4 years ago

Replying to taeo:

I agree with you. I too wish they were extensible, I could see so many use cases for it. It's somewhat un-WordPress like to standardize it like that. However, I think it was heavily debated enough before 3.1 and I really doubt anyone will nudge it on at this point.

comment:6 in reply to: ↑ 4 @mikeschinkel4 years ago

  • Cc mikeschinkel@… added

Replying to taeo:

Ah. I can see Andrew's point. I can see the benefit of standardization - it allows easy portability between themes that support the feature.

Making it extensible really diminishes the benefits of standardization.

I know I could roll my own and make this a custom taxonomy but it stings to do that when the post-format feature is already so perfect for the situation. The UI is already there and I already started selecting formats for posts.

Is this really a problem? Doesn't a custom taxonomy not also provide a UI? Can't you transition from formats to the custom taxonomy?

comment:7 in reply to: ↑ 5 @taeo4 years ago

Replying to jkudish:

I agree with you. I too wish they were extensible, I could see so many use cases for it. It's somewhat un-WordPress like to standardize it like that. However, I think it was heavily debated enough before 3.1 and I really doubt anyone will nudge it on at this point.

Yes - I didn't realize there had already been a big discussion over this very issue. I probably would have let it be if I had known. No sense in beating a dead horse. I think you're right about no one wanting to budge!

Replying to mikeschinkel:

Is this really a problem? Doesn't a custom taxonomy not also provide a UI? Can't you transition from formats to the custom taxonomy?

It's not really. Like I said I CAN roll my own - but I always like to opt for the core functionality when possible. And yes, custom taxonomies do provide a UI but it is modeled after categories or tags ( i.e. checkboxes and inputs ) so I have to roll my own there as well. Call me lazy I suppose.

Thanks for your responses all.

Note: See TracTickets for help on using tickets.