Skip to content

Commit

Permalink
copy WordPress function for save link
Browse files Browse the repository at this point in the history
should fix #6
  • Loading branch information
pfefferle committed Feb 10, 2019
1 parent f852aa4 commit 6f99f05
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion includes/functions.php
Expand Up @@ -52,5 +52,7 @@ function pubsubhubbub_show_discovery() {
* @return boolean
*/
function pubsubhubbub_get_self_link() {
return trailingslashit( home_url( add_query_arg( null, null ) ) );
$host = wp_parse_url( home_url() );

return esc_url( apply_filters( 'self_link', set_url_scheme( 'http://' . $host['host'] . wp_unslash( $_SERVER['REQUEST_URI'] ) ) ) );
}

0 comments on commit 6f99f05

Please sign in to comment.