WordPress.org

Make WordPress Core


Ignore:
Timestamp:
08/31/2008 08:58:19 PM (10 years ago)
Author:
westi
Message:

phpDoc updates for formatting functions fixes #5638 props jacobsantos.

File:
1 edited

Legend:

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

    r8783 r8786  
    155155 * Checks to see if a string is utf8 encoded.
    156156 *
     157 * @author bmorel at ssi dot fr
     158 *
    157159 * @since 1.2.1
    158160 *
     
    212214
    213215/**
    214  * {@internal Missing Short Description}}
    215  *
    216  * {@internal Missing Long Description}}
     216 * Encode the Unicode values to be used in the URI.
    217217 *
    218218 * @since 1.5.0
    219219 *
    220  * @param unknown_type $utf8_string
    221  * @param unknown_type $length
    222  * @return unknown
     220 * @param string $utf8_string
     221 * @param int $length Max length of the string
     222 * @return string String with Unicode encoded for URI.
    223223 */
    224224function utf8_uri_encode( $utf8_string, $length = 0 ) {
     
    264264
    265265/**
    266  * Replaces accents in a string.
     266 * Converts all accent characters to ASCII characters.
     267 *
     268 * If there are no accent characters, then the string given is just returned.
    267269 *
    268270 * @since 1.2.1
    269271 *
    270  * @param string $string The text to be filtered.
     272 * @param string $string Text that might have accent characters
    271273 * @return string Filtered string with replaced "nice" characters.
    272274 */
     
    404406 * Filters certain characters from the file name.
    405407 *
    406  * {@internal Missing Long Description}}
     408 * Turns all strings to lowercase removing most characters except alphanumeric
     409 * with spaces, dashes and periods. All spaces and underscores are converted to
     410 * dashes. Multiple dashes are converted to a single dash. Finally, if the file
     411 * name ends with a dash, it is removed.
    407412 *
    408413 * @since 2.1.0
    409414 *
    410  * @param string $name The string to be sanitized.
    411  * @return string Sanitized string.
     415 * @param string $name The file name
     416 * @return string Sanitized file name
    412417 */
    413418function sanitize_file_name( $name ) { // Like sanitize_title, but with periods
     
    427432 * If $strict is true, only alphanumeric characters (as well as _, space, ., -,
    428433 * @) are returned.
     434 * Removes tags, octets, entities, and if strict is enabled, will remove all
     435 * non-ASCII characters. After sanitizing, it passes the username, raw username
     436 * (the username in the parameter), and the strict parameter as parameters for
     437 * the filter.
    429438 *
    430439 * @since 2.0.0
     440 * @uses apply_filters() Calls 'sanitize_user' hook on username, raw username,
     441 *      and $strict parameter.
    431442 *
    432443 * @param string $username The username to be sanitized.
     
    796807 * will get back '5000'.
    797808 *
     809 * Uses sprintf to append the amount of zeros based on the $threshold parameter
     810 * and the size of the number. If the number is large enough, then no zeros will
     811 * be appended.
     812 *
    798813 * @since 0.71
    799814 *
    800  * @param mixed $number Will convert to string and add zeros
    801  * @param int $threshold Amount of digits
    802  * @return string Adds leading zeros to number if needed
     815 * @param mixed $number Number to append zeros to if not greater than threshold.
     816 * @param int $threshold Digit places number needs to be to not have zeros added.
     817 * @return string Adds leading zeros to number if needed.
    803818 */
    804819function zeroise($number, $threshold) {
     
    908923
    909924/**
    910  * antispambot() - {@internal Missing Short Description}}
    911  *
    912  * {@internal Missing Long Description}}
     925 * Converts email addresses characters to HTML entities to block spam bots.
    913926 *
    914927 * @since 0.71
    915928 *
    916  * @param unknown_type $emailaddy
    917  * @param unknown_type $mailto
    918  * @return unknown
     929 * @param string $emailaddy Email address.
     930 * @param int $mailto Optional. Range from 0 to 1. Used for encoding.
     931 * @return string Converted email address.
    919932 */
    920933function antispambot($emailaddy, $mailto=0) {
     
    10291042
    10301043/**
    1031  * wp_rel_nofollow() - {@internal Missing Short Description}}
    1032  *
    1033  * {@internal Missing Long Description}}
     1044 * Adds rel nofollow string to all HTML A elements in content.
    10341045 *
    10351046 * @since 1.5.0
    10361047 *
    1037  * @param unknown_type $text
    1038  * @return unknown
     1048 * @param string $text Content that may contain HTML A elements.
     1049 * @return string Converted content.
    10391050 */
    10401051function wp_rel_nofollow( $text ) {
     
    10481059
    10491060/**
    1050  * wp_rel_nofollow_callback() - {@internal Missing Short Description}}
    1051  *
    1052  * {@internal Missing Long Description}}
     1061 * Callback to used to add rel=nofollow string to HTML A element.
     1062 *
     1063 * Will remove already existing rel="nofollow" and rel='nofollow' from the
     1064 * string to prevent from invalidating (X)HTML.
    10531065 *
    10541066 * @since 2.3.0
    10551067 *
    1056  * @param unknown_type $matches
    1057  * @return unknown
     1068 * @param array $matches Single Match
     1069 * @return string HTML A Element with rel nofollow.
    10581070 */
    10591071function wp_rel_nofollow_callback( $matches ) {
     
    10641076
    10651077/**
    1066  * convert_smilies() - {@internal Missing Short Description}}
    1067  *
    1068  * {@internal Missing Long Description}}
     1078 * Convert text equivalent of smilies to images.
     1079 *
     1080 * Will only convert smilies if the option 'use_smilies' is true and the globals
     1081 * used in the function aren't empty.
    10691082 *
    10701083 * @since 0.71
    1071  *
    1072  * @param string $text
    1073  * @return string
     1084 * @uses $wp_smiliessearch, $wp_smiliesreplace Smiley replacement arrays.
     1085 *
     1086 * @param string $text Content to convert smilies from text.
     1087 * @return string Converted content with text smilies replaced with images.
    10741088 */
    10751089function convert_smilies($text) {
     
    11161130
    11171131/**
    1118  * {@internal Missing Short Description}}
    1119  *
    1120  * {@internal Missing Long Description}}
     1132 * Convert to ASCII from email subjects.
    11211133 *
    11221134 * @since 1.2.0
    11231135 * @usedby wp_mail() handles charsets in email subjects
    11241136 *
    1125  * @param string $string
    1126  * @return string
     1137 * @param string $string Subject line
     1138 * @return string Converted string to ASCII
    11271139 */
    11281140function wp_iso_descrambler($string) {
Note: See TracChangeset for help on using the changeset viewer.