Last active
August 29, 2015 14:02
-
-
Save nciske/e10c0d96d23460929954 to your computer and use it in GitHub Desktop.
This file contains 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 fix_pb_cover_image( $metadata, $object_id, $meta_key, $single ) { | |
if( isset( $meta_key ) && 'pb_cover_image' == $meta_key && is_ssl() ) | |
return str_replace( 'http://', 'https://', $metadata ); | |
return $metadata; | |
} | |
add_filter( 'get_post_metadata', 'fix_pb_cover_image', true, 4) ; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment