From aa78f6c4c02c35310ac4b9bf701616842b574520 Mon Sep 17 00:00:00 2001 From: Peter Westwood Date: Fri, 28 Dec 2007 21:21:50 +0000 Subject: [PATCH] Better documentation for prep_atom_text_construct props darkdragon git-svn-id: https://develop.svn.wordpress.org/trunk@6516 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/feed.php | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/wp-includes/feed.php b/wp-includes/feed.php index c45981c08f..6bf13cffe2 100644 --- a/wp-includes/feed.php +++ b/wp-includes/feed.php @@ -178,21 +178,23 @@ function atom_enclosure() { } /** - * prep_atom_text_construct() - determine if given string of data is - * type text, html, or xhtml, per RFC 4287 section 3.1. + * prep_atom_text_construct() - Determine the type of a given string of data + * + * Tell whether the type is text, html, or xhtml, per RFC 4287 section 3.1. * * In the case of WordPress, text is defined as containing no markup, * xhtml is defined as "well formed", and html as tag soup (i.e., the rest). * * Container div tags are added to xhtml values, per section 3.1.1.3. * + * @link http://www.atomenabled.org/developers/syndication/atom-format-spec.php#rfc.section.3.1 + * * @package WordPress * @subpackage Feed * @since 2.4 * * @param string $data input string * @return array $result array(type, value) - * @link http://www.atomenabled.org/developers/syndication/atom-format-spec.php#rfc.section.3.1 */ function prep_atom_text_construct($data) { if (strpos($data, '<') === false && strpos($data, '&') === false) { @@ -205,12 +207,12 @@ function prep_atom_text_construct($data) { xml_parser_free($parser); if (!$code) { - if (strpos($data, '<') === false) { - return array('text', $data); - } else { - $data = "
$data
"; - return array('xhtml', $data); - } + if (strpos($data, '<') === false) { + return array('text', $data); + } else { + $data = "
$data
"; + return array('xhtml', $data); + } } if (strpos($data, ']]>') == false) {