Make WordPress Core


Ignore:
Timestamp:
08/30/2008 09:23:43 PM (17 years ago)
Author:
westi
Message:

phpDoc corrections for wp-includes. See #7550 props jacobsantos.

File:
1 edited

Legend:

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

    r8600 r8782  
    88
    99/**
    10  * get_locale() - Gets the current locale
    11  *
    12  * If the locale is set, then it will filter the locale
    13  * in the 'locale' filter hook and return the value.
    14  *
    15  * If the locale is not set already, then the WPLANG
    16  * constant is used if it is defined. Then it is filtered
    17  * through the 'locale' filter hook and the value for the
    18  * locale global set and the locale is returned.
    19  *
    20  * The process to get the locale should only be done once
    21  * but the locale will always be filtered using the
    22  * 'locale' hook.
    23  *
    24  * @since 1.5.0
    25  * @uses apply_filters() Calls 'locale' hook on locale value
    26  * @uses $locale Gets the locale stored in the global
    27  *
    28  * @return string The locale of the blog or from the 'locale' hook
     10 * Gets the current locale.
     11 *
     12 * If the locale is set, then it will filter the locale in the 'locale' filter
     13 * hook and return the value.
     14 *
     15 * If the locale is not set already, then the WPLANG constant is used if it is
     16 * defined. Then it is filtered through the 'locale' filter hook and the value
     17 * for the locale global set and the locale is returned.
     18 *
     19 * The process to get the locale should only be done once but the locale will
     20 * always be filtered using the 'locale' hook.
     21 *
     22 * @since 1.5.0
     23 * @uses apply_filters() Calls 'locale' hook on locale value.
     24 * @uses $locale Gets the locale stored in the global.
     25 *
     26 * @return string The locale of the blog or from the 'locale' hook.
    2927 */
    3028function get_locale() {
     
    4745
    4846/**
    49  * translate() - Retrieve the translated text
    50  *
    51  * If the domain is set in the $l10n global, then the text is run
    52  * through the domain's translate method. After it is passed to
    53  * the 'gettext' filter hook, along with the untranslated text as
    54  * the second parameter.
     47 * Retrieve the translated text.
     48 *
     49 * If the domain is set in the $l10n global, then the text is run through the
     50 * domain's translate method. After it is passed to the 'gettext' filter hook,
     51 * along with the untranslated text as the second parameter.
    5552 *
    5653 * If the domain is not set, the $text is just returned.
    5754 *
    5855 * @since 2.2.0
    59  * @uses $l10n Gets list of domain translated string (gettext_reader) objects
     56 * @uses $l10n Gets list of domain translated string (gettext_reader) objects.
    6057 * @uses apply_filters() Calls 'gettext' on domain translated text
    61  *      with the untranslated text as second parameter
    62  *
    63  * @param string $text Text to translate
    64  * @param string $domain Domain to retrieve the translated text
     58 *      with the untranslated text as second parameter.
     59 *
     60 * @param string $text Text to translate.
     61 * @param string $domain Domain to retrieve the translated text.
    6562 * @return string Translated text
    6663 */
     
    7572
    7673/**
    77  * translate_with_context() - Retrieve the translated text and strip context
    78  *
    79  * If the domain is set in the $l10n global, then the text is run
    80  * through the domain's translate method. After it is passed to
    81  * the 'gettext' filter hook, along with the untranslated text as
    82  * the second parameter.
     74 * Retrieve the translated text and strip context.
     75 *
     76 * If the domain is set in the $l10n global, then the text is run through the
     77 * domain's translate method. After it is passed to the 'gettext' filter hook,
     78 * along with the untranslated text as the second parameter.
    8379 *
    8480 * If the domain is not set, the $text is just returned.
     
    10298
    10399/**
    104  * __() - Retrieve a translated string
    105  *
    106  * __() is a convenience function which retrieves the translated
    107  * string from the translate().
     100 * Retrieves the translated string from the translate().
    108101 *
    109102 * @see translate() An alias of translate()
     
    118111}
    119112
    120 // .
    121 /**
    122  * _e() - Display a translated string
    123  *
    124  * _e() is a convenience function which displays the returned
    125  * translated text from translate().
     113/**
     114 * Displays the returned translated text from translate().
    126115 *
    127116 * @see translate() Echos returned translate() string
     
    136125
    137126/**
    138  * _c() - Retrieve context translated string
    139  *
    140  * Quite a few times, there will be collisions with similar
    141  * translatable text found in more than two places but with
    142  * different translated context.
    143  *
    144  * In order to use the separate contexts, the _c() function
    145  * is used and the translatable string uses a pipe ('|')
    146  * which has the context the string is in.
    147  *
    148  * When the translated string is returned, it is everything
    149  * before the pipe, not including the pipe character. If
    150  * there is no pipe in the translated text then everything
    151  * is returned.
     127 * Retrieve context translated string.
     128 *
     129 * Quite a few times, there will be collisions with similar translatable text
     130 * found in more than two places but with different translated context.
     131 *
     132 * In order to use the separate contexts, the _c() function is used and the
     133 * translatable string uses a pipe ('|') which has the context the string is in.
     134 *
     135 * When the translated string is returned, it is everything before the pipe, not
     136 * including the pipe character. If there is no pipe in the translated text then
     137 * everything is returned.
    152138 *
    153139 * @since 2.2.0
     
    162148
    163149/**
    164  * __ngettext() - Retrieve the plural or single form based on the amount
    165  *
    166  * If the domain is not set in the $l10n list, then a comparsion
    167  * will be made and either $plural or $single parameters returned.
    168  *
    169  * If the domain does exist, then the parameters $single, $plural,
    170  * and $number will first be passed to the domain's ngettext method.
    171  * Then it will be passed to the 'ngettext' filter hook along with
    172  * the same parameters. The expected type will be a string.
     150 * Retrieve the plural or single form based on the amount.
     151 *
     152 * If the domain is not set in the $l10n list, then a comparsion will be made
     153 * and either $plural or $single parameters returned.
     154 *
     155 * If the domain does exist, then the parameters $single, $plural, and $number
     156 * will first be passed to the domain's ngettext method. Then it will be passed
     157 * to the 'ngettext' filter hook along with the same parameters. The expected
     158 * type will be a string.
    173159 *
    174160 * @since 1.2.0
     
    197183
    198184/**
    199  * __ngettext_noop() - register plural strings in POT file, but don't translate them
     185 * Register plural strings in POT file, but don't translate them.
    200186 *
    201187 * Used when you want do keep structures with translatable plural strings and
     
    223209
    224210/**
    225  * load_textdomain() - Loads MO file into the list of domains
    226  *
    227  * If the domain already exists, the inclusion will fail. If the
    228  * MO file is not readable, the inclusion will fail.
    229  *
    230  * On success, the mofile will be placed in the $l10n global by
    231  * $domain and will be an gettext_reader object.
     211 * Loads MO file into the list of domains.
     212 *
     213 * If the domain already exists, the inclusion will fail. If the MO file is not
     214 * readable, the inclusion will fail.
     215 *
     216 * On success, the mofile will be placed in the $l10n global by $domain and will
     217 * be an gettext_reader object.
    232218 *
    233219 * @since 1.5.0
     
    261247
    262248/**
    263  * load_default_textdomain() - Loads default translated strings based on locale
    264  *
    265  * Loads the .mo file in WP_LANG_DIR constant path from WordPress root.
    266  * The translated (.mo) file is named based off of the locale.
     249 * Loads default translated strings based on locale.
     250 *
     251 * Loads the .mo file in WP_LANG_DIR constant path from WordPress root. The
     252 * translated (.mo) file is named based off of the locale.
    267253 *
    268254 * @since 1.5.0
     
    277263
    278264/**
    279  * load_plugin_textdomain() - Loads the plugin's translated strings
    280  *
    281  * If the path is not given then it will be the root of the plugin
    282  * directory. The .mo file should be named based on the domain with a
    283  * dash followed by a dash, and then the locale exactly.
     265 * Loads the plugin's translated strings.
     266 *
     267 * If the path is not given then it will be the root of the plugin directory.
     268 * The .mo file should be named based on the domain with a dash followed by a
     269 * dash, and then the locale exactly.
    284270 *
    285271 * @since 1.5.0
     
    305291
    306292/**
    307  * load_theme_textdomain() - Includes theme's translated strings for the theme
     293 * Loads the theme's translated strings.
    308294 *
    309295 * If the current locale exists as a .mo file in the theme's root directory, it
Note: See TracChangeset for help on using the changeset viewer.