Inheritances
Files
Overview
FRAMES
NO FRAMES

File formatting.php

Main Wordpress Formatting API.

Handles many functions for formatting output.
PackageWordPress

Summary

Functions
addslashes_gpc() Adds slashes to escape strings.
antispambot() Converts email addresses characters to HTML entities to block spam bots
attribute_escape() Escaping for HTML attributes
backslashit() Adds backslashes before letters and before a number at the start of a string
balanceTags() Will only balance the tags if forced to and the option is set to balance tags.
clean_pre() Accepts matches array from preg_replace_callback in wpautop() or a string.
clean_url() Checks and cleans a URL.
convert_chars() Converts a number of characters from a string.
convert_smilies() Convert text equivalent of smilies to images.
ent2ncr() Converts named entities into numbered entities
esc_attr() Escaping for HTML attributes
esc_html() Escaping for HTML blocks
esc_js() Escape single quotes, specialchar double quotes, and fix line endings.
esc_sql() Escapes data for use in a MySQL query
esc_url() Checks and cleans a URL.
esc_url_raw() Performs esc_url() for database usage
force_balance_tags() Balances tags of string using a modified stack
format_to_edit() Acts on text which is about to be edited.
format_to_post() Holder for the 'format_to_post' filter
funky_javascript_callback() Callback used to change %uXXXX to &#YYY; syntax
funky_javascript_fix() Fixes javascript bugs in browsers.
get_date_from_gmt() Converts a GMT date into the correct format for the blog.
get_gmt_from_date() Returns a date in the GMT equivalent.
htmlentities2() Convert entities, while preserving already-encoded entities
human_time_diff() Determines the difference between two timestamps.
iso8601_timezone_to_offset() Computes an offset in seconds from an iso8601 timezone
iso8601_to_datetime() Converts an iso8601 date to MySQL DateTime format used by post_date[_gmt]
is_email() Verifies that an email is valid.
js_escape() Escape single quotes, specialchar double quotes, and fix line endings.
like_escape() Escapes text for SQL LIKE special characters % and _
links_add_base_url() Add a Base url to relative links in passed content.
links_add_target() Adds a Target attribute to all links in passed content.
make_clickable() Convert plaintext URI to HTML links.
normalize_whitespace()
popuplinks() Adds a element attributes to open links in new windows.
remove_accents() Converts all accent characters to ASCII characters.
sanitize_email() Strips out all characters that are not allowable in an email
sanitize_file_name() Sanitizes a filename replacing whitespace with dashes
sanitize_html_class() Santizes a html classname to ensure it only contains valid characters
sanitize_option() Sanitises various option values based on the nature of the option.
sanitize_sql_orderby() Ensures a string is a valid SQL order by clause.
sanitize_title() Sanitizes title or use fallback title.
sanitize_title_with_dashes() Sanitizes title, replacing whitespace with dashes.
sanitize_url() Performs esc_url() for database or redirect usage
sanitize_user() Sanitize username stripping out unsafe characters.
seems_utf8() Checks to see if a string is utf8 encoded.
stripslashes_deep() Navigates through an array and removes slashes from the values.
tag_escape() Escape a HTML tag name
trailingslashit() Appends a trailing slash.
translate_smiley() Convert one smiley code to the icon graphic file equivalent.
untrailingslashit() Removes trailing slash if it exists.
urlencode_deep() Navigates through an array and encodes the values to be used in a URL.
utf8_uri_encode() Encode the Unicode values to be used in the URI
wpautop() Replaces double line-breaks with paragraph elements.
wptexturize() Replaces common plain text characters into formatted entities
wptexturize_pushpop_element()
wp_check_invalid_utf8() Checks for invalid UTF8 in a string
wp_htmledit_pre() Formats text for the HTML editor.
wp_html_excerpt() Safely extracts not more than the first $count characters from html string.
wp_iso_descrambler() Convert to ASCII from email subjects
wp_make_link_relative() Convert full URL paths to absolute paths.
wp_parse_str() Parses a string into variables to be stored in an array.
wp_pre_kses_less_than() Convert lone less than signs.
wp_pre_kses_less_than_callback() Callback function used by preg_replace
wp_rel_nofollow() Adds rel nofollow string to all HTML A elements in content
wp_rel_nofollow_callback() Callback to used to add rel=nofollow string to HTML A element.
wp_richedit_pre() Formats text for the rich text editor.
wp_specialchars() Escaping for HTML blocks
wp_specialchars_decode() Converts a number of HTML entities into their special characters.
wp_sprintf() WordPress implementation of PHP sprintf() with filters
wp_sprintf_l() Localize list items before the rest of the content.
wp_trim_excerpt() Generates an excerpt from the content, if needed.
zeroise() Add leading zeros when necessary.
_deep_replace() Perform a deep string replace operation to ensure the values in $search are no longer present
_links_add_base() Callback to add a base url to relative links in passed content
_links_add_target() Callback to add a target attribute to all links in passed content
_make_email_clickable_cb() Callback to convert email address match to HTML A element.
_make_url_clickable_cb() Callback to convert URI match to HTML A element.
_make_web_ftp_clickable_cb() Callback to convert URL match to HTML A element.
_wp_specialchars() Converts a number of special characters into their HTML entities.

Details

Functions

addslashes_gpc()
function addslashes_gpc( $gpc)
Adds slashes to escape strings.

