WordPress.org

Make WordPress Core

Opened 11 months ago

Closed 11 months ago

Last modified 11 months ago

#24469 closed defect (bug) (fixed)

Twenty Thirteen: remove all post_format_* and the_remaining_content() function calls

Reported by: lancewillett Owned by: lancewillett
Milestone: 3.6 Priority: high
Severity: normal Version:
Component: Bundled Theme Keywords: has-patch needs-testing
Focuses: Cc:

Description

Related to #24452.

Twenty Thirteen needs to use only the_content() and not the newly introduced post format content parsing functions.

Changes include:

  • Video and image widths go from 724 to 604 width, and each will be below the post title (in post_content) and not separately, above.
  • Audio: just use the_content and shouldn't change too much visually
  • Galleries: use the lower-level "grab first gallery" function instead of the_post_format_gallery
  • Link: URL grabber is staying in core
  • Chat: just goes to the_content
  • Quote: simplify CSS rules to just expected "normal" markup
  • Aside, Status work as they do now

Attachments (4)

24469.patch (17.2 KB) - added by obenland 11 months ago.
24469.1.patch (17.3 KB) - added by lancewillett 11 months ago.
24469.1.2.patch (17.4 KB) - added by lancewillett 11 months ago.
24469.2.patch (17.7 KB) - added by lancewillett 11 months ago.
Remove custom image size for Image post format at 724

Download all attachments as: .zip

Change History (13)

obenland11 months ago

comment:1 obenland11 months ago

  • Keywords has-patch needs-testing added; needs-patch removed

First stab, needs testing and probably some refining.

comment:2 lancewillett11 months ago

Great start. Bummer to lose the visual editor styles for post formats.

I think get_post_gallery() is staying around, so we can use echo get_post_gallery() in the template.

We can use get_content_url() still.

lancewillett11 months ago

comment:3 lancewillett11 months ago

.1 patch, building on obenland's first patch:

  • Clean up some JS used with removed Quote HTML output
  • Use echo get_post_gallery() instead of needing twentythirteen_featured_gallery()
  • Use get_content_url() for grabbing the link for Link post format
  • One global variable call in content_width filter

lancewillett11 months ago

comment:4 lancewillett11 months ago

Patch refreshed to fix PHP error:

PHP Strict Standards:  Only variables should be passed by reference in /Applications/MAMP/htdocs/wordpress-trunk/wp-content/themes/twentythirteen/functions.php on line 439

comment:5 lancewillett11 months ago

Everything is looking OK so far in testing.

Quotes: with inconsistent markup we're going to be all over the map. Probably worth seeing the two or there most common patterns and styling them. I'd also be up for keeping the figure selectors around in case an author uses HTML5 correctly. A nice reward!

Images: my test site (and anyone running Twenty Thirteen on a self-hosted blog) has a lot of empty image posts now. Do we have a way to migrate them to insert the image into post content?

lancewillett11 months ago

Remove custom image size for Image post format at 724

comment:6 lancewillett11 months ago

  • Priority changed from normal to high

comment:7 lancewillett11 months ago

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

In 24391:

Twenty Thirteen: remove all post_format_*() and the_remaining_content() function calls, reverting to the_content(). Simplify functions.php, JS, and CSS files accordingly. Props obenland for starter patch, fixes #24469 and #24407. See #24452.

comment:8 lancewillett11 months ago

In 24404:

Twenty Thirteen: clean up RTL styles per changes in r24391, see #24469.

comment:9 lancewillett11 months ago

In 24405:

Twenty Thirteen: correct PHPDoc for using get_content_url() to grab first link in post content. See #24469.

Note: See TracTickets for help on using tickets.