I agree that we might need a `check_post_formats()` function to prevent this problem in the future elsewhere, but that's more of an enhancement than a bug fix.
http://core.trac.wordpress.org/ticket/16073 addresses the current problem with a quick fix (check that the post format string is not empty). Though if we do implement a check_post_formats() function it would probably do much of the same, just be reusable for other sections of code. On Sun, Jan 2, 2011 at 7:32 AM, Rich Pedley <[email protected]> wrote: > On 02/01/2011 15:24, [email protected] wrote: > >> Would it be a good idea to create an add_post_formats() function much like >> is currently done for features like editor style and custom backgrounds >> which have functions like add_editor_style() and >> add_custom_image_header(). This way add_post_formats() could check against >> a white-list and the results *should* be seen throughout WordPress? >> >> Working on both now ... hopefully done within the next 20-30 minutes ... >>> >> > I was going to wait and see what Eric comes up with first, but as you've > mentioned that. > > I was thinking a check_post_formats function might be better, checks the > theme added formats against the list of allowed ones, and only returns an > array of added & allowed post_formats. > > I just wasn't 100% sure where this should be slotted in. > > > Rich > _______________________________________________ > wp-testers mailing list > [email protected] > http://lists.automattic.com/mailman/listinfo/wp-testers > _______________________________________________ wp-testers mailing list [email protected] http://lists.automattic.com/mailman/listinfo/wp-testers
