8000 Add support for timelinejs v3 and bump version numbers by benlk · Pull Request #10 · INN/storytelling-tools · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add support for timelinejs v3 and bump version numbers #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

benlk
Copy link
Collaborator
@benlk benlk commented Aug 19, 2017

Changes

  • Adds support for Timeline JS version 3, introduced this summer, that has slightly different URL formats
  • Bumps version number to 1.2

Why

Because the timeline.knightlab.com site is currently giving out URLs that are not compatible with the 1.1 release of this plugin.

For #7

@JoeGermuska
Copy link

Just ran into this problem trying to consult with someone using this plugin. This is an important fix, as TimelineJS embed URLs have been using the string timeline3 for more than three years.

Also, even this patch doesn't support configuration URL parameters that are included by default when making a Timeline using timeline.knightlab.com -- the regular expression needs to extend beyond the source parameter value to be something more like

#https://cdn\.knightlab\.com/libs/timeline3/latest/embed/index.html\?source=[a-zA-Z0-9_-]+?.*#i

(minimal match on the source value followed by any remaining values -- which would also need to be passed through to the iframe)

I am pretty sure you could replace all of those pseudo-embeds with this -- at least, I know that the oembed server works and I think this is the right WP syntax.

wp_oembed_add_provider( 'cdn.knightlab.com/libs/timeline3/*', 'https://oembed.knightlab.com/timeline/' );

You could do similar for StoryMapJS and Juxtapose

wp_oembed_add_provider( 'cdn.knightlab.com/libs/storymapjs/*', 'https://oembed.knightlab.com/storymap/' );

wp_oembed_add_provider( 'cdn.knightlab.com/libs/juxtapose/*', 'https://oembed.knightlab.com/juxtapose/' );

@rclations rclations removed their request for review February 8, 2018 20:21
@benlk
Copy link
Collaborator Author
benlk commented Feb 13, 2018

Can you file a pull request against this repo with these changes? We'd be happy to review them and merge them, and then update the plugin on wordpress.org.

@benlk benlk self-assigned this Apr 11, 2018
@benlk benlk removed their assignment Feb 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0