Skip to content

Instantly share code, notes, and snippets.

@nciske
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nciske/e10c0d96d23460929954 to your computer and use it in GitHub Desktop.
Save nciske/e10c0d96d23460929954 to your computer and use it in GitHub Desktop.
<?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