Skip to content

Commit e5acc0c

Browse files
committed
Add backcompat function introduced in WordPress 5.2
1 parent cebb7f2 commit e5acc0c

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

mf2-feed.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,3 +132,12 @@ public static function add_html_header() {
132132
}
133133
}
134134
}
135+
136+
// Backcompat for function introduced in WordPress 5.3
137+
if ( ! function_exists( 'get_self_link' ) ) {
138+
function get_self_link() {
139+
$host = @parse_url( home_url() );
140+
return set_url_scheme( 'http://' . $host['host'] . wp_unslash( $_SERVER['REQUEST_URI'] ) );
141+
}
142+
}
143+

0 commit comments

Comments
 (0)