WordPress.org

Make WordPress Core

Opened 14 months ago

Closed 13 months ago

Last modified 13 months ago

#23619 closed defect (bug) (fixed)

Twenty Thirteen: use new URL extraction function for link post format

Reported by: lancewillett Owned by: lancewillett
Milestone: 3.6 Priority: normal
Severity: normal Version:
Component: Bundled Theme Keywords:
Focuses: Cc:

Description

Replace twentythirteen_get_first_url() URL grabber function in Twenty Thirteen with the new core version.

See #23570 for the suggested new function(s).

Note: Twenty Thirteen does not need back compat with pre 3.6 versions

Attachments (1)

23619.patch (1.4 KB) - added by Frank Klein 14 months ago.

Download all attachments as: .zip

Change History (12)

comment:1 lancewillett14 months ago

  • Keywords twentythirteen added

comment:2 lancewillett14 months ago

  • Keywords twentythirteen removed

Frank Klein14 months ago

comment:3 Frank Klein14 months ago

  • Cc contact@… added
  • Keywords has-patch added; needs-patch removed

Here are the different scenarios with the output they produce:

  • The link is in the content and the link meta is empty: The title has the URL of the content link, the content link is displayed as part of the content.
  • There is a link in the content and there is a URL in the link meta: The title has the URL of the link meta, the content link is displayed as part of the content.
  • There is no link in the content and there is a URL in the link meta: The title has the URL of the link meta, there is no link displayed as part of the content.
  • There is no link in the content and no URL in the link meta: The title has the URL of the permalink, there is no link displayed as part of the content.

comment:4 philiparthurmoore13 months ago

  • Cc philip@… added

comment:5 lancewillett13 months ago

In 23786:

Twenty Thirteen: we loves us some structured post formats. See #23619 #23620 #23621.

comment:6 lancewillett13 months ago

In 23787:

Twenty Thirteen: use new get_the_url() function to find first link in a "Link" post format post. See #23619, props Frank Klein for the original patch.

comment:7 lancewillett13 months ago

  • Keywords needs-testing added; has-patch removed

Lets keep this ticket open to test all the scenarios listed by Frank Klein above.

comment:8 obenland13 months ago

Looks good. I wonder if the function name is still the best since the function no longer looks for the first url. Couldn't come up with anything better than twentythirteen_get_link_url(), though.

comment:9 lancewillett13 months ago

  • Keywords needs-testing removed

twentythirteen_get_link_url() is a better name, thanks.

Also noting, we should not allow this function to be pluggable, per same idea of #23674.

comment:10 lancewillett13 months ago

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

In 23795:

Twenty Thirteen: change link URL function name to twentythirteen_get_link_url(), props obenland. Also remove function_exists() check since this function should not be pluggable, by design. Closes #23619.

comment:11 lancewillett13 months ago

In 23803:

Twenty Thirteen: explicitly declare 'link' and 'video' as the only (current) structured post formats in Twenty Thirteen. See #23852 #23619 #23864 and #23620.

Note: See TracTickets for help on using tickets.