Want more features on Pastebin? Sign Up, it's FREE!
Guest

Speaker Deck Embed, v1.1

By: simonwheatley on Nov 22nd, 2012  |  syntax: PHP  |  size: 0.62 KB  |  views: 50  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2.  
  3. /*
  4. Plugin Name: Speaker Deck Embed
  5. Description: Embed Speaker Deck slideshows
  6. Version: 1.1
  7. Author: Matt Wiebe
  8. Author URI: http://somadesign.ca/
  9. */
  10.  
  11. add_action( 'init', 'sd_add_speakerdeck_oembed' );
  12. function sd_add_speakerdeck_oembed() {
  13.         // Example URL: https://speakerdeck.com/simonwheatley/what-happened-at-the-wordpress-community-summit
  14.         // Example oEmbed URL: https://speakerdeck.com/oembed.json?url=https%3A%2F%2Fspeakerdeck.com%2Fsimonwheatley%2Fwhat-happened-at-the-wordpress-community-summit
  15.         wp_oembed_add_provider( '#https?://speakerdeck.com/.*#i', 'https://speakerdeck.com/oembed.json', true );
  16. }
clone this paste RAW Paste Data