diff options
Diffstat (limited to 'plugins/jetpack/modules/publicize/publicize.php')
-rw-r--r-- | plugins/jetpack/modules/publicize/publicize.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/jetpack/modules/publicize/publicize.php b/plugins/jetpack/modules/publicize/publicize.php index c3972cf6..1926fd4f 100644 --- a/plugins/jetpack/modules/publicize/publicize.php +++ b/plugins/jetpack/modules/publicize/publicize.php @@ -320,7 +320,7 @@ abstract class Publicize_Base { $cmeta = $this->get_connection_meta( $connection ); if ( isset( $cmeta['connection_data']['meta']['link'] ) ) { - if ( 'facebook' == $service_name && 0 === strpos( parse_url( $cmeta['connection_data']['meta']['link'], PHP_URL_PATH ), '/app_scoped_user_id/' ) ) { + if ( 'facebook' == $service_name && 0 === strpos( wp_parse_url( $cmeta['connection_data']['meta']['link'], PHP_URL_PATH ), '/app_scoped_user_id/' ) ) { // App-scoped Facebook user IDs are not usable profile links return false; } @@ -329,7 +329,7 @@ abstract class Publicize_Base { } elseif ( 'facebook' == $service_name && isset( $cmeta['connection_data']['meta']['facebook_page'] ) ) { return 'https://facebook.com/' . $cmeta['connection_data']['meta']['facebook_page']; } elseif ( 'tumblr' == $service_name && isset( $cmeta['connection_data']['meta']['tumblr_base_hostname'] ) ) { - return 'http://' . $cmeta['connection_data']['meta']['tumblr_base_hostname']; + return 'https://' . $cmeta['connection_data']['meta']['tumblr_base_hostname']; } elseif ( 'twitter' == $service_name ) { return 'https://twitter.com/' . substr( $cmeta['external_display'], 1 ); // Has a leading '@' } else if ( 'linkedin' == $service_name ) { @@ -337,7 +337,7 @@ abstract class Publicize_Base { return false; } - $profile_url_query = parse_url( $cmeta['connection_data']['meta']['profile_url'], PHP_URL_QUERY ); + $profile_url_query = wp_parse_url( $cmeta['connection_data']['meta']['profile_url'], PHP_URL_QUERY ); wp_parse_str( $profile_url_query, $profile_url_query_args ); if ( isset( $profile_url_query_args['key'] ) ) { $id = $profile_url_query_args['key']; @@ -347,7 +347,7 @@ abstract class Publicize_Base { return false; } - return esc_url_raw( add_query_arg( 'id', urlencode( $id ), 'http://www.linkedin.com/profile/view' ) ); + return esc_url_raw( add_query_arg( 'id', urlencode( $id ), 'https://www.linkedin.com/profile/view' ) ); } else { return false; // no fallback. we just won't link it } |