[wp-trac] [WordPress Trac] #38003: Add oEmbed support for User, List and Like Twitter timelines
WordPress Trac
noreply at wordpress.org
Fri Sep 30 14:25:16 UTC 2016
#38003: Add oEmbed support for User, List and Like Twitter timelines
-------------------------------------------------+-------------------------
Reporter: earnjam | Owner: ocean90
Type: enhancement | Status: reviewing
Priority: normal | Milestone: 4.7
Component: Embeds | Version:
Severity: normal | Resolution:
Keywords: needs-unit-tests has-patch needs- | Focuses:
refresh |
-------------------------------------------------+-------------------------
Changes (by ocean90):
* keywords: needs-unit-tests has-patch 2nd-opinion => needs-unit-tests
has-patch needs-refresh
Comment:
@earnjam Based on this [https://support.twitter.com/articles/101299#error
support article] using `\w` for the username is fine.
> * Your username cannot be longer than '''15 characters'''. […]
> * A username can only contain '''alphanumeric characters''' (letters
A-Z, numbers 0-9) with the exception of '''underscores''', […]
Since the length of a username is limited you can replace `\w+?` with
`\w{1,15}`.
For user and list timelines we should support an optional trailing slash:
`\w{1,15}/?$` and `\w{1,15}/likes/?`. That makes it consistent with the
other services where we use a simple `.*` match.
A new patch should:
1) Update the regular expressions.
2) Update the docs for the `oembed_providers` filter to include the new
endpoints.
2) Extend `Tests_oEmbed::$provider_map` with the new endpoints.
3) Extend `Tests_oEmbed::oEmbedProviderData()` with sample data for the
new endpoints.
You don't need to adjust the alignments, I'll do that in a separate
commit.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38003#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list