WordPress.org

Make WordPress Core

#24009 closed defect (bug) (fixed)

Quote post format should use content for content of the quote

Reported by: markjaquith Owned by:
Milestone: 3.6 Priority: high
Severity: major Version: 3.6
Component: Post Formats Keywords: has-patch
Focuses: Cc:

Description

The balance of the quote post format seems off. The quote is the main content piece, and having commentary makes it less distinct as a format.

I think we should refactor so that the quote content is the post editor.

So, like chat, there would be no concept of commentary/remaining-content with this format.

Attachments (10)

24009.diff (5.9 KB) - added by kovshenin 12 months ago.
24009.2.diff (6.3 KB) - added by DrewAPicture 12 months ago.
24009.3.diff (5.6 KB) - added by DrewAPicture 12 months ago.
Removes esc_html on quote source
24009.4.diff (6.7 KB) - added by markjaquith 12 months ago.
24009.5.diff (6.1 KB) - added by DrewAPicture 12 months ago.
Refresh
24009.6.diff (6.5 KB) - added by markjaquith 12 months ago.
24009.7.diff (701 bytes) - added by kovshenin 12 months ago.
24009.8.diff (3.2 KB) - added by wonderboymusic 12 months ago.
24009.9.diff (3.2 KB) - added by wonderboymusic 12 months ago.
24009.10.diff (3.2 KB) - added by wonderboymusic 12 months ago.

Download all attachments as: .zip

Change History (26)

comment:1 saracannon12 months ago

  • Cc sararcannon@… added

This makes sense - users could always end up using BlockQuote and then regular text if they happen to want commentary

comment:2 alexkingorg12 months ago

Another benefit, the quote text is searchable using standard WP search.

kovshenin12 months ago

comment:3 kovshenin12 months ago

  • Keywords has-patch added

First pass in 24009.diff:

  • Remove the extra quote content field and meta key from various places
  • Add a new get_content_quote function to grab/replace a quote from content
  • New get_the_post_format_quote and the_post_format_quote functions that return/print the resulting blockquote
  • Adjust query.php to allow quotes to be split from the remaining content
  • Compat routine that replaces the found blockquote with a new structured one

DrewAPicture12 months ago

comment:4 follow-ups: DrewAPicture12 months ago

24009.2.diff fleshes out the docblocks a bit, also added an esc_html() around the quote source.

We may need to look at back-compat for <figcaption> for IE7/8, or, if it just fails silently, leave a note for theme authors.

comment:5 DrewAPicture12 months ago

  • Cc xoodrew@… added

comment:6 in reply to: ↑ 4 ; follow-up: obenland12 months ago

Replying to DrewAPicture:

24009.2.diff [...] added an esc_html() around the quote source.

I'm not sure we want do that. It would render the use of <cite> tags useless that are used for works. The final quote should look like this.


We may need to look at back-compat for <figcaption> for IE7/8, or, if it just fails silently, leave a note for theme authors.

Have you had any problems with it? IE should just ignore them, no? I had no errors showing up in tests with Kubrick.

comment:7 in reply to: ↑ 4 kovshenin12 months ago

I agree with @obenland about esc_html. Also, doing esc_html when a source URL exists, and not doing it when source URL is empty is somewhat confusing.

DrewAPicture12 months ago

Removes esc_html on quote source

comment:8 in reply to: ↑ 6 DrewAPicture12 months ago

Replying to obenland:

Replying to DrewAPicture:

24009.2.diff [...] added an esc_html() around the quote source.

I'm not sure we want do that. It would render the use of <cite> tags useless that are used for works. The final quote should look like this.

Good call, good call. Covered in 24009.3.diff, also refreshed against trunk.

markjaquith12 months ago

comment:9 markjaquith12 months ago

Updates the prompt text.

DrewAPicture12 months ago

Refresh

comment:10 DrewAPicture12 months ago

24009.5.diff rerefreshes against trunk following this morning's commits.

markjaquith12 months ago

comment:11 markjaquith12 months ago

Fixes the refresh. A few meta keys weren't right, so compat fallback wasn't working.

comment:12 markjaquith12 months ago

In 24034:

Post Formats: use the content body for the body of the Quote post format.

  • Searchable, better editing tools
  • Less cluttered Post Format UI

props kovshenin, DrewAPicture. see #24009

kovshenin12 months ago

comment:13 kovshenin12 months ago

Thanks for the commit! Just noticed one tiny thing in the docblock for get_content_quote. If the $replace argument is not empty, replacement will occur regardless of whether $remove is true or false. See 24009.7.diff.

comment:14 SergeyBiryukov12 months ago

In 24045:

Correct phpdoc for get_content_quote(). props kovshenin. see #24009.

wonderboymusic12 months ago

comment:15 wonderboymusic12 months ago

.8.diff ditches the _format_quote meta key / field / etc

wonderboymusic12 months ago

wonderboymusic12 months ago

comment:16 wonderboymusic12 months ago

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

This is confirmed working - quirks in the theme can be / are reported elsewhere

Note: See TracTickets for help on using tickets.