Make WordPress Core

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#23619 closed defect (bug) (fixed)

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

Reported by: lancewillett's profile lancewillett Owned by: lancewillett's profile 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 12 years ago.

Download all attachments as: .zip

Change History (12)

#1 @lancewillett
12 years ago

  • Keywords twentythirteen added

#2 @lancewillett
12 years ago

  • Keywords twentythirteen removed

@Frank Klein
12 years ago

#3 @Frank Klein
12 years 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.

#4 @philiparthurmoore
12 years ago

  • Cc philip@… added

#5 @lancewillett
12 years ago

In 23786:

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

#6 @lancewillett
12 years 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.

#7 @lancewillett
12 years ago

  • Keywords needs-testing added; has-patch removed

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

#8 @obenland
12 years 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.

#9 @lancewillett
12 years 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.

#10 @lancewillett
12 years 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.

#11 @lancewillett
12 years 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.