Slashes will first be removed if magic_quotes_gpc is set, see {@link
http://www.php.net/magic_quotes} for more details.
Parameters
string $gpc The string returned from HTTP request data.
Returns string Returns a string escaped with slashes.
Since 0.71
antispambot()
function antispambot( $emailaddy
$mailto
)
Converts email addresses characters to HTML entities to block spam bots.
Parameters
string $emailaddy Email address.
int $mailto Optional. Range from 0 to 1. Used for encoding.
Returns string Converted email address.
Since 0.71
attribute_escape() Deprecated
function attribute_escape( $text)
Escaping for HTML attributes.
Parameters
string $text
Returns string
See also esc_attr()
Since 2.0.6
backslashit()
function backslashit( $string)
Adds backslashes before letters and before a number at the start of a string.
Parameters
string $string Value to which backslashes will be added.
Returns string String with backslashes inserted.
Since 0.71
balanceTags()
function balanceTags( $text
$force = false
)
Will only balance the tags if forced to and the option is set to balance tags.

The option 'use_balanceTags' is used for whether the tags will be balanced.
Both the $force parameter and 'use_balanceTags' option will have to be true
before the tags will be balanced.
Parameters
string $text Text to be balanced
bool $force Forces balancing, ignoring the value of the option. Default false.
Returns string Balanced text
Since 0.71
clean_pre()
function clean_pre( $matches)
Accepts matches array from preg_replace_callback in wpautop() or a string.

Ensures that the contents of a <
>...<
> HTML block are not
converted into paragraphs or line-breaks.
Parameters
array|string $matches The array or string
Returns string The pre block without paragraph/line-break conversion.
Since 1.2.0
clean_url()
function clean_url( $url
$protocols = null
$context = 'display'
)
Checks and cleans a URL.

A number of characters are removed from the URL. If the URL is for displaying
(the default behaviour) amperstands are also replaced. The 'esc_url' filter
is applied to the returned cleaned URL.
Parameters
string $url The URL to be cleaned.
array $protocols Optional. An array of acceptable protocols.
Defaults to 'http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet' if not set.
string $context Optional. How the URL will be used. Default is 'display'.
Returns string The cleaned $url after the 'cleaned_url' filter is applied.
Since 1.2.0
Uses wp_kses_bad_protocol() To only permit protocols in the URL set
via $protocols or the common ones set in the function.
convert_chars()
function convert_chars( $content
$deprecated = ''
)
Converts a number of characters from a string.

Metadata tags <> and <<category>> are removed, <<br>> and <<hr>> are<br /> converted into correct XHTML and Unicode characters are converted to the<br /> valid range.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>string $content</code></td> <td valign='top'><span class='paramDescription'>String of characters to be converted. </span></td></tr> <tr><td valign='top'><code class='paramName2'>string $deprecated</code></td> <td valign='top'><span class='paramDescription'>Not used. </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string Converted string.</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>0.71</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line767'>wp-includes/formatting.php</strong>, line <strong>767</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_convert_smilies'> convert_smilies()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>convert_smilies</code>(</td> <td valign = 'top'> <code class='paramName1'>$text</code>) </td></tr></table> <div class='contents'> <div class='description'>Convert text equivalent of smilies to images.<br /> <br /> Will only convert smilies if the option 'use_smilies' is true and the global<br /> used in the function isn't empty.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>string $text</code></td> <td valign='top'><span class='paramDescription'>Content to convert smilies from text. </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string Converted content with text smilies replaced with images.</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>0.71</span></div> <div><span class='tagTitle'>Uses</span> <span class='otherTagsValue'>$wp_smiliessearch</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line1337'>wp-includes/formatting.php</strong>, line <strong>1337</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_ent2ncr'> ent2ncr()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>ent2ncr</code>(</td> <td valign = 'top'> <code class='paramName1'>$text</code>) </td></tr></table> <div class='contents'> <div class='description'>Converts named entities into numbered entities.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>string $text</code></td> <td valign='top'><span class='paramDescription'>The text within which entities will be converted. </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string Text with converted entities.</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>1.5.1</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line1719'>wp-includes/formatting.php</strong>, line <strong>1719</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_esc_attr'> esc_attr()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>esc_attr</code>(</td> <td valign = 'top'> <code class='paramName1'>$text</code>) </td></tr></table> <div class='contents'> <div class='description'>Escaping for HTML attributes.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>string $text</code></td> <td valign='top'><span class='paramDescription'> </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>2.8.0</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line2255'>wp-includes/formatting.php</strong>, line <strong>2255</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_esc_html'> esc_html()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>esc_html</code>(</td> <td valign = 'top'> <code class='paramName1'>$text</code>) </td></tr></table> <div class='contents'> <div class='description'>Escaping for HTML blocks.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>string $text</code></td> <td valign='top'><span class='paramDescription'> </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>2.8.0</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line2226'>wp-includes/formatting.php</strong>, line <strong>2226</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_esc_js'> esc_js()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>esc_js</code>(</td> <td valign = 'top'> <code class='paramName1'>$text</code>) </td></tr></table> <div class='contents'> <div class='description'>Escape single quotes, specialchar double quotes, and fix line endings.<br /> <br /> The filter 'js_escape' is also applied here.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>string $text</code></td> <td valign='top'><span class='paramDescription'>The text to be escaped. </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string Escaped text.</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>2.8.0</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line2193'>wp-includes/formatting.php</strong>, line <strong>2193</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_esc_sql'> esc_sql()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>esc_sql</code>(</td> <td valign = 'top'> <code class='paramName1'>$sql</code>) </td></tr></table> <div class='contents'> <div class='description'>Escapes data for use in a MySQL query<br /> <br /> This is just a handy shortcut for $<code><a href='wpdb.class.html'>wpdb</a></code>->escape(), for completeness' sake</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>string $sql</code></td> <td valign='top'><span class='paramDescription'>Unescaped SQL data </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string The cleaned $sql</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>2.8.0</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line2108'>wp-includes/formatting.php</strong>, line <strong>2108</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_esc_url'> esc_url()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>esc_url</code>(</td> <td valign = 'top'> <code class='paramName1'>$url<br/>$protocols = null</code>) </td></tr></table> <div class='contents'> <div class='description'>Checks and cleans a URL.<br /> <br /> A number of characters are removed from the URL. If the URL is for displaying<br /> (the default behaviour) amperstands are also replaced. The 'esc_url' filter<br /> is applied to the returned cleaned URL.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>string $url</code></td> <td valign='top'><span class='paramDescription'>The URL to be cleaned. </span></td></tr> <tr><td valign='top'><code class='paramName2'>array $protocols</code></td> <td valign='top'><span class='paramDescription'>Optional. An array of acceptable protocols.<br /> Defaults to 'http', 'https', '<code><a href='../wp-admin/includes/ftp.class.html'>ftp</a></code>', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet' if not set. </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string The cleaned $url after the 'cleaned_url' filter is applied.</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>2.8.0</span></div> <div><span class='tagTitle'>Uses</span> <span class='otherTagsValue'>esc_url()</span></div> <div><span class='tagTitle'>Uses</span> <span class='otherTagsValue'>wp_kses_bad_protocol() To only permit protocols in the URL set<br /> via $protocols or the common ones set in the function.</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line2131'>wp-includes/formatting.php</strong>, line <strong>2131</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_esc_url_raw'> esc_url_raw()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>esc_url_raw</code>(</td> <td valign = 'top'> <code class='paramName1'>$url<br/>$protocols = null</code>) </td></tr></table> <div class='contents'> <div class='description'>Performs esc_url() for database usage.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>string $url</code></td> <td valign='top'><span class='paramDescription'>The URL to be cleaned. </span></td></tr> <tr><td valign='top'><code class='paramName2'>array $protocols</code></td> <td valign='top'><span class='paramDescription'>An array of acceptable protocols. </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string The cleaned URL.</span></div> <div><span class='tagTitle'>See also</span> <span class='otherTagsValue'>esc_url()</span></div> <div><span class='tagTitle'>See also</span> <span class='otherTagsValue'>esc_url()</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>2.8.0</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line2147'>wp-includes/formatting.php</strong>, line <strong>2147</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_force_balance_tags'> force_balance_tags()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>force_balance_tags</code>(</td> <td valign = 'top'> <code class='paramName1'>$text</code>) </td></tr></table> <div class='contents'> <div class='description'>Balances tags of string using a modified stack.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>string $text</code></td> <td valign='top'><span class='paramDescription'>Text to be balanced. </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string Balanced text.</span></div> <div><span class='tagTitle'>Author</span> <span class='otherTagsValue'>Leonard Lin <leonard@acm.org></span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>2.0.4</span></div> <div><span class='tagTitle'>Version</span> <span class='otherTagsValue'>1.1</span></div> <div><span class='tagTitle'>To do</span> <span class='otherTagsValue'>Make better - change loop condition to $text in 1.2</span></div> <div><span class='tagTitle'>License</span> <span class='otherTagsValue'>GPL v2.0</span></div> <div><span class='tagTitle'>Copyright</span> <span class='otherTagsValue'>November 4, 2001</span></div> <div><span class='tagTitle'>Internal</span> <span class='otherTagsValue'>Modified by Scott Reilly (coffee2code) 02 Aug 2004<br /> 1.1 Fixed handling of append/stack pop order of end text<br /> Added Cleaning Hooks<br /> 1.0 First Version</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line894'>wp-includes/formatting.php</strong>, line <strong>894</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_format_to_edit'> format_to_edit()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>format_to_edit</code>(</td> <td valign = 'top'> <code class='paramName1'>$content<br/>$richedit = false</code>) </td></tr></table> <div class='contents'> <div class='description'>Acts on text which is about to be edited.<br /> <br /> Unless $richedit is set, it is simply a holder for the 'format_to_edit'<br /> filter. If $richedit is set true htmlspecialchars() will be run on the<br /> content, converting special characters to HTMl entities.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>string $content</code></td> <td valign='top'><span class='paramDescription'>The text about to be edited. </span></td></tr> <tr><td valign='top'><code class='paramName2'>bool $richedit</code></td> <td valign='top'><span class='paramDescription'>Whether or not the $content should pass through htmlspecialchars(). Default false. </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string The text after the filter (and possibly htmlspecialchars()) has been run.</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>0.71</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line1006'>wp-includes/formatting.php</strong>, line <strong>1006</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_format_to_post'> format_to_post()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>format_to_post</code>(</td> <td valign = 'top'> <code class='paramName1'>$content</code>) </td></tr></table> <div class='contents'> <div class='description'>Holder for the 'format_to_post' filter.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>string $content</code></td> <td valign='top'><span class='paramDescription'>The text to pass through the filter. </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string Text returned from the 'format_to_post' filter.</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>0.71</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line1021'>wp-includes/formatting.php</strong>, line <strong>1021</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_funky_javascript_callback'> funky_javascript_callback()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>funky_javascript_callback</code>(</td> <td valign = 'top'> <code class='paramName1'>$matches</code>) </td></tr></table> <div class='contents'> <div class='description'>Callback used to change %uXXXX to &#YYY; syntax</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>array $matches</code></td> <td valign='top'><span class='paramDescription'>Single Match </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string An HTML entity</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>2.8?</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line829'>wp-includes/formatting.php</strong>, line <strong>829</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_funky_javascript_fix'> funky_javascript_fix()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>funky_javascript_fix</code>(</td> <td valign = 'top'> <code class='paramName1'>$text</code>) </td></tr></table> <div class='contents'> <div class='description'>Fixes javascript bugs in browsers.<br /> <br /> Converts unicode characters to HTML numbered entities.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>string $text</code></td> <td valign='top'><span class='paramDescription'>Text to be made safe. </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string Fixed text.</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>1.5.0</span></div> <div><span class='tagTitle'>Uses</span> <span class='otherTagsValue'>$is_macIE</span></div> <div><span class='tagTitle'>Uses</span> <span class='otherTagsValue'>$is_winIE</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line845'>wp-includes/formatting.php</strong>, line <strong>845</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_get_date_from_gmt'> get_date_from_gmt()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>get_date_from_gmt</code>(</td> <td valign = 'top'> <code class='paramName1'>$string</code>) </td></tr></table> <div class='contents'> <div class='description'>Converts a GMT date into the correct format for the blog.<br /> <br /> Requires and returns in the Y-m-d H:i:s format. Simply adds the value of<br /> gmt_offset.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>string $string</code></td> <td valign='top'><span class='paramDescription'>The date to be converted. </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string Formatted date relative to the GMT offset.</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>1.2.0</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line1481'>wp-includes/formatting.php</strong>, line <strong>1481</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_get_gmt_from_date'> get_gmt_from_date()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>get_gmt_from_date</code>(</td> <td valign = 'top'> <code class='paramName1'>$string</code>) </td></tr></table> <div class='contents'> <div class='description'>Returns a date in the GMT equivalent.<br /> <br /> Requires and returns a date in the Y-m-d H:i:s format. Simply subtracts the<br /> value of the 'gmt_offset' option.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>string $string</code></td> <td valign='top'><span class='paramDescription'>The date to be converted. </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string GMT version of the date provided.</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>1.2.0</span></div> <div><span class='tagTitle'>Uses</span> <span class='otherTagsValue'>get_option() to retrieve the the value of 'gmt_offset'.</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line1463'>wp-includes/formatting.php</strong>, line <strong>1463</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_htmlentities2'> htmlentities2()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>htmlentities2</code>(</td> <td valign = 'top'> <code class='paramName1'>$myHTML</code>) </td></tr></table> <div class='contents'> <div class='description'>Convert entities, while preserving already-encoded entities.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>string $myHTML</code></td> <td valign='top'><span class='paramDescription'>The text to be converted. </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string Converted text.</span></div> <div><span class='tagTitle'>See also</span> <span class='otherTagsValue'>http://www.php.net/htmlentities Borrowed from the PHP Manual user notes.</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>1.2.2</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line2177'>wp-includes/formatting.php</strong>, line <strong>2177</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_human_time_diff'> human_time_diff()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>human_time_diff</code>(</td> <td valign = 'top'> <code class='paramName1'>$from<br/>$to = ''</code>) </td></tr></table> <div class='contents'> <div class='description'>Determines the difference between two timestamps.<br /> <br /> The difference is returned in a human readable format such as "1 hour",<br /> "5 mins", "2 days".</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>int $from</code></td> <td valign='top'><span class='paramDescription'>Unix timestamp from which the difference begins. </span></td></tr> <tr><td valign='top'><code class='paramName2'>int $to</code></td> <td valign='top'><span class='paramDescription'>Optional. Unix timestamp to end the time difference. Default becomes time() if not set. </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string Human readable time difference.</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>1.5.0</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line1652'>wp-includes/formatting.php</strong>, line <strong>1652</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_iso8601_timezone_to_offset'> iso8601_timezone_to_offset()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>iso8601_timezone_to_offset</code>(</td> <td valign = 'top'> <code class='paramName1'>$timezone</code>) </td></tr></table> <div class='contents'> <div class='description'>Computes an offset in seconds from an iso8601 timezone.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>string $timezone</code></td> <td valign='top'><span class='paramDescription'>Either 'Z' for 0 offset or '±hhmm'. </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>int|float The offset in seconds.</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>1.5.0</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line1496'>wp-includes/formatting.php</strong>, line <strong>1496</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_iso8601_to_datetime'> iso8601_to_datetime()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>iso8601_to_datetime</code>(</td> <td valign = 'top'> <code class='paramName1'>$date_string<br/>$timezone = 'user'</code>) </td></tr></table> <div class='contents'> <div class='description'>Converts an iso8601 date to MySQL DateTime format used by post_date[_gmt].</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>string $date_string</code></td> <td valign='top'><span class='paramDescription'>Date and time in ISO 8601 format <a href='http://en.wikipedia.org/wiki/ISO_8601'>http://en.wikipedia.org/wiki/ISO_8601</a>. </span></td></tr> <tr><td valign='top'><code class='paramName2'>string $timezone</code></td> <td valign='top'><span class='paramDescription'>Optional. If set to GMT returns the time minus gmt_offset. Default is 'user'. </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string The date and time in MySQL DateTime format - Y-m-d H:i:s.</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>1.5.0</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line1518'>wp-includes/formatting.php</strong>, line <strong>1518</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_is_email'> is_email()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>is_email</code>(</td> <td valign = 'top'> <code class='paramName1'>$email<br/>$check_dns = false</code>) </td></tr></table> <div class='contents'> <div class='description'>Verifies that an email is valid.<br /> <br /> Does not grok i18n domains. Not RFC compliant.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>string $email</code></td> <td valign='top'><span class='paramDescription'>Email address to verify. </span></td></tr> <tr><td valign='top'><code class='paramName2'>boolean $check_dns</code></td> <td valign='top'><span class='paramDescription'>Whether to check the DNS for the domain using checkdnsrr(). </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string|bool Either false or the valid email address.</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>0.71</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line1369'>wp-includes/formatting.php</strong>, line <strong>1369</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title deprecated'><a name='det_methods_js_escape'> js_escape()</a></span> <span class='deprecatedWord'>Deprecated</span> </div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>js_escape</code>(</td> <td valign = 'top'> <code class='paramName1'>$text</code>) </td></tr></table> <div class='contents'> <div class='description'>Escape single quotes, specialchar double quotes, and fix line endings.<br /> <br /> The filter 'js_escape' is also applied by esc_js()</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>string $text</code></td> <td valign='top'><span class='paramDescription'>The text to be escaped. </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string Escaped text.</span></div> <div><span class='tagTitle'>See also</span> <span class='otherTagsValue'>esc_js()</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>2.0.4</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line2214'>wp-includes/formatting.php</strong>, line <strong>2214</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_like_escape'> like_escape()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>like_escape</code>(</td> <td valign = 'top'> <code class='paramName1'>$text</code>) </td></tr></table> <div class='contents'> <div class='description'>Escapes text for SQL LIKE special characters % and _.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>string $text</code></td> <td valign='top'><span class='paramDescription'>The text to be escaped. </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string text, safe for inclusion in LIKE query.</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>2.5.0</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line2297'>wp-includes/formatting.php</strong>, line <strong>2297</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_links_add_base_url'> links_add_base_url()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>links_add_base_url</code>(</td> <td valign = 'top'> <code class='paramName1'>$content<br/>$base<br/>$attrs = array('src'<br/></code>) </td></tr></table> <div class='contents'> <div class='description'>Add a Base url to relative links in passed content.<br /> <br /> By default it supports the 'src' and 'href' attributes. However this can be<br /> changed via the 3rd param.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>string $content</code></td> <td valign='top'><span class='paramDescription'>String to search for links in. </span></td></tr> <tr><td valign='top'><code class='paramName2'>string $base</code></td> <td valign='top'><span class='paramDescription'>The base URL to prefix to links. </span></td></tr> <tr><td valign='top'><code class='paramName2'>array $attrs</code></td> <td valign='top'><span class='paramDescription'>The attributes which should be processed. </span></td></tr> <tr><td valign='top'><code class='paramName2'></code></td> <td valign='top'><span class='paramDescription'></span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string The processed content.</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>2.7.0</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line2605'>wp-includes/formatting.php</strong>, line <strong>2605</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_links_add_target'> links_add_target()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>links_add_target</code>(</td> <td valign = 'top'> <code class='paramName1'>$content<br/>$target = '_blank'<br/>$tags = array('a')</code>) </td></tr></table> <div class='contents'> <div class='description'>Adds a Target attribute to all links in passed content.<br /> <br /> This function by default only applies to <a> tags, however this can be<br /> modified by the 3rd param.<br /> <br /> <b>NOTE:</b> Any current target attributed will be striped and replaced.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>string $content</code></td> <td valign='top'><span class='paramDescription'>String to search for links in. </span></td></tr> <tr><td valign='top'><code class='paramName2'>string $target</code></td> <td valign='top'><span class='paramDescription'>The Target to add to the links. </span></td></tr> <tr><td valign='top'><code class='paramName2'>array $tags</code></td> <td valign='top'><span class='paramDescription'>An array of tags to apply to. </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string The processed content.</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>2.7.0</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line2646'>wp-includes/formatting.php</strong>, line <strong>2646</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_make_clickable'> make_clickable()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>make_clickable</code>(</td> <td valign = 'top'> <code class='paramName1'>$ret</code>) </td></tr></table> <div class='contents'> <div class='description'>Convert plaintext URI to HTML links.<br /> <br /> Converts URI, www and <code><a href='../wp-admin/includes/ftp.class.html'>ftp</a></code>, and email addresses. Finishes by fixing links<br /> within links.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>string $ret</code></td> <td valign='top'><span class='paramDescription'>Content to convert URIs. </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string Content with converted URIs.</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>0.71</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line1249'>wp-includes/formatting.php</strong>, line <strong>1249</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_normalize_whitespace'> normalize_whitespace()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>normalize_whitespace</code>(</td> <td valign = 'top'> <code class='paramName1'>$str</code>) </td></tr></table> <div class='contents'> <div class='description'></div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>$str</code></td> <td valign='top'><span class='paramDescription'></span></td></tr> </table> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line2669'>wp-includes/formatting.php</strong>, line <strong>2669</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_popuplinks'> popuplinks()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>popuplinks</code>(</td> <td valign = 'top'> <code class='paramName1'>$text</code>) </td></tr></table> <div class='contents'> <div class='description'>Adds a element attributes to open links in new windows.<br /> <br /> Comment text in popup windows should be filtered through this. Right now it's<br /> a moderately dumb function, ideally it would detect whether a target or rel<br /> attribute was already there and adjust its actions accordingly.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>string $text</code></td> <td valign='top'><span class='paramDescription'>Content to replace links to open in a new window. </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string Content that has filtered links.</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>0.71</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line1553'>wp-includes/formatting.php</strong>, line <strong>1553</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_remove_accents'> remove_accents()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>remove_accents</code>(</td> <td valign = 'top'> <code class='paramName1'>$string</code>) </td></tr></table> <div class='contents'> <div class='description'>Converts all accent characters to ASCII characters.<br /> <br /> If there are no accent characters, then the string given is just returned.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>string $string</code></td> <td valign='top'><span class='paramDescription'>Text that might have accent characters </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string Filtered string with replaced "nice" characters.</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>1.2.1</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line457'>wp-includes/formatting.php</strong>, line <strong>457</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_sanitize_email'> sanitize_email()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>sanitize_email</code>(</td> <td valign = 'top'> <code class='paramName1'>$email</code>) </td></tr></table> <div class='contents'> <div class='description'>Strips out all characters that are not allowable in an email.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>string $email</code></td> <td valign='top'><span class='paramDescription'>Email address to filter. </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string Filtered email address.</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>1.5.0</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line1566'>wp-includes/formatting.php</strong>, line <strong>1566</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_sanitize_file_name'> sanitize_file_name()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>sanitize_file_name</code>(</td> <td valign = 'top'> <code class='paramName1'>$filename</code>) </td></tr></table> <div class='contents'> <div class='description'>Sanitizes a filename replacing whitespace with dashes<br /> <br /> Removes special characters that are illegal in filenames on certain<br /> operating systems and special characters requiring special escaping<br /> to manipulate at the command line. Replaces spaces and consecutive<br /> dashes with a single dash. Trim period, dash and underscore from beginning<br /> and end of filename.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>string $filename</code></td> <td valign='top'><span class='paramDescription'>The filename to be sanitized </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string The sanitized filename</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>2.1.0</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line601'>wp-includes/formatting.php</strong>, line <strong>601</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_sanitize_html_class'> sanitize_html_class()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>sanitize_html_class</code>(</td> <td valign = 'top'> <code class='paramName1'>$class<br/>$fallback</code>) </td></tr></table> <div class='contents'> <div class='description'>Santizes a html classname to ensure it only contains valid characters<br /> <br /> Strips the string down to A-Z,a-z,0-9,'-' if this results in an empty<br /> string then it will return the alternative value supplied.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>string $class</code></td> <td valign='top'><span class='paramDescription'>The classname to be sanitized </span></td></tr> <tr><td valign='top'><code class='paramName2'>string $fallback</code></td> <td valign='top'><span class='paramDescription'>The value to return if the sanitization end's up as an empty string. </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string The sanitized value</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>2.8.0</span></div> <div><span class='tagTitle'>To do</span> <span class='otherTagsValue'>Expand to support the full range of CDATA that a class attribute can contain.</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line741'>wp-includes/formatting.php</strong>, line <strong>741</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_sanitize_option'> sanitize_option()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>sanitize_option</code>(</td> <td valign = 'top'> <code class='paramName1'>$option<br/>$value</code>) </td></tr></table> <div class='contents'> <div class='description'>Sanitises various option values based on the nature of the option.<br /> <br /> This is basically a switch statement which will pass $value through a number<br /> of functions depending on the $option.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>string $option</code></td> <td valign='top'><span class='paramDescription'>The name of the option. </span></td></tr> <tr><td valign='top'><code class='paramName2'>string $value</code></td> <td valign='top'><span class='paramDescription'>The unsanitised value. </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string Sanitized value.</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>2.0.5</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line2328'>wp-includes/formatting.php</strong>, line <strong>2328</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_sanitize_sql_orderby'> sanitize_sql_orderby()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>sanitize_sql_orderby</code>(</td> <td valign = 'top'> <code class='paramName1'>$orderby</code>) </td></tr></table> <div class='contents'> <div class='description'>Ensures a string is a valid SQL order by clause.<br /> <br /> Accepts one or more columns, with or without ASC/DESC, and also accepts<br /> RAND().</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>string $orderby</code></td> <td valign='top'><span class='paramDescription'>Order by string to be checked. </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string|false Returns the order by clause if it is a match, false otherwise.</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>2.5.1</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line720'>wp-includes/formatting.php</strong>, line <strong>720</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_sanitize_title'> sanitize_title()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>sanitize_title</code>(</td> <td valign = 'top'> <code class='paramName1'>$title<br/>$fallback_title = ''</code>) </td></tr></table> <div class='contents'> <div class='description'>Sanitizes title or use fallback title.<br /> <br /> Specifically, HTML and PHP tags are stripped. Further actions can be added<br /> via the plugin API. If $title is empty and $fallback_title is set, the latter<br /> will be used.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>string $title</code></td> <td valign='top'><span class='paramDescription'>The string to be sanitized. </span></td></tr> <tr><td valign='top'><code class='paramName2'>string $fallback_title</code></td> <td valign='top'><span class='paramDescription'>Optional. A title to use if $title is empty. </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string The sanitized string.</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>1.0.0</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line659'>wp-includes/formatting.php</strong>, line <strong>659</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_sanitize_title_with_dashes'> sanitize_title_with_dashes()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>sanitize_title_with_dashes</code>(</td> <td valign = 'top'> <code class='paramName1'>$title</code>) </td></tr></table> <div class='contents'> <div class='description'>Sanitizes title, replacing whitespace with dashes.<br /> <br /> Limits the output to alphanumeric characters, underscore (_) and dash (-).<br /> Whitespace becomes a dash.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>string $title</code></td> <td valign='top'><span class='paramDescription'>The title to be sanitized. </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string The sanitized title.</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>1.2.0</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line681'>wp-includes/formatting.php</strong>, line <strong>681</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title deprecated'><a name='det_methods_sanitize_url'> sanitize_url()</a></span> <span class='deprecatedWord'>Deprecated</span> </div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>sanitize_url</code>(</td> <td valign = 'top'> <code class='paramName1'>$url<br/>$protocols = null</code>) </td></tr></table> <div class='contents'> <div class='description'>Performs esc_url() for database or redirect usage.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>string $url</code></td> <td valign='top'><span class='paramDescription'>The URL to be cleaned. </span></td></tr> <tr><td valign='top'><code class='paramName2'>array $protocols</code></td> <td valign='top'><span class='paramDescription'>An array of acceptable protocols. </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string The cleaned URL.</span></div> <div><span class='tagTitle'>See also</span> <span class='otherTagsValue'>esc_url()</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>2.3.1</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line2163'>wp-includes/formatting.php</strong>, line <strong>2163</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_sanitize_user'> sanitize_user()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>sanitize_user</code>(</td> <td valign = 'top'> <code class='paramName1'>$username<br/>$strict = false</code>) </td></tr></table> <div class='contents'> <div class='description'>Sanitize username stripping out unsafe characters.<br /> <br /> If $strict is true, only alphanumeric characters (as well as _, space, ., -,</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>string $username</code></td> <td valign='top'><span class='paramDescription'>The username to be sanitized. </span></td></tr> <tr><td valign='top'><code class='paramName2'>bool $strict</code></td> <td valign='top'><span class='paramDescription'>If set limits $username to specific characters. Default false. </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string The sanitized username, after passing through filters.</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>2.0.0</span></div> <div><span class='tagTitle'>Are</span> <span class='otherTagsValue'>returned.<br /> Removes tags, octets, entities, and if strict is enabled, will remove all<br /> non-ASCII characters. After sanitizing, it passes the username, raw username<br /> (the username in the parameter), and the strict parameter as parameters for<br /> the filter.</span></div> <div><span class='tagTitle'>Uses</span> <span class='otherTagsValue'>apply_filters() Calls 'sanitize_user' hook on username, raw username,<br /> and $strict parameter.</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line629'>wp-includes/formatting.php</strong>, line <strong>629</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_seems_utf8'> seems_utf8()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>seems_utf8</code>(</td> <td valign = 'top'> <code class='paramName1'>$str</code>) </td></tr></table> <div class='contents'> <div class='description'>Checks to see if a string is utf8 encoded.<br /> <br /> NOTE: This function checks for 5-Byte sequences, UTF8<br /> has Bytes Sequences with a maximum length of 4.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>string $str</code></td> <td valign='top'><span class='paramDescription'>The string to be checked </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>bool True if $str fits a UTF-8 model, false otherwise.</span></div> <div><span class='tagTitle'>Author</span> <span class='otherTagsValue'>bmorel at ssi dot fr (modified)</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>1.2.1</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line190'>wp-includes/formatting.php</strong>, line <strong>190</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_stripslashes_deep'> stripslashes_deep()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>stripslashes_deep</code>(</td> <td valign = 'top'> <code class='paramName1'>$value</code>) </td></tr></table> <div class='contents'> <div class='description'>Navigates through an array and removes slashes from the values.<br /> <br /> If an array is passed, the array_map() function causes a callback to pass the<br /> value back to the function. The slashes from this value will removed.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>array|string $value</code></td> <td valign='top'><span class='paramDescription'>The array or string to be striped. </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>array|string Stripped array (or string in the callback).</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>2.0.0</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line1127'>wp-includes/formatting.php</strong>, line <strong>1127</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_tag_escape'> tag_escape()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>tag_escape</code>(</td> <td valign = 'top'> <code class='paramName1'>$tag_name</code>) </td></tr></table> <div class='contents'> <div class='description'>Escape a HTML tag name.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>string $tag_name</code></td> <td valign='top'><span class='paramDescription'> </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>2.5.0</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line2284'>wp-includes/formatting.php</strong>, line <strong>2284</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_trailingslashit'> trailingslashit()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>trailingslashit</code>(</td> <td valign = 'top'> <code class='paramName1'>$string</code>) </td></tr></table> <div class='contents'> <div class='description'>Appends a trailing slash.<br /> <br /> Will remove trailing slash if it exists already before adding a trailing<br /> slash. This prevents double slashing a string or path.<br /> <br /> The primary use of this is for paths and thus should be used for paths. It is<br /> not restricted to paths and offers no specific path support.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>string $string</code></td> <td valign='top'><span class='paramDescription'>What to add the trailing slash to. </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string String with trailing slash added.</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>1.2.0</span></div> <div><span class='tagTitle'>Uses</span> <span class='otherTagsValue'>untrailingslashit() Unslashes string if it was slashed already.</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line1076'>wp-includes/formatting.php</strong>, line <strong>1076</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_translate_smiley'> translate_smiley()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>translate_smiley</code>(</td> <td valign = 'top'> <code class='paramName1'>$smiley</code>) </td></tr></table> <div class='contents'> <div class='description'>Convert one smiley code to the icon graphic file equivalent.<br /> <br /> Looks up one smiley code in the $wpsmiliestrans global array and returns an<br /> <img> string for that smiley.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>string $smiley</code></td> <td valign='top'><span class='paramDescription'>Smiley code to convert to image. </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string Image string for smiley.</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>2.8.0</span></div> <div><span class='tagTitle'>Global</span> <span class='otherTagsValue'>array $wpsmiliestrans</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line1308'>wp-includes/formatting.php</strong>, line <strong>1308</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_untrailingslashit'> untrailingslashit()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>untrailingslashit</code>(</td> <td valign = 'top'> <code class='paramName1'>$string</code>) </td></tr></table> <div class='contents'> <div class='description'>Removes trailing slash if it exists.<br /> <br /> The primary use of this is for paths and thus should be used for paths. It is<br /> not restricted to paths and offers no specific path support.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>string $string</code></td> <td valign='top'><span class='paramDescription'>What to remove the trailing slash from. </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string String without the trailing slash.</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>2.2.0</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line1091'>wp-includes/formatting.php</strong>, line <strong>1091</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_urlencode_deep'> urlencode_deep()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>urlencode_deep</code>(</td> <td valign = 'top'> <code class='paramName1'>$value</code>) </td></tr></table> <div class='contents'> <div class='description'>Navigates through an array and encodes the values to be used in a URL.<br /> <br /> Uses a callback to pass the value of the array back to the function as a<br /> string.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>array|string $value</code></td> <td valign='top'><span class='paramDescription'>The array or string to be encoded. </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>array|string $value The encoded array (or string from the callback).</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>2.2.0</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line1143'>wp-includes/formatting.php</strong>, line <strong>1143</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_utf8_uri_encode'> utf8_uri_encode()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>utf8_uri_encode</code>(</td> <td valign = 'top'> <code class='paramName1'>$utf8_string<br/>$length</code>) </td></tr></table> <div class='contents'> <div class='description'>Encode the Unicode values to be used in the URI.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>string $utf8_string</code></td> <td valign='top'><span class='paramDescription'> </span></td></tr> <tr><td valign='top'><code class='paramName2'>int $length</code></td> <td valign='top'><span class='paramDescription'>Max length of the string </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string String with Unicode encoded for URI.</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>1.5.0</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line406'>wp-includes/formatting.php</strong>, line <strong>406</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_wpautop'> wpautop()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>wpautop</code>(</td> <td valign = 'top'> <code class='paramName1'>$pee<br/>$br = 1</code>) </td></tr></table> <div class='contents'> <div class='description'>Replaces double line-breaks with paragraph elements.<br /> <br /> A group of regex replaces used to identify text formatted with newlines and<br /> replace double line-breaks with HTML paragraph tags. The remaining<br /> line-breaks after conversion become <<br />> tags, unless $br is set to '0'<br /> or 'false'.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>string $pee</code></td> <td valign='top'><span class='paramDescription'>The text which has to be formatted. </span></td></tr> <tr><td valign='top'><code class='paramName2'>int|bool $br</code></td> <td valign='top'><span class='paramDescription'>Optional. If set, this will convert all remaining line-breaks after paragraphing. Default true. </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string Text which has been converted into correct paragraph tags.</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>0.71</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line135'>wp-includes/formatting.php</strong>, line <strong>135</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_wptexturize'> wptexturize()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>wptexturize</code>(</td> <td valign = 'top'> <code class='paramName1'>$text</code>) </td></tr></table> <div class='contents'> <div class='description'>Replaces common plain text characters into formatted entities<br /> <br /> As an example,<br /> <code><br /> 'cause today's effort makes it worth tomorrow's "holiday"...<br /> </code><br /> Becomes:<br /> <code><br /> ’cause today’s effort makes it worth tomorrow’s “holiday”…<br /> </code><br /> Code within certain html blocks are skipped.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>string $text</code></td> <td valign='top'><span class='paramDescription'>The text to be formatted </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string The string replaced with html entities</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>0.71</span></div> <div><span class='tagTitle'>Uses</span> <span class='otherTagsValue'>$wp_cockneyreplace Array of formatted entities for certain common phrases</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line29'>wp-includes/formatting.php</strong>, line <strong>29</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_wptexturize_pushpop_element'> wptexturize_pushpop_element()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>wptexturize_pushpop_element</code>(</td> <td valign = 'top'> <code class='paramName1'>$text<br/>&$stack<br/>$disabled_elements<br/>$opening = '<'<br/>$closing = '>'</code>) </td></tr></table> <div class='contents'> <div class='description'></div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>$text</code></td> <td valign='top'><span class='paramDescription'></span></td></tr> <tr><td valign='top'><code class='paramName2'>$stack</code></td> <td valign='top'><span class='paramDescription'></span></td></tr> <tr><td valign='top'><code class='paramName2'>$disabled_elements</code></td> <td valign='top'><span class='paramDescription'></span></td></tr> <tr><td valign='top'><code class='paramName2'>$opening</code></td> <td valign='top'><span class='paramDescription'></span></td></tr> <tr><td valign='top'><code class='paramName2'>$closing</code></td> <td valign='top'><span class='paramDescription'></span></td></tr> </table> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line82'>wp-includes/formatting.php</strong>, line <strong>82</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_wp_check_invalid_utf8'> wp_check_invalid_utf8()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>wp_check_invalid_utf8</code>(</td> <td valign = 'top'> <code class='paramName1'>$string<br/>$strip = false</code>) </td></tr></table> <div class='contents'> <div class='description'>Checks for invalid UTF8 in a string.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>string $string</code></td> <td valign='top'><span class='paramDescription'>The text which is to be checked. </span></td></tr> <tr><td valign='top'><code class='paramName2'>boolean $strip</code></td> <td valign='top'><span class='paramDescription'>Optional. Whether to attempt to strip out invalid UTF8. Default is false. </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string The checked text.</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>2.8</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line358'>wp-includes/formatting.php</strong>, line <strong>358</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_wp_htmledit_pre'> wp_htmledit_pre()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>wp_htmledit_pre</code>(</td> <td valign = 'top'> <code class='paramName1'>$output</code>) </td></tr></table> <div class='contents'> <div class='description'>Formats text for the HTML editor.<br /> <br /> Unless $output is empty it will pass through htmlspecialchars before the<br /> 'htmledit_pre' filter is applied.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>string $output</code></td> <td valign='top'><span class='paramDescription'>The text to be formatted. </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string Formatted text after filter applied.</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>2.5.0</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line2016'>wp-includes/formatting.php</strong>, line <strong>2016</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_wp_html_excerpt'> wp_html_excerpt()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>wp_html_excerpt</code>(</td> <td valign = 'top'> <code class='paramName1'>$str<br/>$count</code>) </td></tr></table> <div class='contents'> <div class='description'>Safely extracts not more than the first $count characters from html string.<br /> <br /> UTF-8, tags and entities safe prefix extraction. Entities inside will *NOT*<br /> be counted as one character. For example & will be counted as 4, < as<br /> 3, etc.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>integer $str</code></td> <td valign='top'><span class='paramDescription'>String to get the excerpt from. </span></td></tr> <tr><td valign='top'><code class='paramName2'>integer $count</code></td> <td valign='top'><span class='paramDescription'>Maximum number of characters to take. </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string The excerpt.</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>2.5.0</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line2584'>wp-includes/formatting.php</strong>, line <strong>2584</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_wp_iso_descrambler'> wp_iso_descrambler()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>wp_iso_descrambler</code>(</td> <td valign = 'top'> <code class='paramName1'>$string</code>) </td></tr></table> <div class='contents'> <div class='description'>Convert to ASCII from email subjects.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>string $string</code></td> <td valign='top'><span class='paramDescription'>Subject line </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string Converted string to ASCII</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>1.2.0</span></div> <div><span class='tagTitle'>Usedby</span> <span class='otherTagsValue'>wp_mail() handles charsets in email subjects</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line1440'>wp-includes/formatting.php</strong>, line <strong>1440</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_wp_make_link_relative'> wp_make_link_relative()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>wp_make_link_relative</code>(</td> <td valign = 'top'> <code class='paramName1'>$link</code>) </td></tr></table> <div class='contents'> <div class='description'>Convert full URL paths to absolute paths.<br /> <br /> Removes the http or https protocols and the domain. Keeps the path '/' at the<br /> beginning, so it isn't a true relative link, but from the web root base.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>string $link</code></td> <td valign='top'><span class='paramDescription'>Full URL path. </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string Absolute path.</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>2.1.0</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line2312'>wp-includes/formatting.php</strong>, line <strong>2312</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_wp_parse_str'> wp_parse_str()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>wp_parse_str</code>(</td> <td valign = 'top'> <code class='paramName1'>$string<br/>&$array</code>) </td></tr></table> <div class='contents'> <div class='description'>Parses a string into variables to be stored in an array.<br /> <br /> Uses <a href='http://www.php.net/parse_str'> parse_str()</a> and stripslashes if<br /> <a href='http://www.php.net/magic_quotes'> magic_quotes_gpc</a> is on.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>string $string</code></td> <td valign='top'><span class='paramDescription'>The string to be parsed. </span></td></tr> <tr><td valign='top'><code class='paramName2'>array $array</code></td> <td valign='top'><span class='paramDescription'>Variables will be stored in this array. </span></td></tr> </table> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>2.2.1</span></div> <div><span class='tagTitle'>Uses</span> <span class='otherTagsValue'>apply_filters() for the 'wp_parse_str' filter.</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line2423'>wp-includes/formatting.php</strong>, line <strong>2423</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_wp_pre_kses_less_than'> wp_pre_kses_less_than()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>wp_pre_kses_less_than</code>(</td> <td valign = 'top'> <code class='paramName1'>$text</code>) </td></tr></table> <div class='contents'> <div class='description'>Convert lone less than signs.<br /> <br /> KSES already converts lone greater than signs.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>string $text</code></td> <td valign='top'><span class='paramDescription'>Text to be converted. </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string Converted text.</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>2.3.0</span></div> <div><span class='tagTitle'>Uses</span> <span class='otherTagsValue'>wp_pre_kses_less_than_callback in the callback function.</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line2441'>wp-includes/formatting.php</strong>, line <strong>2441</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_wp_pre_kses_less_than_callback'> wp_pre_kses_less_than_callback()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>wp_pre_kses_less_than_callback</code>(</td> <td valign = 'top'> <code class='paramName1'>$matches</code>) </td></tr></table> <div class='contents'> <div class='description'>Callback function used by preg_replace.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>array $matches</code></td> <td valign='top'><span class='paramDescription'>Populated by matches to preg_replace. </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string The text returned after esc_html if needed.</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>2.3.0</span></div> <div><span class='tagTitle'>Uses</span> <span class='otherTagsValue'>esc_html to format the $matches text.</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line2454'>wp-includes/formatting.php</strong>, line <strong>2454</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_wp_rel_nofollow'> wp_rel_nofollow()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>wp_rel_nofollow</code>(</td> <td valign = 'top'> <code class='paramName1'>$text</code>) </td></tr></table> <div class='contents'> <div class='description'>Adds rel nofollow string to all HTML A elements in content.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>string $text</code></td> <td valign='top'><span class='paramDescription'>Content that may contain HTML A elements. </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string Converted content.</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>1.5.0</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line1269'>wp-includes/formatting.php</strong>, line <strong>1269</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_wp_rel_nofollow_callback'> wp_rel_nofollow_callback()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>wp_rel_nofollow_callback</code>(</td> <td valign = 'top'> <code class='paramName1'>$matches</code>) </td></tr></table> <div class='contents'> <div class='description'>Callback to used to add rel=nofollow string to HTML A element.<br /> <br /> Will remove already existing rel="nofollow" and rel='nofollow' from the<br /> string to prevent from invalidating (X)HTML.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>array $matches</code></td> <td valign='top'><span class='paramDescription'>Single Match </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string HTML A Element with rel nofollow.</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>2.3.0</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line1289'>wp-includes/formatting.php</strong>, line <strong>1289</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_wp_richedit_pre'> wp_richedit_pre()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>wp_richedit_pre</code>(</td> <td valign = 'top'> <code class='paramName1'>$text</code>) </td></tr></table> <div class='contents'> <div class='description'>Formats text for the rich text editor.<br /> <br /> The filter 'richedit_pre' is applied here. If $text is empty the filter will<br /> be applied to an empty string.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>string $text</code></td> <td valign='top'><span class='paramDescription'>The text to be formatted. </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string The formatted text after filter is applied.</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>2.0.0</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line1994'>wp-includes/formatting.php</strong>, line <strong>1994</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title deprecated'><a name='det_methods_wp_specialchars'> wp_specialchars()</a></span> <span class='deprecatedWord'>Deprecated</span> </div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>wp_specialchars</code>(</td> <td valign = 'top'> <code class='paramName1'>$string<br/>$quote_style = ENT_NOQUOTES<br/>$charset = false<br/>$double_encode = false</code>) </td></tr></table> <div class='contents'> <div class='description'>Escaping for HTML blocks</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>$string</code></td> <td valign='top'><span class='paramDescription'></span></td></tr> <tr><td valign='top'><code class='paramName2'>$quote_style</code></td> <td valign='top'><span class='paramDescription'></span></td></tr> <tr><td valign='top'><code class='paramName2'>$charset</code></td> <td valign='top'><span class='paramDescription'></span></td></tr> <tr><td valign='top'><code class='paramName2'>$double_encode</code></td> <td valign='top'><span class='paramDescription'></span></td></tr> </table> <div><span class='tagTitle'>See also</span> <span class='otherTagsValue'>esc_html()</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line2238'>wp-includes/formatting.php</strong>, line <strong>2238</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_wp_specialchars_decode'> wp_specialchars_decode()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>wp_specialchars_decode</code>(</td> <td valign = 'top'> <code class='paramName1'>$string<br/>$quote_style = ENT_NOQUOTES</code>) </td></tr></table> <div class='contents'> <div class='description'>Converts a number of HTML entities into their special characters.<br /> <br /> Specifically deals with: &, <, >, ", and '.<br /> <br /> $quote_style can be set to ENT_COMPAT to decode " entities,<br /> or ENT_QUOTES to do both " and '. Default is ENT_NOQUOTES where no quotes are decoded.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>string $string</code></td> <td valign='top'><span class='paramDescription'>The text which is to be decoded. </span></td></tr> <tr><td valign='top'><code class='paramName2'>mixed $quote_style</code></td> <td valign='top'><span class='paramDescription'>Optional. Converts double quotes if set to ENT_COMPAT, both single and double if set to ENT_QUOTES or none if set to ENT_NOQUOTES. Also compatible with old _wp_specialchars() values; converting single quotes if set to 'single', double if set to 'double' or both if otherwise set. Default is ENT_NOQUOTES. </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string The decoded text without HTML entities.</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>2.8</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line301'>wp-includes/formatting.php</strong>, line <strong>301</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_wp_sprintf'> wp_sprintf()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>wp_sprintf</code>(</td> <td valign = 'top'> <code class='paramName1'>$pattern</code>) </td></tr></table> <div class='contents'> <div class='description'>WordPress implementation of PHP sprintf() with filters.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>string $pattern</code></td> <td valign='top'><span class='paramDescription'>The string which formatted args are inserted. </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string The formatted string.</span></div> <div><span class='tagTitle'>See also</span> <span class='otherTagsValue'>http://www.php.net/sprintf</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>2.5.0</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line2470'>wp-includes/formatting.php</strong>, line <strong>2470</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_wp_sprintf_l'> wp_sprintf_l()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>wp_sprintf_l</code>(</td> <td valign = 'top'> <code class='paramName1'>$pattern<br/>$args</code>) </td></tr></table> <div class='contents'> <div class='description'>Localize list items before the rest of the content.<br /> <br /> The '%l' must be at the first characters can then contain the rest of the<br /> content. The list items will have ', ', ', and', and ' and ' added depending<br /> on the amount of list items in the $args parameter.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>string $pattern</code></td> <td valign='top'><span class='paramDescription'>Content containing '%l' at the beginning. </span></td></tr> <tr><td valign='top'><code class='paramName2'>array $args</code></td> <td valign='top'><span class='paramDescription'>List items to prepend to the content and replace '%l'. </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string Localized list items and rest of the content.</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>2.5.0</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line2535'>wp-includes/formatting.php</strong>, line <strong>2535</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_wp_trim_excerpt'> wp_trim_excerpt()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>wp_trim_excerpt</code>(</td> <td valign = 'top'> <code class='paramName1'>$text</code>) </td></tr></table> <div class='contents'> <div class='description'>Generates an excerpt from the content, if needed.<br /> <br /> The excerpt word amount will be 55 words and if the amount is greater than<br /> that, then the string '[...]' will be appended to the excerpt. If the string<br /> is less than 55 words, then the content will be returned as is.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>string $text</code></td> <td valign='top'><span class='paramDescription'>The exerpt. If set to empty an excerpt is generated. </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string The excerpt.</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>1.5.0</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line1690'>wp-includes/formatting.php</strong>, line <strong>1690</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods_zeroise'> zeroise()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>zeroise</code>(</td> <td valign = 'top'> <code class='paramName1'>$number<br/>$threshold</code>) </td></tr></table> <div class='contents'> <div class='description'>Add leading zeros when necessary.<br /> <br /> If you set the threshold to '4' and the number is '10', then you will get<br /> back '0010'. If you set the number to '4' and the number is '5000', then you<br /> will get back '5000'.<br /> <br /> Uses sprintf to append the amount of zeros based on the $threshold parameter<br /> and the size of the number. If the number is large enough, then no zeros will<br /> be appended.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>mixed $number</code></td> <td valign='top'><span class='paramDescription'>Number to append zeros to if not greater than threshold. </span></td></tr> <tr><td valign='top'><code class='paramName2'>int $threshold</code></td> <td valign='top'><span class='paramDescription'>Digit places number needs to be to not have zeros added. </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string Adds leading zeros to number if needed.</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>0.71</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line1043'>wp-includes/formatting.php</strong>, line <strong>1043</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods__deep_replace'> _deep_replace()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>_deep_replace</code>(</td> <td valign = 'top'> <code class='paramName1'>$search<br/>$subject</code>) </td></tr></table> <div class='contents'> <div class='description'>Perform a deep string replace operation to ensure the values in $search are no longer present<br /> <br /> Repeats the replacement operation until it no longer replaces anything so as to remove "nested" values<br /> e.g. $subject = '%0%0%0DDD', $search ='%0D', $result ='' rather than the '%0%0DD' that<br /> str_replace would return</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>string|array $search</code></td> <td valign='top'><span class='paramDescription'> </span></td></tr> <tr><td valign='top'><code class='paramName2'>string $subject</code></td> <td valign='top'><span class='paramDescription'> </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string The processed string</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>2.8.1</span></div> <div><span class='tagTitle'>Access</span> <span class='otherTagsValue'>private</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line2084'>wp-includes/formatting.php</strong>, line <strong>2084</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods__links_add_base'> _links_add_base()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>_links_add_base</code>(</td> <td valign = 'top'> <code class='paramName1'>$m<br/>$base</code>) </td></tr></table> <div class='contents'> <div class='description'>Callback to add a base url to relative links in passed content.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>string $m</code></td> <td valign='top'><span class='paramDescription'>The matched link. </span></td></tr> <tr><td valign='top'><code class='paramName2'>string $base</code></td> <td valign='top'><span class='paramDescription'>The base URL to prefix to links. </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string The processed link.</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>2.7.0</span></div> <div><span class='tagTitle'>Access</span> <span class='otherTagsValue'>private</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line2622'>wp-includes/formatting.php</strong>, line <strong>2622</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods__links_add_target'> _links_add_target()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>_links_add_target</code>(</td> <td valign = 'top'> <code class='paramName1'>$m<br/>$target</code>) </td></tr></table> <div class='contents'> <div class='description'>Callback to add a target attribute to all links in passed content.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>string $m</code></td> <td valign='top'><span class='paramDescription'>The matched link. </span></td></tr> <tr><td valign='top'><code class='paramName2'>string $target</code></td> <td valign='top'><span class='paramDescription'>The Target to add to the links. </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string The processed link.</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>2.7.0</span></div> <div><span class='tagTitle'>Access</span> <span class='otherTagsValue'>private</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line2662'>wp-includes/formatting.php</strong>, line <strong>2662</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods__make_email_clickable_cb'> _make_email_clickable_cb()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>_make_email_clickable_cb</code>(</td> <td valign = 'top'> <code class='paramName1'>$matches</code>) </td></tr></table> <div class='contents'> <div class='description'>Callback to convert email address match to HTML A element.<br /> <br /> This function was backported from 2.5.0 to 2.3.2. Regex callback for {@link<br /> make_clickable()}.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>array $matches</code></td> <td valign='top'><span class='paramDescription'>Single Regex Match. </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string HTML A element with email address.</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>2.3.2</span></div> <div><span class='tagTitle'>Access</span> <span class='otherTagsValue'>private</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line1233'>wp-includes/formatting.php</strong>, line <strong>1233</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods__make_url_clickable_cb'> _make_url_clickable_cb()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>_make_url_clickable_cb</code>(</td> <td valign = 'top'> <code class='paramName1'>$matches</code>) </td></tr></table> <div class='contents'> <div class='description'>Callback to convert URI match to HTML A element.<br /> <br /> This function was backported from 2.5.0 to 2.3.2. Regex callback for {@link<br /> make_clickable()}.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>array $matches</code></td> <td valign='top'><span class='paramDescription'>Single Regex Match. </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string HTML A element with URI address.</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>2.3.2</span></div> <div><span class='tagTitle'>Access</span> <span class='otherTagsValue'>private</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line1186'>wp-includes/formatting.php</strong>, line <strong>1186</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods__make_web_ftp_clickable_cb'> _make_web_ftp_clickable_cb()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>_make_web_ftp_clickable_cb</code>(</td> <td valign = 'top'> <code class='paramName1'>$matches</code>) </td></tr></table> <div class='contents'> <div class='description'>Callback to convert URL match to HTML A element.<br /> <br /> This function was backported from 2.5.0 to 2.3.2. Regex callback for {@link<br /> make_clickable()}.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>array $matches</code></td> <td valign='top'><span class='paramDescription'>Single Regex Match. </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string HTML A element with URL address.</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>2.3.2</span></div> <div><span class='tagTitle'>Access</span> <span class='otherTagsValue'>private</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line1206'>wp-includes/formatting.php</strong>, line <strong>1206</strong></a></div> </div><!-- end class='documentedItem' --> <div class='documentedItem'> <div><span class='title'><a name='det_methods__wp_specialchars'> _wp_specialchars()</a></span></div> <table><tr><td valign = 'top'> <code class='modifiers'> function</code> <code class='smallTitle'>_wp_specialchars</code>(</td> <td valign = 'top'> <code class='paramName1'>$string<br/>$quote_style = ENT_NOQUOTES<br/>$charset = false<br/>$double_encode = false</code>) </td></tr></table> <div class='contents'> <div class='description'>Converts a number of special characters into their HTML entities.<br /> <br /> Specifically deals with: &, <, >, ", and '.<br /> <br /> $quote_style can be set to ENT_COMPAT to encode " to<br /> ", or ENT_QUOTES to do both. Default is ENT_NOQUOTES where no quotes are encoded.</div> <span class='tagTitle'>Parameters</span> <table> <tr><td valign='top'><code class='paramName2'>string $string</code></td> <td valign='top'><span class='paramDescription'>The text which is to be encoded. </span></td></tr> <tr><td valign='top'><code class='paramName2'>mixed $quote_style</code></td> <td valign='top'><span class='paramDescription'>Optional. Converts double quotes if set to ENT_COMPAT, both single and double if set to ENT_QUOTES or none if set to ENT_NOQUOTES. Also compatible with old values; converting single quotes if set to 'single', double if set to 'double' or both if otherwise set. Default is ENT_NOQUOTES. </span></td></tr> <tr><td valign='top'><code class='paramName2'>string $charset</code></td> <td valign='top'><span class='paramDescription'>Optional. The character encoding of the string. Default is false. </span></td></tr> <tr><td valign='top'><code class='paramName2'>boolean $double_encode</code></td> <td valign='top'><span class='paramDescription'>Optional. Whether or not to encode existing html entities. Default is false. </span></td></tr> </table> <div><span class='tagTitle'>Returns</span> <span class='return'>string The encoded text with HTML entities.</span></div> <div><span class='tagTitle'>Since</span> <span class='otherTagsValue'>1.2.2</span></div> </div><!-- contents --> <div class='defined'>Defined in <strong><a href='formatting.php.source.html#line225'>wp-includes/formatting.php</strong>, line <strong>225</strong></a></div> </div><!-- end class='documentedItem' --> </div><!-- end id='details' --> </div><!-- end id='classPage' --> </div><!-- end id='contents' --> <div id='footer'> Documentation generated by <a target='_top' href='http://www.phpsimpledoc.org'>phpSimpleDoc</a> - <span id='date'>2009.07.16 15:53:29</span> </div> </body> </html>