WordPress.org

Make WordPress Core


Ignore:
Timestamp:
03/11/2008 06:18:22 PM (12 years ago)
Author:
westi
Message:

Better self links for feeds. Fixes #5238 props andy.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/feed.php

    r6777 r7244  
    232232}
    233233
     234/**
     235 * self_link() - Generate a correct link for the atom:self elemet
     236 *
     237 * Echo the link for the currently displayed feed in a XSS safe way.
     238 *
     239 * @package WordPress
     240 * @subpackage Feed
     241 * @since 2.5
     242 *
     243 */
     244function self_link() {
     245    echo 'http'
     246        . ( $_SERVER['https'] == 'on' ? 's' : '' ) . '://'
     247        . $_SERVER['HTTP_HOST']
     248        . wp_specialchars(stripslashes($_SERVER['REQUEST_URI']), 1);
     249}
     250
    234251?>
Note: See TracChangeset for help on using the changeset viewer.