Created
July 13, 2016 08:20
-
-
Save remcotolsma/d558885f5bcd6d6be6130532cdf48c55 to your computer and use it in GitHub Desktop.
SSL en Issuu PDF Sync
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function emg_magazine_embed_ssl_compatible( $content ) { | |
if ( 'magazine' === get_post_type() ) { | |
// Fix Issuu PDF Sync SSL link | |
// @see https://plugins.trac.wordpress.org/browser/issuu-pdf-sync/tags/3.1/classes/shortcodes.php#L75 | |
$content = str_replace( 'http://static.issuu.com/', 'https://static.issuu.com/', $content ); | |
} | |
return $content; | |
} | |
add_filter( 'the_content', 'emg_magazine_embed_ssl_compatible', 99 ); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment