WordPress.org

Make WordPress Core

Changeset 6516


Ignore:
Timestamp:
12/28/07 21:21:50 (7 years ago)
Author:
westi
Message:

Better documentation for prep_atom_text_construct props darkdragon

File:
1 edited

Legend:

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

    r6365 r6516  
    179179 
    180180/** 
    181  * prep_atom_text_construct() - determine if given string of data is 
    182  * type text, html, or xhtml, per RFC 4287 section 3.1. 
     181 * prep_atom_text_construct() - Determine the type of a given string of data 
     182 * 
     183 * Tell whether the type is text, html, or xhtml, per RFC 4287 section 3.1. 
    183184 * 
    184185 * In the case of WordPress, text is defined as containing no markup, 
     
    186187 * 
    187188 * Container div tags are added to xhtml values, per section 3.1.1.3. 
     189 * 
     190 * @link http://www.atomenabled.org/developers/syndication/atom-format-spec.php#rfc.section.3.1 
    188191 * 
    189192 * @package WordPress 
     
    193196 * @param string $data input string 
    194197 * @return array $result array(type, value) 
    195  * @link http://www.atomenabled.org/developers/syndication/atom-format-spec.php#rfc.section.3.1 
    196198 */ 
    197199function prep_atom_text_construct($data) { 
     
    206208 
    207209    if (!$code) { 
    208                if (strpos($data, '<') === false) { 
    209                    return array('text', $data); 
    210                        } else { 
    211                    $data = "<div xmlns='http://www.w3.org/1999/xhtml'>$data</div>"; 
    212                    return array('xhtml', $data); 
    213                        } 
     210        if (strpos($data, '<') === false) { 
     211            return array('text', $data); 
     212        } else { 
     213            $data = "<div xmlns='http://www.w3.org/1999/xhtml'>$data</div>"; 
     214            return array('xhtml', $data); 
     215        } 
    214216    } 
    215217 
Note: See TracChangeset for help on using the changeset viewer.