Changeset 6516 for trunk/wp-includes/feed.php
- Timestamp:
- 12/28/2007 09:21:50 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/feed.php
r6365 r6516 179 179 180 180 /** 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. 183 184 * 184 185 * In the case of WordPress, text is defined as containing no markup, … … 186 187 * 187 188 * 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 188 191 * 189 192 * @package WordPress … … 193 196 * @param string $data input string 194 197 * @return array $result array(type, value) 195 * @link http://www.atomenabled.org/developers/syndication/atom-format-spec.php#rfc.section.3.1196 198 */ 197 199 function prep_atom_text_construct($data) { … … 206 208 207 209 if (!$code) { 208 209 210 211 212 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 } 214 216 } 215 217
Note: See TracChangeset
for help on using the changeset viewer.