mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-16 23:00:21 +00:00
Better self links for feeds. Fixes #5238 props andy.
git-svn-id: https://develop.svn.wordpress.org/trunk@7244 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -231,4 +231,21 @@ function prep_atom_text_construct($data) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* self_link() - Generate a correct link for the atom:self elemet
|
||||
*
|
||||
* Echo the link for the currently displayed feed in a XSS safe way.
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Feed
|
||||
* @since 2.5
|
||||
*
|
||||
*/
|
||||
function self_link() {
|
||||
echo 'http'
|
||||
. ( $_SERVER['https'] == 'on' ? 's' : '' ) . '://'
|
||||
. $_SERVER['HTTP_HOST']
|
||||
. wp_specialchars(stripslashes($_SERVER['REQUEST_URI']), 1);
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user