diff options
author | Yury German <blueknight@gentoo.org> | 2019-05-22 00:42:33 -0400 |
---|---|---|
committer | Yury German <blueknight@gentoo.org> | 2019-05-22 00:42:33 -0400 |
commit | e89abce1b01dda89efdf230101d1aa3c877b3b6c (patch) | |
tree | cfb27a564c1f4cfff30d18dbf591efd48283b154 /plugins/jetpack/modules/shortcodes/scribd.php | |
parent | Adding Twentyninetten (diff) | |
download | blogs-gentoo-e89abce1b01dda89efdf230101d1aa3c877b3b6c.tar.gz blogs-gentoo-e89abce1b01dda89efdf230101d1aa3c877b3b6c.tar.bz2 blogs-gentoo-e89abce1b01dda89efdf230101d1aa3c877b3b6c.zip |
Updating of Plugins and Themes
List of Plugins updates --
akismet.4.1.2
google-authenticator.0.52
jetpack.7.3.1
List of Themes Updates --
mantra.3.2.0
twentyfifteen.2.5
twentyfourteen.2.7
Signed-off-by: Yury German <blueknight@gentoo.org>
Diffstat (limited to 'plugins/jetpack/modules/shortcodes/scribd.php')
-rw-r--r-- | plugins/jetpack/modules/shortcodes/scribd.php | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/plugins/jetpack/modules/shortcodes/scribd.php b/plugins/jetpack/modules/shortcodes/scribd.php deleted file mode 100644 index 1810c2fa..00000000 --- a/plugins/jetpack/modules/shortcodes/scribd.php +++ /dev/null @@ -1,62 +0,0 @@ -<?php - -/* - Scribd Short Code -Author: Nick Momrik - -[scribd id=DOCUMENT_ID key=DOCUMENT_KEY mode=MODE] -DOCUMENT_ID is an integer (also used as an object_id) -DOCUMENT_KEY is an alphanumeric hash ('-' character as well) -MODE can be 'list', 'book', 'slide', 'slideshow', or 'tile' - -[scribd id=39027960 key=key-3kaiwcjqhtipf25m8tw mode=list] -*/ - -function scribd_shortcode_handler( $atts ) { - $atts = shortcode_atts( - array( - 'id' => 0, - 'key' => 0, - 'mode' => '', - ), - $atts, - 'scribd' - ); - - $modes = array( 'list', 'book', 'slide', 'slideshow', 'tile' ); - - $atts['id'] = (int) $atts['id']; - if ( preg_match( '/^[A-Za-z0-9-]+$/', $atts['key'], $m ) ) { - $atts['key'] = $m[0]; - - if ( ! in_array( $atts['mode'], $modes ) ) { - $atts['mode'] = ''; - } - - return scribd_shortcode_markup( $atts ); - } else { - return ''; - } -} - -function scribd_shortcode_markup( $atts ) { - $markup = <<<EOD -<iframe class="scribd_iframe_embed" src="//www.scribd.com/embeds/$atts[id]/content?start_page=1&view_mode=$atts[mode]&access_key=$atts[key]" data-auto-height="true" scrolling="no" id="scribd_$atts[id]" width="100%" height="500" frameborder="0"></iframe> -<div style="font-size:10px;text-align:center;width:100%"><a href="http://www.scribd.com/doc/$atts[id]" target="_blank">View this document on Scribd</a></div> -EOD; - - return $markup; -} - -add_shortcode( 'scribd', 'scribd_shortcode_handler' ); - -// Scribd supports HTTPS, so use that endpoint to get HTTPS-compatible embeds -function scribd_https_oembed( $providers ) { - if ( isset( $providers['#https?://(www\.)?scribd\.com/doc/.*#i'] ) ) { - $providers['#https?://(www\.)?scribd\.com/doc/.*#i'][0] = 'https://www.scribd.com/services/oembed'; - } - - return $providers; -} - -add_filter( 'oembed_providers', 'scribd_https_oembed' ); |