Make WordPress Core


Ignore:
Timestamp:
07/02/2008 11:07:56 PM (16 years ago)
Author:
mdawaffe
Message:

crazyhorse: merge with log:trunk@8151:8240

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/crazyhorse/wp-includes/pluggable.php

    r8103 r8242  
    11<?php
    22/**
    3  * These functions can be replaced via plugins. They are loaded after
    4  * plugins are loaded.
     3 * These functions can be replaced via plugins. If plugins do not redefine these
     4 * functions, then these will be used instead.
    55 *
    66 * @package WordPress
     
    99if ( !function_exists('set_current_user') ) :
    1010/**
    11  * set_current_user() - Populates global user information for any user
    12  *
    13  * Set $id to null and specify a name if you do not know a user's ID
     11 * Changes the current user by ID or name.
     12 *
     13 * Set $id to null and specify a name if you do not know a user's ID.
    1414 *
    1515 * @since 2.0.1
     
    2727if ( !function_exists('wp_set_current_user') ) :
    2828/**
    29  * wp_set_current_user() - Changes the current user by ID or name
    30  *
    31  * Set $id to null and specify a name if you do not know a user's ID
    32  *
    33  * Some WordPress functionality is based on the current user and
    34  * not based on the signed in user. Therefore, it opens the ability
    35  * to edit and perform actions on users who aren't signed in.
     29 * Changes the current user by ID or name.
     30 *
     31 * Set $id to null and specify a name if you do not know a user's ID.
     32 *
     33 * Some WordPress functionality is based on the current user and not based on
     34 * the signed in user. Therefore, it opens the ability to edit and perform
     35 * actions on users who aren't signed in.
    3636 *
    3737 * @since 2.0.4
     
    6161if ( !function_exists('wp_get_current_user') ) :
    6262/**
    63  * wp_get_current_user() - Retrieve the current user object
     63 * Retrieve the current user object.
    6464 *
    6565 * @since 2.0.4
     
    7878if ( !function_exists('get_currentuserinfo') ) :
    7979/**
    80  * get_currentuserinfo() - Populate global variables with information about the currently logged in user
    81  *
    82  * Will set the current user, if the current user is not set. The current
    83  * user will be set to the logged in person. If no user is logged in, then
    84  * it will set the current user to 0, which is invalid and won't have any
    85  * permissions.
     80 * Populate global variables with information about the currently logged in user.
     81 *
     82 * Will set the current user, if the current user is not set. The current user
     83 * will be set to the logged in person. If no user is logged in, then it will
     84 * set the current user to 0, which is invalid and won't have any permissions.
    8685 *
    8786 * @since 0.71
     
    113112if ( !function_exists('get_userdata') ) :
    114113/**
    115  * get_userdata() - Retrieve user info by user ID
     114 * Retrieve user info by user ID.
    116115 *
    117116 * @since 0.71
     
    143142if ( !function_exists('update_user_cache') ) :
    144143/**
    145  * update_user_cache() - Updates a users cache when overridden by a plugin
     144 * Updates a users cache when overridden by a plugin.
    146145 *
    147146 * Core function does nothing.
     
    158157if ( !function_exists('get_userdatabylogin') ) :
    159158/**
    160  * get_userdatabylogin() - Retrieve user info by login name
     159 * Retrieve user info by login name.
    161160 *
    162161 * @since 0.71
     
    192191if ( !function_exists('get_user_by_email') ) :
    193192/**
    194  * get_user_by_email() - Retrieve user info by email
     193 * Retrieve user info by email.
    195194 *
    196195 * @since 2.5
     
    222221if ( !function_exists( 'wp_mail' ) ) :
    223222/**
    224  * wp_mail() - Function to send mail, similar to PHP's mail
    225  *
    226  * A true return value does not automatically mean that the
    227  * user received the email successfully. It just only means
    228  * that the method used was able to process the request
    229  * without any errors.
    230  *
    231  * Using the two 'wp_mail_from' and 'wp_mail_from_name' hooks
    232  * allow from creating a from address like 'Name <email@address.com>'
    233  * when both are set. If just 'wp_mail_from' is set, then just
    234  * the email address will be used with no name.
    235  *
    236  * The default content type is 'text/plain' which does not
    237  * allow using HTML. However, you can set the content type
    238  * of the email by using the 'wp_mail_content_type' filter.
    239  *
    240  * The default charset is based on the charset used on the
    241  * blog. The charset can be set using the 'wp_mail_charset'
    242  * filter.
     223 * Send mail, similar to PHP's mail
     224 *
     225 * A true return value does not automatically mean that the user received the
     226 * email successfully. It just only means that the method used was able to
     227 * process the request without any errors.
     228 *
     229 * Using the two 'wp_mail_from' and 'wp_mail_from_name' hooks allow from
     230 * creating a from address like 'Name <email@address.com>' when both are set. If
     231 * just 'wp_mail_from' is set, then just the email address will be used with no
     232 * name.
     233 *
     234 * The default content type is 'text/plain' which does not allow using HTML.
     235 * However, you can set the content type of the email by using the
     236 * 'wp_mail_content_type' filter.
     237 *
     238 * The default charset is based on the charset used on the blog. The charset can
     239 * be set using the 'wp_mail_charset' filter.
    243240 *
    244241 * @since 1.2.1
     
    420417
    421418/**
    422  * wp_authenticate() - Checks a user's login information and logs them in if it checks out
     419 * Checks a user's login information and logs them in if it checks out.
     420 *
    423421 * @since 2.5
    424422 *
     
    460458
    461459/**
    462  * wp_logout() - Log the current user out
     460 * Log the current user out.
     461 *
    463462 * @since 2.5
    464  *
    465463 */
    466464if ( !function_exists('wp_logout') ) :
     
    473471if ( !function_exists('wp_validate_auth_cookie') ) :
    474472/**
    475  * wp_validate_auth_cookie() - Validates authentication cookie
    476  *
    477  * The checks include making sure that the authentication cookie
    478  * is set and pulling in the contents (if $cookie is not used).
    479  *
    480  * Makes sure the cookie is not expired. Verifies the hash in
    481  * cookie is what is should be and compares the two.
     473 * Validates authentication cookie.
     474 *
     475 * The checks include making sure that the authentication cookie is set and
     476 * pulling in the contents (if $cookie is not used).
     477 *
     478 * Makes sure the cookie is not expired. Verifies the hash in cookie is what is
     479 * should be and compares the two.
    482480 *
    483481 * @since 2.5
     
    534532if ( !function_exists('wp_generate_auth_cookie') ) :
    535533/**
    536  * wp_generate_auth_cookie() - Generate authentication cookie contents
     534 * Generate authentication cookie contents.
    537535 *
    538536 * @since 2.5
     
    559557if ( !function_exists('wp_set_auth_cookie') ) :
    560558/**
    561  * wp_set_auth_cookie() - Sets the authentication cookies based User ID
    562  *
    563  * The $remember parameter increases the time that the cookie will
    564  * be kept. The default the cookie is kept without remembering is
    565  * two days. When $remember is set, the cookies will be kept for
    566  * 14 days or two weeks.
     559 * Sets the authentication cookies based User ID.
     560 *
     561 * The $remember parameter increases the time that the cookie will be kept. The
     562 * default the cookie is kept without remembering is two days. When $remember is
     563 * set, the cookies will be kept for 14 days or two weeks.
    567564 *
    568565 * @since 2.5
     
    593590    $logged_in_cookie = wp_generate_auth_cookie($user_id, $expiration, 'logged_in');
    594591
    595     do_action('set_auth_cookie', $auth_cookie, $expire, $scheme);
    596     do_action('set_auth_cookie', $logged_in_cookie, $expire, 'logged_in');
    597 
    598     setcookie($auth_cookie_name, $auth_cookie, $expire, SITECOOKIEPATH . 'wp-admin', COOKIE_DOMAIN, $secure);
     592    do_action('set_auth_cookie', $auth_cookie, $expire, $expiration, $user_id, $scheme);
     593    do_action('set_logged_in_cookie', $logged_in_cookie, $expire, $expiration, $user_id, 'logged_in');
     594
     595    setcookie($auth_cookie_name, $auth_cookie, $expire, PLUGINS_COOKIE_PATH, COOKIE_DOMAIN, $secure);
     596    setcookie($auth_cookie_name, $auth_cookie, $expire, ADMIN_COOKIE_PATH, COOKIE_DOMAIN, $secure);
    599597    setcookie(LOGGED_IN_COOKIE, $logged_in_cookie, $expire, COOKIEPATH, COOKIE_DOMAIN);
    600598    if ( COOKIEPATH != SITECOOKIEPATH )
     
    605603if ( !function_exists('wp_clear_auth_cookie') ) :
    606604/**
    607  * wp_clear_auth_cookie() - Deletes all of the cookies associated with authentication
     605 * Removes all of the cookies associated with authentication.
    608606 *
    609607 * @since 2.5
    610608 */
    611609function wp_clear_auth_cookie() {
    612     setcookie(AUTH_COOKIE, ' ', time() - 31536000, COOKIEPATH . 'wp-admin', COOKIE_DOMAIN);
    613     setcookie(AUTH_COOKIE, ' ', time() - 31536000, SITECOOKIEPATH . 'wp-admin', COOKIE_DOMAIN);
    614     setcookie(SECURE_AUTH_COOKIE, ' ', time() - 31536000, COOKIEPATH . 'wp-admin', COOKIE_DOMAIN);
    615     setcookie(SECURE_AUTH_COOKIE, ' ', time() - 31536000, SITECOOKIEPATH . 'wp-admin', COOKIE_DOMAIN);
     610    setcookie(AUTH_COOKIE, ' ', time() - 31536000, ADMIN_COOKIE_PATH, COOKIE_DOMAIN);
     611    setcookie(SECURE_AUTH_COOKIE, ' ', time() - 31536000, ADMIN_COOKIE_PATH, COOKIE_DOMAIN);
     612    setcookie(AUTH_COOKIE, ' ', time() - 31536000, PLUGINS_COOKIE_PATH, COOKIE_DOMAIN);
     613    setcookie(SECURE_AUTH_COOKIE, ' ', time() - 31536000, PLUGINS_COOKIE_PATH, COOKIE_DOMAIN);
    616614    setcookie(LOGGED_IN_COOKIE, ' ', time() - 31536000, COOKIEPATH, COOKIE_DOMAIN);
    617615    setcookie(LOGGED_IN_COOKIE, ' ', time() - 31536000, SITECOOKIEPATH, COOKIE_DOMAIN);
    618616
    619617    // Old cookies
     618    setcookie(AUTH_COOKIE, ' ', time() - 31536000, COOKIEPATH, COOKIE_DOMAIN);
     619    setcookie(AUTH_COOKIE, ' ', time() - 31536000, SITECOOKIEPATH, COOKIE_DOMAIN);
     620    setcookie(SECURE_AUTH_COOKIE, ' ', time() - 31536000, COOKIEPATH, COOKIE_DOMAIN);
     621    setcookie(SECURE_AUTH_COOKIE, ' ', time() - 31536000, SITECOOKIEPATH, COOKIE_DOMAIN);
     622
     623    // Even older cookies
    620624    setcookie(USER_COOKIE, ' ', time() - 31536000, COOKIEPATH, COOKIE_DOMAIN);
    621625    setcookie(PASS_COOKIE, ' ', time() - 31536000, COOKIEPATH, COOKIE_DOMAIN);
     
    627631if ( !function_exists('is_user_logged_in') ) :
    628632/**
    629  * is_user_logged_in() - Checks if the current visitor is a logged in user
     633 * Checks if the current visitor is a logged in user.
    630634 *
    631635 * @since 2.0.0
     
    645649if ( !function_exists('auth_redirect') ) :
    646650/**
    647  * auth_redirect() - Checks if a user is logged in, if not it redirects them to the login page
     651 * Checks if a user is logged in, if not it redirects them to the login page.
    648652 *
    649653 * @since 1.5
     
    688692if ( !function_exists('check_admin_referer') ) :
    689693/**
    690  * check_admin_referer() - Makes sure that a user was referred from another admin page, to avoid security exploits
     694 * Makes sure that a user was referred from another admin page.
     695 *
     696 * To avoid security exploits.
    691697 *
    692698 * @since 1.2.0
     
    710716if ( !function_exists('check_ajax_referer') ) :
    711717/**
    712  * check_ajax_referer() - Verifies the AJAX request to prevent processing requests external of the blog.
     718 * Verifies the AJAX request to prevent processing requests external of the blog.
    713719 *
    714720 * @since 2.0.4
     
    736742if ( !function_exists('wp_redirect') ) :
    737743/**
    738  * wp_redirect() - Redirects to another page, with a workaround for the IIS Set-Cookie bug
     744 * Redirects to another page, with a workaround for the IIS Set-Cookie bug.
    739745 *
    740746 * @link http://support.microsoft.com/kb/q176113/
     
    769775if ( !function_exists('wp_sanitize_redirect') ) :
    770776/**
    771  * wp_sanitize_redirect() - Sanitizes a URL for use in a redirect
     777 * Sanitizes a URL for use in a redirect.
    772778 *
    773779 * @since 2.3
     
    797803if ( !function_exists('wp_safe_redirect') ) :
    798804/**
    799  * wp_safe_redirect() - Performs a safe (local) redirect, using wp_redirect()
     805 * Performs a safe (local) redirect, using wp_redirect().
    800806 *
    801807 * Checks whether the $location is using an allowed host, if it has an absolute
    802  * path. A plugin can therefore set or remove allowed host(s) to or from the list.
     808 * path. A plugin can therefore set or remove allowed host(s) to or from the
     809 * list.
    803810 *
    804811 * If the host is not allowed, then the redirect is to wp-admin on the siteurl
    805  * instead. This prevents malicious redirects which redirect to another host, but
    806  * only used in a few places.
     812 * instead. This prevents malicious redirects which redirect to another host,
     813 * but only used in a few places.
    807814 *
    808815 * @since 2.3
     
    835842if ( ! function_exists('wp_notify_postauthor') ) :
    836843/**
    837  * wp_notify_postauthor() - Notify an author of a comment/trackback/pingback to one of their posts
     844 * Notify an author of a comment/trackback/pingback to one of their posts.
    838845 *
    839846 * @since 1.0.0
     
    914921if ( !function_exists('wp_notify_moderator') ) :
    915922/**
    916  * wp_notify_moderator() - Notifies the moderator of the blog about a new comment that is awaiting approval
     923 * Notifies the moderator of the blog about a new comment that is awaiting approval.
    917924 *
    918925 * @since 1.0
     
    983990if ( !function_exists('wp_new_user_notification') ) :
    984991/**
    985  * wp_new_user_notification() - Notify the blog admin of a new user, normally via email
     992 * Notify the blog admin of a new user, normally via email.
    986993 *
    987994 * @since 2.0
     
    10161023if ( !function_exists('wp_nonce_tick') ) :
    10171024/**
    1018  * wp_nonce_tick() - Get the time-dependent variable for nonce creation
    1019  *
    1020  * A nonce has a lifespan of two ticks. Nonces in their second tick may be updated, e.g. by autosave.
     1025 * Get the time-dependent variable for nonce creation.
     1026 *
     1027 * A nonce has a lifespan of two ticks. Nonces in their second tick may be
     1028 * updated, e.g. by autosave.
    10211029 *
    10221030 * @since 2.5
     
    10331041if ( !function_exists('wp_verify_nonce') ) :
    10341042/**
    1035  * wp_verify_nonce() - Verify that correct nonce was used with time limit
    1036  *
    1037  * The user is given an amount of time to use the token, so therefore, since
    1038  * the UID and $action remain the same, the independent variable is the time.
     1043 * Verify that correct nonce was used with time limit.
     1044 *
     1045 * The user is given an amount of time to use the token, so therefore, since the
     1046 * UID and $action remain the same, the independent variable is the time.
    10391047 *
    10401048 * @since 2.0.4
     
    10631071if ( !function_exists('wp_create_nonce') ) :
    10641072/**
    1065  * wp_create_nonce() - Creates a random, one time use token
     1073 * Creates a random, one time use token.
    10661074 *
    10671075 * @since 2.0.4
     
    10821090if ( !function_exists('wp_salt') ) :
    10831091/**
    1084  * wp_salt() - Get salt to add to hashes to help prevent attacks
    1085  *
    1086  * You can set the salt by defining two areas. One is in the database and
    1087  * the other is in your wp-config.php file. The database location is defined
    1088  * in the option named 'secret', but most likely will not need to be changed.
    1089  *
    1090  * The second, located in wp-config.php, is a constant named 'SECRET_KEY', but
    1091  * is not required. If the constant is not defined then the database constants
    1092  * will be used, since they are most likely given to be unique. However, given
    1093  * that the salt will be added to the password and can be seen, the constant
    1094  * is recommended to be set manually.
     1092 * Get salt to add to hashes to help prevent attacks.
     1093 *
     1094 * The secret key is located in two places: the database in case the secret key
     1095 * isn't defined in the second place, which is in the wp-config.php file. If you
     1096 * are going to set the secret key, then you must do so in the wp-config.php
     1097 * file.
     1098 *
     1099 * The secret key in the database is randomly generated and will be appended to
     1100 * the secret key that is in wp-config.php file in some instances. It is
     1101 * important to have the secret key defined or changed in wp-config.php.
     1102 *
     1103 * If you have installed WordPress 2.5 or later, then you will have the
     1104 * SECRET_KEY defined in the wp-config.php already. You will want to change the
     1105 * value in it because hackers will know what it is. If you have upgraded to
     1106 * WordPress 2.5 or later version from a version before WordPress 2.5, then you
     1107 * should add the constant to your wp-config.php file.
     1108 *
     1109 * Below is an example of how the SECRET_KEY constant is defined with a value.
     1110 * You must not copy the below example and paste into your wp-config.php. If you
     1111 * need an example, then you can have a
     1112 * {@link http://api.wordpress.org/secret-key/1.0/ secret key created} for you.
    10951113 *
    10961114 * <code>
     
    10981116 * </code>
    10991117 *
    1100  * Attention: Do not use above example!
    1101  *
    1102  * Salting passwords helps against tools which has stored hashed values
    1103  * of common dictionary strings. The added values makes it harder to crack
    1104  * if given salt string is not weak.
    1105  *
    1106  * Salting only helps if the string is not predictable and should be
    1107  * made up of various characters. Think of the salt as a password for
    1108  * securing your passwords, but common among all of your passwords.
    1109  * Therefore the salt should be as long as possible as as difficult as
    1110  * possible, because you will not have to remember it.
     1118 * Salting passwords helps against tools which has stored hashed values of
     1119 * common dictionary strings. The added values makes it harder to crack if given
     1120 * salt string is not weak.
    11111121 *
    11121122 * @since 2.5
     1123 * @link http://api.wordpress.org/secret-key/1.0/ Create a Secret Key for wp-config.php
    11131124 *
    11141125 * @return string Salt value from either 'SECRET_KEY' or 'secret' option
     
    11691180if ( !function_exists('wp_hash') ) :
    11701181/**
    1171  * wp_hash() - Get hash of given string
     1182 * Get hash of given string.
    11721183 *
    11731184 * @since 2.0.4
     
    11861197if ( !function_exists('wp_hash_password') ) :
    11871198/**
    1188  * wp_hash_password() - Create a hash (encrypt) of a plain text password
    1189  *
    1190  * For integration with other applications, this function can be
    1191  * overwritten to instead use the other package password checking
    1192  * algorithm.
     1199 * Create a hash (encrypt) of a plain text password.
     1200 *
     1201 * For integration with other applications, this function can be overwritten to
     1202 * instead use the other package password checking algorithm.
    11931203 *
    11941204 * @since 2.5
     
    12141224if ( !function_exists('wp_check_password') ) :
    12151225/**
    1216  * wp_check_password() - Checks the plaintext password against the encrypted Password
    1217  *
    1218  * Maintains compatibility between old version and the new cookie
    1219  * authentication protocol using PHPass library. The $hash parameter
    1220  * is the encrypted password and the function compares the plain text
    1221  * password when encypted similarly against the already encrypted
    1222  * password to see if they match.
    1223  *
    1224  * For integration with other applications, this function can be
    1225  * overwritten to instead use the other package password checking
    1226  * algorithm.
     1226 * Checks the plaintext password against the encrypted Password.
     1227 *
     1228 * Maintains compatibility between old version and the new cookie authentication
     1229 * protocol using PHPass library. The $hash parameter is the encrypted password
     1230 * and the function compares the plain text password when encypted similarly
     1231 * against the already encrypted password to see if they match.
     1232 *
     1233 * For integration with other applications, this function can be overwritten to
     1234 * instead use the other package password checking algorithm.
    12271235 *
    12281236 * @since 2.5
     
    12661274if ( !function_exists('wp_generate_password') ) :
    12671275/**
    1268  * wp_generate_password() - Generates a random password drawn from the defined set of characters
     1276 * Generates a random password drawn from the defined set of characters.
    12691277 *
    12701278 * @since 2.5
     
    12861294if ( !function_exists('wp_set_password') ) :
    12871295/**
    1288  * wp_set_password() - Updates the user's password with a new encrypted one
    1289  *
    1290  * For integration with other applications, this function can be
    1291  * overwritten to instead use the other package password checking
    1292  * algorithm.
     1296 * Updates the user's password with a new encrypted one.
     1297 *
     1298 * For integration with other applications, this function can be overwritten to
     1299 * instead use the other package password checking algorithm.
    12931300 *
    12941301 * @since 2.5
     
    13111318if ( !function_exists( 'get_avatar' ) ) :
    13121319/**
    1313  * get_avatar() - Get avatar for a user
    1314  *
    1315  * Retrieve the avatar for a user provided a user ID or email address
     1320 * Retrieve the avatar for a user who provided a user ID or email address.
    13161321 *
    13171322 * @since 2.5
     
    13891394if ( !function_exists('wp_setcookie') ) :
    13901395/**
    1391  * wp_setcookie() - Sets a cookie for a user who just logged in
     1396 * Sets a cookie for a user who just logged in.
    13921397 *
    13931398 * @since 1.5
     
    14111416if ( !function_exists('wp_clearcookie') ) :
    14121417/**
    1413  * wp_clearcookie() - Clears the authentication cookie, logging the user out
     1418 * Clears the authentication cookie, logging the user out.
    14141419 *
    14151420 * @since 1.5
     
    14251430if ( !function_exists('wp_get_cookie_login') ):
    14261431/**
    1427  * wp_get_cookie_login() - Gets the user cookie login
    1428  *
    1429  * This function is deprecated and should no longer be extended as it won't
    1430  * be used anywhere in WordPress. Also, plugins shouldn't use it either.
     1432 * Gets the user cookie login.
     1433 *
     1434 * This function is deprecated and should no longer be extended as it won't be
     1435 * used anywhere in WordPress. Also, plugins shouldn't use it either.
    14311436 *
    14321437 * @since 2.0.4
     
    14431448if ( !function_exists('wp_login') ) :
    14441449/**
    1445  * wp_login() - Checks a users login information and logs them in if it checks out
    1446  *
    1447  * Use the global $error to get the reason why the login failed.
    1448  * If the username is blank, no error will be set, so assume
    1449  * blank username on that case.
    1450  *
    1451  * Plugins extending this function should also provide the global
    1452  * $error and set what the error is, so that those checking the
    1453  * global for why there was a failure can utilize it later.
     1450 * Checks a users login information and logs them in if it checks out.
     1451 *
     1452 * Use the global $error to get the reason why the login failed. If the username
     1453 * is blank, no error will be set, so assume blank username on that case.
     1454 *
     1455 * Plugins extending this function should also provide the global $error and set
     1456 * what the error is, so that those checking the global for why there was a
     1457 * failure can utilize it later.
    14541458 *
    14551459 * @since 1.2.2
     
    14771481if ( !function_exists( 'wp_text_diff' ) ) :
    14781482/**
    1479  * wp_text_diff() - compares two strings and outputs a human readable HTML representation of their difference
    1480  *
    1481  * Basically a wrapper for man diff(1)
    1482  *
    1483  * Must accept an optional third parameter, $args @see wp_parse_args()
    1484  *    (string) title: optional.  If present, titles the diff in a manner compatible with the output
    1485  *
    1486  * Must return the empty string if the two compared strings are found to be equivalent according to whatever metric
     1483 * Displays a human readable HTML representation of the difference between two strings.
     1484 *
     1485 * The Diff is available for getting the changes between versions. The output is
     1486 * HTML, so the primary use is for displaying the changes. If the two strings
     1487 * are equivalent, then an empty string will be returned.
     1488 *
     1489 * The arguments supported and can be changed are listed below.
     1490 *
     1491 * 'title' : Default is an empty string. Titles the diff in a manner compatible
     1492 *      with the output.
     1493 * 'title_left' : Default is an empty string. Change the HTML to the left of the
     1494 *      title.
     1495 * 'title_right' : Default is an empty string. Change the HTML to the right of
     1496 *      the title.
    14871497 *
    14881498 * @since 2.6
     1499 * @see wp_parse_args() Used to change defaults to user defined settings.
    14891500 * @uses Text_Diff
    14901501 * @uses WP_Text_Diff_Renderer_Table
     
    14921503 * @param string $left_string "old" (left) version of string
    14931504 * @param string $right_string "new" (right) version of string
    1494  * @param string|array $args @see wp_parse_args()
    1495  * @return string human readable HTML of string differences.  Empty string if strings are equivalent
     1505 * @param string|array $args Optional. Change 'title', 'title_left', and 'title_right' defaults.
     1506 * @return string Empty string if strings are equivalent or HTML with differences.
    14961507 */
    14971508function wp_text_diff( $left_string, $right_string, $args = null ) {
Note: See TracChangeset for help on using the changeset viewer.