WordPress.org

Make WordPress Core

Ticket #18560: 18560.wp-includes-2.diff

File 18560.wp-includes-2.diff, 38.3 KB (added by SergeyBiryukov, 7 years ago)
  • wp-includes/kses.php

     
    842842 * Performs different checks for attribute values.
    843843 *
    844844 * The currently implemented checks are "maxlen", "minlen", "maxval", "minval"
    845  * and "valueless" with even more checks to come soon.
     845 * and "valueless".
    846846 *
    847847 * @since 1.0.0
    848848 *
     
    887887                        break;
    888888
    889889                case 'minval' :
    890                         # The minval check checks that the attribute value is a positive integer,
     890                        # The minval check makes sure that the attribute value is a positive integer,
    891891                        # and that it is not smaller than the given value.
    892892
    893893                        if (!preg_match('/^\s{0,6}[0-9]{1,6}\s{0,6}$/', $value))
     
    897897                        break;
    898898
    899899                case 'valueless' :
    900                         # The valueless check checks if the attribute has a value
     900                        # The valueless check makes sure if the attribute has a value
    901901                        # (like <a href="blah">) or not (<option selected>). If the given value
    902902                        # is a "y" or a "Y", the attribute must not have a value.
    903903                        # If the given value is an "n" or an "N", the attribute must have one.
     
    954954/**
    955955 * Strips slashes from in front of quotes.
    956956 *
    957  * This function changes the character sequence  \"  to just ". It leaves all
     957 * This function changes the character sequence \" to just ". It leaves all
    958958 * other slashes alone. It's really weird, but the quoting from
    959959 * preg_replace(//e) seems to require this.
    960960 *
    961961 * @since 1.0.0
    962962 *
    963963 * @param string $string String to strip slashes
    964  * @return string Fixed strings with quoted slashes
     964 * @return string Fixed string with quoted slashes
    965965 */
    966966function wp_kses_stripslashes($string) {
    967967        return preg_replace('%\\\\"%', '"', $string);
     
    10421042 * Callback for wp_kses_bad_protocol_once() regular expression.
    10431043 *
    10441044 * This function processes URL protocols, checks to see if they're in the
    1045  * white-list or not, and returns different data depending on the answer.
     1045 * whitelist or not, and returns different data depending on the answer.
    10461046 *
    10471047 * @access private
    10481048 * @since 1.0.0
     
    11191119/**
    11201120 * Callback for wp_kses_normalize_entities() regular expression.
    11211121 *
    1122  * This function helps wp_kses_normalize_entities() to only accept 16 bit values
     1122 * This function helps wp_kses_normalize_entities() to only accept 16-bit values
    11231123 * and nothing more for &#number; entities.
    11241124 *
    11251125 * @access private
     
    11661166 * Helper function to determine if a Unicode value is valid.
    11671167 *
    11681168 * @param int $i Unicode value
    1169  * @return bool true if the value was a valid Unicode number
     1169 * @return bool True if the value was a valid Unicode number
    11701170 */
    11711171function valid_unicode($i) {
    11721172        return ( $i == 0x9 || $i == 0xa || $i == 0xd ||
     
    13421342 * will be added.
    13431343 *
    13441344 * First removes all of the Kses filters in case the current user does not need
    1345  * to have Kses filter the content. If the user does not have unfiltered html
     1345 * to have Kses filter the content. If the user does not have unfiltered_html
    13461346 * capability, then Kses filters are added.
    13471347 *
    13481348 * @uses kses_remove_filters() Removes the Kses filters
  • wp-includes/l10n.php

     
    1616 * defined. Then it is filtered through the 'locale' filter hook and the value
    1717 * for the locale global set and the locale is returned.
    1818 *
    19  * The process to get the locale should only be done once but the locale will
     19 * The process to get the locale should only be done once, but the locale will
    2020 * always be filtered using the 'locale' hook.
    2121 *
    2222 * @since 1.5.0
     
    5353
    5454/**
    5555 * Retrieves the translation of $text. If there is no translation, or
    56  * the domain isn't loaded the original text is returned.
     56 * the domain isn't loaded, the original text is returned.
    5757 *
    5858 * @see __() Don't use translate() directly, use __()
    5959 * @since 2.2.0
     
    8484
    8585/**
    8686 * Retrieves the translation of $text. If there is no translation, or
    87  * the domain isn't loaded the original text is returned.
     87 * the domain isn't loaded, the original text is returned.
    8888 *
    8989 * @see translate() An alias of translate()
    9090 * @since 2.1.0
     
    9999
    100100/**
    101101 * Retrieves the translation of $text and escapes it for safe use in an attribute.
    102  * If there is no translation, or the domain isn't loaded the original text is returned.
     102 * If there is no translation, or the domain isn't loaded, the original text is returned.
    103103 *
    104104 * @see translate() An alias of translate()
    105105 * @see esc_attr()
     
    115115
    116116/**
    117117 * Retrieves the translation of $text and escapes it for safe use in HTML output.
    118  * If there is no translation, or the domain isn't loaded the original text is returned.
     118 * If there is no translation, or the domain isn't loaded, the original text is returned.
    119119 *
    120120 * @see translate() An alias of translate()
    121121 * @see esc_html()
     
    177177 * found in more than two places but with different translated context.
    178178 *
    179179 * By including the context in the pot file translators can translate the two
    180  * string differently.
     180 * strings differently.
    181181 *
    182182 * @since 2.8.0
    183183 *
     
    257257/**
    258258 * Register plural strings in POT file, but don't translate them.
    259259 *
    260  * Used when you want do keep structures with translatable plural strings and
     260 * Used when you want to keep structures with translatable plural strings and
    261261 * use them later.
    262262 *
    263263 * Example:
     
    291291 * Translate the result of _n_noop() or _nx_noop()
    292292 *
    293293 * @since 3.1
    294  * @param array $nooped_plural array with singular, plural and context keys, usually the result of _n_noop() or _nx_noop()
    295  * @param int $count number of objects
     294 * @param array $nooped_plural Array with singular, plural and context keys, usually the result of _n_noop() or _nx_noop()
     295 * @param int $count Number of objects
    296296 * @param string $domain Optional. The domain identifier the text should be retrieved in
    297297 */
    298298function translate_nooped_plural( $nooped_plural, $count, $domain = 'default' ) {
     
    316316 *
    317317 * @param string $domain Unique identifier for retrieving translated strings
    318318 * @param string $mofile Path to the .mo file
    319  * @return bool true on success, false on failure
     319 * @return bool True on success, false on failure
    320320 */
    321321function load_textdomain( $domain, $mofile ) {
    322322        global $l10n;
     
    373373 * Loads default translated strings based on locale.
    374374 *
    375375 * Loads the .mo file in WP_LANG_DIR constant path from WordPress root. The
    376  * translated (.mo) file is named based off of the locale.
     376 * translated (.mo) file is named based on the locale.
    377377 *
    378378 * @since 1.5.0
    379379 */
     
    422422 * @since 3.0.0
    423423 *
    424424 * @param string $domain Unique identifier for retrieving translated strings
    425  * @param strings $mu_plugin_rel_path Relative to WPMU_PLUGIN_DIR directory in which
    426  * the MO file resides. Defaults is empty string.
     425 * @param string $mu_plugin_rel_path Relative to WPMU_PLUGIN_DIR directory in which
     426 * the MO file resides. Defaults to empty string.
    427427 */
    428428function load_muplugin_textdomain( $domain, $mu_plugin_rel_path = '' ) {
    429429        $locale = apply_filters( 'plugin_locale', get_locale(), $domain );
     
    520520 * @since 3.0.0
    521521 *
    522522 * @param string $dir A directory in which to search for language files. The default directory is WP_LANG_DIR.
    523  * @return array Array of language codes or an empty array if no languages are present.  Language codes are formed by stripping the .mo extension from the language file names.
     523 * @return array Array of language codes or an empty array if no languages are present. Language codes are formed by stripping the .mo extension from the language file names.
    524524 */
    525525function get_available_languages( $dir = null ) {
    526526        $languages = array();
  • wp-includes/link-template.php

     
    560560/**
    561561 * Retrieve the feed link for a category.
    562562 *
    563  * Returns a link to the feed for all post in a given category. A specific feed
     563 * Returns a link to the feed for all posts in a given category. A specific feed
    564564 * can be requested or left blank to get the default feed.
    565565 *
    566566 * @package WordPress
     
    576576}
    577577
    578578/**
    579  * Retrieve the feed link for a taxonomy.
     579 * Retrieve the feed link for a term.
    580580 *
    581  * Returns a link to the feed for all post in a given term. A specific feed
     581 * Returns a link to the feed for all posts in a given term. A specific feed
    582582 * can be requested or left blank to get the default feed.
    583583 *
    584584 * @since 3.0
     
    586586 * @param int $term_id ID of a category.
    587587 * @param string $taxonomy Optional. Taxonomy of $term_id
    588588 * @param string $feed Optional. Feed type.
    589  * @return string Link to the feed for the taxonomy specified by $term_id and $taxonomy.
     589 * @return string Link to the feed for the term specified by $term_id and $taxonomy.
    590590*/
    591591function get_term_feed_link( $term_id, $taxonomy = 'category', $feed = '' ) {
    592592        global $wp_rewrite;
     
    895895 * @since 2.3.0
    896896 *
    897897 * @param int $id Optional. Post ID.
    898  * @param string $context Optional, default to display. How to write the '&', defaults to '&amp;'.
     898 * @param string $context Optional, defaults to display. How to write the '&', defaults to '&amp;'.
    899899 * @return string
    900900 */
    901901function get_edit_post_link( $id = 0, $context = 'display' ) {
     
    10641064 *
    10651065 * @since 1.5.0
    10661066 *
    1067  * @param bool $in_same_cat Optional. Whether post should be in same category.
     1067 * @param bool $in_same_cat Optional. Whether post should be in a same category.
    10681068 * @param array|string $excluded_categories Optional. Array or comma-separated list of excluded category IDs.
    10691069 * @return mixed Post object if successful. Null if global $post is not set. Empty string if no corresponding post exists.
    10701070 */
     
    10771077 *
    10781078 * @since 1.5.0
    10791079 *
    1080  * @param bool $in_same_cat Optional. Whether post should be in same category.
     1080 * @param bool $in_same_cat Optional. Whether post should be in a same category.
    10811081 * @param array|string $excluded_categories Optional. Array or comma-separated list of excluded category IDs.
    10821082 * @return mixed Post object if successful. Null if global $post is not set. Empty string if no corresponding post exists.
    10831083 */
     
    10921092 *
    10931093 * @since 2.5.0
    10941094 *
    1095  * @param bool $in_same_cat Optional. Whether post should be in same category.
     1095 * @param bool $in_same_cat Optional. Whether post should be in a same category.
    10961096 * @param array|string $excluded_categories Optional. Array or comma-separated list of excluded category IDs.
    10971097 * @param bool $previous Optional. Whether to retrieve previous post.
    10981098 * @return mixed Post object if successful. Null if global $post is not set. Empty string if no corresponding post exists.
     
    11701170 * @since 2.8.0
    11711171 *
    11721172 * @param string $title Optional. Link title format.
    1173  * @param bool $in_same_cat Optional. Whether link should be in same category.
     1173 * @param bool $in_same_cat Optional. Whether link should be in a same category.
    11741174 * @param array|string $excluded_categories Optional. Array or comma-separated list of excluded category IDs.
    1175  * @param bool $previous Optional, default is true. Whether display link to previous post.
     1175 * @param bool $previous Optional, default is true. Whether to display link to previous or next post.
    11761176 * @return string
    11771177 */
    11781178function get_adjacent_post_rel_link($title = '%title', $in_same_cat = false, $excluded_categories = '', $previous = true) {
     
    12071207 * @since 2.8.0
    12081208 *
    12091209 * @param string $title Optional. Link title format.
    1210  * @param bool $in_same_cat Optional. Whether link should be in same category.
     1210 * @param bool $in_same_cat Optional. Whether link should be in a same category.
    12111211 * @param array|string $excluded_categories Optional. Array or comma-separated list of excluded category IDs.
    12121212 */
    12131213function adjacent_posts_rel_link($title = '%title', $in_same_cat = false, $excluded_categories = '') {
     
    12181218/**
    12191219 * Display relational links for the posts adjacent to the current post for single post pages.
    12201220 *
    1221  * This is meant to be attached to actions like 'wp_head'.  Do not call this directly in plugins or theme templates.
     1221 * This is meant to be attached to actions like 'wp_head'. Do not call this directly in plugins or theme templates.
    12221222 * @since 3.0.0
    12231223 *
    12241224 */
     
    12341234 * @since 2.8.0
    12351235 *
    12361236 * @param string $title Optional. Link title format.
    1237  * @param bool $in_same_cat Optional. Whether link should be in same category.
     1237 * @param bool $in_same_cat Optional. Whether link should be in a same category.
    12381238 * @param array|string $excluded_categories Optional. Array or comma-separated list of excluded category IDs.
    12391239 */
    12401240function next_post_rel_link($title = '%title', $in_same_cat = false, $excluded_categories = '') {
     
    12471247 * @since 2.8.0
    12481248 *
    12491249 * @param string $title Optional. Link title format.
    1250  * @param bool $in_same_cat Optional. Whether link should be in same category.
     1250 * @param bool $in_same_cat Optional. Whether link should be in a same category.
    12511251 * @param array|string $excluded_categories Optional. Array or comma-separated list of excluded category IDs.
    12521252 */
    12531253function prev_post_rel_link($title = '%title', $in_same_cat = false, $excluded_categories = '') {
     
    12581258 * Retrieve boundary post.
    12591259 *
    12601260 * Boundary being either the first or last post by publish date within the constraints specified
    1261  * by in same category or excluded categories.
     1261 * by $in_same_cat or $excluded_categories.
    12621262 *
    12631263 * @since 2.8.0
    12641264 *
    1265  * @param bool $in_same_cat Optional. Whether returned post should be in same category.
     1265 * @param bool $in_same_cat Optional. Whether returned post should be in a same category.
    12661266 * @param array|string $excluded_categories Optional. Array or comma-separated list of excluded category IDs.
    12671267 * @param bool $start Optional. Whether to retrieve first or last post.
    12681268 * @return object
     
    13071307 * @since 2.8.0
    13081308 *
    13091309 * @param string $title Optional. Link title format.
    1310  * @param bool $in_same_cat Optional. Whether link should be in same category.
     1310 * @param bool $in_same_cat Optional. Whether link should be in a same category.
    13111311 * @param array|string $excluded_categories Optional. Array or comma-separated list of excluded category IDs.
    1312  * @param bool $start Optional, default is true. Whether display link to first or last post.
     1312 * @param bool $start Optional, default is true. Whether to display link to first or last post.
    13131313 * @return string
    13141314 */
    13151315function get_boundary_post_rel_link($title = '%title', $in_same_cat = false, $excluded_categories = '', $start = true) {
     
    13441344 * @since 2.8.0
    13451345 *
    13461346 * @param string $title Optional. Link title format.
    1347  * @param bool $in_same_cat Optional. Whether link should be in same category.
     1347 * @param bool $in_same_cat Optional. Whether link should be in a same category.
    13481348 * @param array|string $excluded_categories Optional. Array or comma-separated list of excluded category IDs.
    13491349 */
    13501350function start_post_rel_link($title = '%title', $in_same_cat = false, $excluded_categories = '') {
     
    14161416 *
    14171417 * @param string $format Optional. Link anchor format.
    14181418 * @param string $link Optional. Link permalink format.
    1419  * @param bool $in_same_cat Optional. Whether link should be in same category.
     1419 * @param bool $in_same_cat Optional. Whether link should be in a same category.
    14201420 * @param array|string $excluded_categories Optional. Array or comma-separated list of excluded category IDs.
    14211421 */
    14221422function previous_post_link($format='&laquo; %link', $link='%title', $in_same_cat = false, $excluded_categories = '') {
     
    14301430 *
    14311431 * @param string $format Optional. Link anchor format.
    14321432 * @param string $link Optional. Link permalink format.
    1433  * @param bool $in_same_cat Optional. Whether link should be in same category.
     1433 * @param bool $in_same_cat Optional. Whether link should be in a same category.
    14341434 * @param array|string $excluded_categories Optional. Array or comma-separated list of excluded category IDs.
    14351435 */
    14361436function next_post_link($format='%link &raquo;', $link='%title', $in_same_cat = false, $excluded_categories = '') {
     
    14461446 *
    14471447 * @param string $format Link anchor format.
    14481448 * @param string $link Link permalink format.
    1449  * @param bool $in_same_cat Optional. Whether link should be in same category.
     1449 * @param bool $in_same_cat Optional. Whether link should be in a same category.
    14501450 * @param array|string $excluded_categories Optional. Array or comma-separated list of excluded category IDs.
    1451  * @param bool $previous Optional, default is true. Whether display link to previous post.
     1451 * @param bool $previous Optional, default is true. Whether to display link to previous or next post.
    14521452 */
    14531453function adjacent_post_link($format, $link, $in_same_cat = false, $excluded_categories = '', $previous = true) {
    14541454        if ( $previous && is_attachment() )
     
    14801480}
    14811481
    14821482/**
    1483  * Retrieve get links for page numbers.
     1483 * Retrieve links for page numbers.
    14841484 *
    14851485 * @since 1.5.0
    14861486 *
     
    15421542}
    15431543
    15441544/**
    1545  * Retrieve next posts pages link.
     1545 * Retrieve next posts page link.
    15461546 *
    15471547 * Backported from 2.1.3 to 2.0.10.
    15481548 *
     
    15641564}
    15651565
    15661566/**
    1567  * Display or return the next posts pages link.
     1567 * Display or return the next posts page link.
    15681568 *
    15691569 * @since 0.71
    15701570 *
     
    15811581}
    15821582
    15831583/**
    1584  * Return the next posts pages link.
     1584 * Return the next posts page link.
    15851585 *
    15861586 * @since 2.7.0
    15871587 *
     
    16101610}
    16111611
    16121612/**
    1613  * Display the next posts pages link.
     1613 * Display the next posts page link.
    16141614 *
    16151615 * @since 0.71
    16161616 * @uses get_next_posts_link()
     
    16231623}
    16241624
    16251625/**
    1626  * Retrieve previous post pages link.
     1626 * Retrieve previous posts page link.
    16271627 *
    16281628 * Will only return string, if not on a single page or post.
    16291629 *
     
    16451645}
    16461646
    16471647/**
    1648  * Display or return the previous posts pages link.
     1648 * Display or return the previous posts page link.
    16491649 *
    16501650 * @since 0.71
    16511651 *
     
    16611661}
    16621662
    16631663/**
    1664  * Return the previous posts pages link.
     1664 * Return the previous posts page link.
    16651665 *
    16661666 * @since 2.7.0
    16671667 *
     
    17461746}
    17471747
    17481748/**
    1749  * Retrieve page numbers links.
     1749 * Retrieve comments page number link.
    17501750 *
    17511751 * @since 2.7.0
    17521752 *
     
    17821782}
    17831783
    17841784/**
    1785  * Return the link to next comments pages.
     1785 * Return the link to next comments page.
    17861786 *
    17871787 * @since 2.7.1
    17881788 *
     
    18161816}
    18171817
    18181818/**
    1819  * Display the link to next comments pages.
     1819 * Display the link to next comments page.
    18201820 *
    18211821 * @since 2.7.0
    18221822 *
     
    18691869 * @see paginate_links()
    18701870 * @since 2.7.0
    18711871 *
    1872  * @param string|array $args Optional args. See paginate_links.
     1872 * @param string|array $args Optional args. See paginate_links().
    18731873 * @return string Markup for pagination links.
    18741874*/
    18751875function paginate_comments_links($args = array()) {
     
    19351935/**
    19361936 * Retrieve the home url for the current site.
    19371937 *
    1938  * Returns the 'home' option with the appropriate protocol,  'https' if
     1938 * Returns the 'home' option with the appropriate protocol, 'https' if
    19391939 * is_ssl() and 'http' otherwise. If $scheme is 'http' or 'https', is_ssl() is
    19401940 * overridden.
    19411941 *
     
    19451945 * @uses get_home_url()
    19461946 *
    19471947 * @param  string $path   (optional) Path relative to the home url.
    1948  * @param  string $scheme (optional) Scheme to give the home url context. Currently 'http','https'
     1948 * @param  string $scheme (optional) Scheme to give the home url context. Currently 'http', 'https'.
    19491949 * @return string Home url link with optional path appended.
    19501950*/
    19511951function home_url( $path = '', $scheme = null ) {
     
    19551955/**
    19561956 * Retrieve the home url for a given site.
    19571957 *
    1958  * Returns the 'home' option with the appropriate protocol,  'https' if
     1958 * Returns the 'home' option with the appropriate protocol, 'https' if
    19591959 * is_ssl() and 'http' otherwise. If $scheme is 'http' or 'https', is_ssl() is
    19601960 * overridden.
    19611961 *
     
    19641964 *
    19651965 * @param  int $blog_id   (optional) Blog ID. Defaults to current blog.
    19661966 * @param  string $path   (optional) Path relative to the home url.
    1967  * @param  string $scheme (optional) Scheme to give the home url context. Currently 'http','https'
     1967 * @param  string $scheme (optional) Scheme to give the home url context. Currently 'http', 'https'.
    19681968 * @return string Home url link with optional path appended.
    19691969*/
    19701970function get_home_url( $blog_id = null, $path = '', $scheme = null ) {
     
    19901990/**
    19911991 * Retrieve the site url for the current site.
    19921992 *
    1993  * Returns the 'site_url' option with the appropriate protocol,  'https' if
     1993 * Returns the 'site_url' option with the appropriate protocol, 'https' if
    19941994 * is_ssl() and 'http' otherwise. If $scheme is 'http' or 'https', is_ssl() is
    19951995 * overridden.
    19961996 *
     
    20002000 * @uses get_site_url()
    20012001 *
    20022002 * @param string $path Optional. Path relative to the site url.
    2003  * @param string $scheme Optional. Scheme to give the site url context. Currently 'http','https', 'login', 'login_post', or 'admin'.
     2003 * @param string $scheme Optional. Scheme to give the site url context. Currently 'http', 'https', 'login', 'login_post', or 'admin'.
    20042004 * @return string Site url link with optional path appended.
    20052005*/
    20062006function site_url( $path = '', $scheme = null ) {
     
    20102010/**
    20112011 * Retrieve the site url for a given site.
    20122012 *
    2013  * Returns the 'site_url' option with the appropriate protocol,  'https' if
     2013 * Returns the 'site_url' option with the appropriate protocol, 'https' if
    20142014 * is_ssl() and 'http' otherwise. If $scheme is 'http' or 'https', is_ssl() is
    20152015 * overridden.
    20162016 *
     
    20192019 *
    20202020 * @param int $blog_id (optional) Blog ID. Defaults to current blog.
    20212021 * @param string $path Optional. Path relative to the site url.
    2022  * @param string $scheme Optional. Scheme to give the site url context. Currently 'http','https', 'login', 'login_post', or 'admin'.
     2022 * @param string $scheme Optional. Scheme to give the site url context. Currently 'http', 'https', 'login', 'login_post', or 'admin'.
    20232023 * @return string Site url link with optional path appended.
    20242024*/
    20252025function get_site_url( $blog_id = null, $path = '', $scheme = null ) {
     
    20562056 * @package WordPress
    20572057 * @since 2.6.0
    20582058 *
    2059  * @param string $path Optional path relative to the admin url
     2059 * @param string $path Optional path relative to the admin url.
    20602060 * @param string $scheme The scheme to use. Default is 'admin', which obeys force_ssl_admin() and is_ssl(). 'http' or 'https' can be passed to force those schemes.
    2061  * @return string Admin url link with optional path appended
     2061 * @return string Admin url link with optional path appended.
    20622062*/
    20632063function admin_url( $path = '', $scheme = 'admin' ) {
    20642064        return get_admin_url(null, $path, $scheme);
     
    20712071 * @since 3.0.0
    20722072 *
    20732073 * @param int $blog_id (optional) Blog ID. Defaults to current blog.
    2074  * @param string $path Optional path relative to the admin url
     2074 * @param string $path Optional path relative to the admin url.
    20752075 * @param string $scheme The scheme to use. Default is 'admin', which obeys force_ssl_admin() and is_ssl(). 'http' or 'https' can be passed to force those schemes.
    2076  * @return string Admin url link with optional path appended
     2076 * @return string Admin url link with optional path appended.
    20772077*/
    20782078function get_admin_url( $blog_id = null, $path = '', $scheme = 'admin' ) {
    20792079        $url = get_site_url($blog_id, 'wp-admin/', $scheme);
     
    21642164/**
    21652165 * Retrieve the site url for the current network.
    21662166 *
    2167  * Returns the site url with the appropriate protocol,  'https' if
     2167 * Returns the site url with the appropriate protocol, 'https' if
    21682168 * is_ssl() and 'http' otherwise. If $scheme is 'http' or 'https', is_ssl() is
    21692169 * overridden.
    21702170 *
     
    21722172 * @since 3.0.0
    21732173 *
    21742174 * @param string $path Optional. Path relative to the site url.
    2175  * @param string $scheme Optional. Scheme to give the site url context. Currently 'http','https', 'login', 'login_post', or 'admin'.
     2175 * @param string $scheme Optional. Scheme to give the site url context. Currently 'http', 'https', 'login', 'login_post', or 'admin'.
    21762176 * @return string Site url link with optional path appended.
    21772177*/
    21782178function network_site_url( $path = '', $scheme = null ) {
     
    22042204/**
    22052205 * Retrieve the home url for the current network.
    22062206 *
    2207  * Returns the home url with the appropriate protocol,  'https' if
     2207 * Returns the home url with the appropriate protocol, 'https' if
    22082208 * is_ssl() and 'http' otherwise. If $scheme is 'http' or 'https', is_ssl() is
    22092209 * overridden.
    22102210 *
     
    22122212 * @since 3.0.0
    22132213 *
    22142214 * @param  string $path   (optional) Path relative to the home url.
    2215  * @param  string $scheme (optional) Scheme to give the home url context. Currently 'http','https'
     2215 * @param  string $scheme (optional) Scheme to give the home url context. Currently 'http', 'https'.
    22162216 * @return string Home url link with optional path appended.
    22172217*/
    22182218function network_home_url( $path = '', $scheme = null ) {
     
    22402240 * @package WordPress
    22412241 * @since 3.0.0
    22422242 *
    2243  * @param string $path Optional path relative to the admin url
     2243 * @param string $path Optional path relative to the admin url.
    22442244 * @param string $scheme The scheme to use. Default is 'admin', which obeys force_ssl_admin() and is_ssl(). 'http' or 'https' can be passed to force those schemes.
    2245  * @return string Admin url link with optional path appended
     2245 * @return string Admin url link with optional path appended.
    22462246*/
    22472247function network_admin_url( $path = '', $scheme = 'admin' ) {
    22482248        if ( ! is_multisite() )
     
    22622262 * @package WordPress
    22632263 * @since 3.0.0
    22642264 *
    2265  * @param string $path Optional path relative to the admin url
     2265 * @param string $path Optional path relative to the admin url.
    22662266 * @param string $scheme The scheme to use. Default is 'admin', which obeys force_ssl_admin() and is_ssl(). 'http' or 'https' can be passed to force those schemes.
    2267  * @return string Admin url link with optional path appended
     2267 * @return string Admin url link with optional path appended.
    22682268*/
    22692269function user_admin_url( $path = '', $scheme = 'admin' ) {
    22702270        $url = network_site_url('wp-admin/user/', $scheme);
     
    22812281 * @package WordPress
    22822282 * @since 3.1.0
    22832283 *
    2284  * @param string $path Optional path relative to the admin url
     2284 * @param string $path Optional path relative to the admin url.
    22852285 * @param string $scheme The scheme to use. Default is 'admin', which obeys force_ssl_admin() and is_ssl(). 'http' or 'https' can be passed to force those schemes.
    2286  * @return string Admin url link with optional path appended
     2286 * @return string Admin url link with optional path appended.
    22872287*/
    22882288function self_admin_url($path = '', $scheme = 'admin') {
    22892289        if ( is_network_admin() )
     
    22972297/**
    22982298 * Get the URL to the user's dashboard.
    22992299 *
    2300  * If a user does not belong to any sites, the global user dashboard is used.  If the user belongs to the current site,
    2301  * the dashboard for the current site is returned.  If the user cannot edit the current site, the dashboard to the user's
     2300 * If a user does not belong to any site, the global user dashboard is used.  If the user belongs to the current site,
     2301 * the dashboard for the current site is returned. If the user cannot edit the current site, the dashboard to the user's
    23022302 * primary blog is returned.
    23032303 *
    23042304 * @since 3.1.0
    23052305 *
    23062306 * @param int $user_id User ID
    2307  * @param string $path Optional path relative to the dashboard.  Use only paths known to both blog and user admins.
     2307 * @param string $path Optional path relative to the dashboard. Use only paths known to both blog and user admins.
    23082308 * @param string $scheme The scheme to use. Default is 'admin', which obeys force_ssl_admin() and is_ssl(). 'http' or 'https' can be passed to force those schemes.
    2309  * @return string Dashboard url link with optional path appended
     2309 * @return string Dashboard url link with optional path appended.
    23102310 */
    23112311function get_dashboard_url( $user_id, $path = '', $scheme = 'admin' ) {
    23122312        $user_id = (int) $user_id;
     
    23392339 *
    23402340 * @param int $user User ID
    23412341 * @param string $scheme The scheme to use. Default is 'admin', which obeys force_ssl_admin() and is_ssl(). 'http' or 'https' can be passed to force those schemes.
    2342  * @return string Dashboard url link with optional path appended
     2342 * @return string Dashboard url link with optional path appended.
    23432343 */
    23442344function get_edit_profile_url( $user, $scheme = 'admin' ) {
    23452345        $user = (int) $user;
     
    23552355}
    23562356
    23572357/**
    2358  * Output rel=canonical for singular queries
     2358 * Output rel=canonical for singular queries.
    23592359 *
    23602360 * @package WordPress
    23612361 * @since 2.9.0
     
    23752375/**
    23762376 * Return a shortlink for a post, page, attachment, or blog.
    23772377 *
    2378  * This function exists to provide a shortlink tag that all themes and plugins can target.  A plugin must hook in to
    2379  * provide the actual shortlinks.  Default shortlink support is limited to providing ?p= style links for posts.
    2380  * Plugins can short circuit this function via the pre_get_shortlink filter or filter the output
     2378 * This function exists to provide a shortlink tag that all themes and plugins can target. A plugin must hook in to
     2379 * provide the actual shortlinks. Default shortlink support is limited to providing ?p= style links for posts.
     2380 * Plugins can short-circuit this function via the pre_get_shortlink filter or filter the output
    23812381 * via the get_shortlink filter.
    23822382 *
    23832383 * @since 3.0.0.
    23842384 *
    2385  * @param int $id A post or blog id.  Default is 0, which means the current post or blog.
     2385 * @param int $id A post or blog id. Default is 0, which means the current post or blog.
    23862386 * @param string $context Whether the id is a 'blog' id, 'post' id, or 'media' id. If 'post', the post_type of the post is consulted. If 'query', the current query is consulted to determine the id and context. Default is 'post'.
    23872387 * @param bool $allow_slugs Whether to allow post slugs in the shortlink. It is up to the plugin how and whether to honor this.
    23882388 * @return string A shortlink or an empty string if no shortlink exists for the requested resource or if shortlinks are not enabled.
     
    24622462 *
    24632463 * @since 3.0.0
    24642464 *
    2465  * @param string $text Optional The link text or HTML to be displayed.  Defaults to 'This is the short link.'
    2466  * @param string $title Optional The tooltip for the link.  Must be sanitized. Defaults to the sanitized post title.
     2465 * @param string $text Optional The link text or HTML to be displayed. Defaults to 'This is the short link.'
     2466 * @param string $title Optional The tooltip for the link. Must be sanitized. Defaults to the sanitized post title.
    24672467 * @param string $before Optional HTML to display before the link.
    2468  * @param string $before Optional HTML to display after the link.
     2468 * @param string $after Optional HTML to display after the link.
    24692469 */
    24702470function the_shortlink( $text = '', $title = '', $before = '', $after = '' ) {
    24712471        global $post;
  • wp-includes/load.php

     
    186186 *
    187187 * @access private
    188188 * @since 0.71
    189  * @global int $timestart Seconds and Microseconds added together from when function is called.
     189 * @global int $timestart Seconds and microseconds added together from when function is called.
    190190 * @return bool Always returns true.
    191191 */
    192192function timer_start() {
     
    210210 * timer_stop(1);
    211211 * </code>
    212212 * which will do what the above does. If you need the result, you can assign it to a variable, but
    213  * most cases, you only need to echo it.
     213 * in most cases, you only need to echo it.
    214214 *
    215215 * @since 0.71
    216  * @global int $timestart Seconds and Microseconds added together from when timer_start() is called
    217  * @global int $timeend  Seconds and Microseconds added together from when function is called
     216 * @global int $timestart Seconds and microseconds added together from when timer_start() is called
     217 * @global int $timeend Seconds and microseconds added together from when function is called
    218218 *
    219219 * @param int $display Use '0' or null to not echo anything and 1 to echo the total time
    220220 * @param int $precision The amount of digits from the right of the decimal to display. Default is 3.
     
    287287 *
    288288 * To set directory manually, define <code>WP_LANG_DIR</code> in wp-config.php.
    289289 *
    290  * If the language directory exists within WP_CONTENT_DIR that is used
    291  * Otherwise if the language directory exists within WPINC, that's used
    292  * Finally, If neither of the preceeding directories is found,
     290 * If the language directory exists within WP_CONTENT_DIR, that is used.
     291 * Otherwise if the language directory exists within WPINC, that's used.
     292 * Finally, if neither of the preceding directories are found,
    293293 * WP_CONTENT_DIR/languages is used.
    294294 *
    295295 * The WP_LANG_DIR constant was introduced in 2.1.0.
     
    396396        } else if ( !$_wp_using_ext_object_cache && file_exists( WP_CONTENT_DIR . '/object-cache.php' ) ) {
    397397                // Sometimes advanced-cache.php can load object-cache.php before it is loaded here.
    398398                // This breaks the function_exists check above and can result in $_wp_using_ext_object_cache
    399                 // being set incorrectly.  Double check if an external cache exists.
     399                // being set incorrectly. Double check if an external cache exists.
    400400                $_wp_using_ext_object_cache = true;
    401401        }
    402402
  • wp-includes/locale.php

     
    2525         * Stores the translated strings for the one character weekday names.
    2626         *
    2727         * There is a hack to make sure that Tuesday and Thursday, as well
    28          * as Sunday and Saturday don't conflict. See init() method for more.
     28         * as Sunday and Saturday, don't conflict. See init() method for more.
    2929         *
    3030         * @see WP_Locale::init() for how to handle the hack.
    3131         *
  • wp-includes/media.php

     
    1717 * than the supported will result in the content_width size or 500 if that is
    1818 * not set.
    1919 *
    20  * Finally, there is a filter named, 'editor_max_image_size' that will be called
     20 * Finally, there is a filter named 'editor_max_image_size', that will be called
    2121 * on the calculated array for width and height, respectively. The second
    2222 * parameter will be the value that was in the $size parameter. The returned
    2323 * type for the hook is an array with the width as the first element and the
     
    177177
    178178/**
    179179 * Registers a new image size
     180 *
     181 * @since 2.9.0
    180182 */
    181183function add_image_size( $name, $width = 0, $height = 0, $crop = false ) {
    182184        global $_wp_additional_image_sizes;
     
    185187
    186188/**
    187189 * Registers an image size for the post thumbnail
     190 *
     191 * @since 2.9.0
    188192 */
    189193function set_post_thumbnail_size( $width = 0, $height = 0, $crop = false ) {
    190194        add_image_size( 'post-thumbnail', $width, $height, $crop );
     
    329333 * @param int $dest_w New width.
    330334 * @param int $dest_h New height.
    331335 * @param bool $crop Optional, default is false. Whether to crop image or resize.
    332  * @return bool|array False, on failure. Returned array matches parameters for imagecopyresampled() PHP function.
     336 * @return bool|array False on failure. Returned array matches parameters for imagecopyresampled() PHP function.
    333337 */
    334338function image_resize_dimensions($orig_w, $orig_h, $dest_w, $dest_h, $crop = false) {
    335339
     
    398402 * @param int $max_w Maximum width to resize to.
    399403 * @param int $max_h Maximum height to resize to.
    400404 * @param bool $crop Optional. Whether to crop image or resize.
    401  * @param string $suffix Optional. File Suffix.
     405 * @param string $suffix Optional. File suffix.
    402406 * @param string $dest_path Optional. New image file path.
    403407 * @param int $jpeg_quality Optional, default is 90. Image quality percentage.
    404408 * @return mixed WP_Error on failure. String with new destination path.
     
    669673}
    670674
    671675/**
    672  * Adds a 'wp-post-image' class to post thumbnail thumbnails
     676 * Adds a 'wp-post-image' class to post thumbnails
    673677 * Uses the begin_fetch_post_thumbnail_html and end_fetch_post_thumbnail_html action hooks to
    674  * dynamically add/remove itself so as to only filter post thumbnail thumbnails
     678 * dynamically add/remove itself so as to only filter post thumbnails
    675679 *
    676680 * @since 2.9.0
    677681 * @param array $attr Attributes including src, class, alt, title
     
    752756 *
    753757 * @since 2.5.0
    754758 *
    755  * @param array $attr Attributes attributed to the shortcode.
     759 * @param array $attr Attributes of the shortcode.
    756760 * @return string HTML content to display gallery.
    757761 */
    758762function gallery_shortcode($attr) {
     
    906910 *
    907911 * @since 2.5.0
    908912 *
    909  * @param bool $prev Optional. Default is true to display previous link, true for next.
     913 * @param bool $prev Optional. Default is true to display previous link, false for next.
    910914 */
    911915function adjacent_image_link($prev = true, $size = 'thumbnail', $text = false) {
    912916        global $post;
     
    10791083        }
    10801084
    10811085        /**
    1082          * If a post/page was saved, then output Javascript to make
     1086         * If a post/page was saved, then output JavaScript to make
    10831087         * an AJAX request that will call WP_Embed::cache_oembed().
    10841088         */
    10851089        function maybe_run_ajax_cache() {
     
    13731377 * @uses WP_oEmbed::get_html()
    13741378 *
    13751379 * @param string $url The URL that should be embeded.
    1376  * @param array $args Addtional arguments and parameters.
     1380 * @param array $args Additional arguments and parameters.
    13771381 * @return string The original URL on failure or the embed HTML on success.
    13781382 */
    13791383function wp_oembed_get( $url, $args = '' ) {
  • wp-includes/pomo/translations.php

     
    8181        /**
    8282         * Given the number of items, returns the 0-based index of the plural form to use
    8383         *
    84          * Here, in the base Translations class, the commong logic for English is implmented:
     84         * Here, in the base Translations class, the common logic for English is implemented:
    8585         *      0 if there is one element, 1 otherwise
    8686         *
    8787         * This function should be overrided by the sub-classes. For example MO/PO can derive the logic
  • wp-includes/post-thumbnail-template.php

     
    5050/**
    5151 * Update cache for thumbnails in the current loop
    5252 *
    53  * @sicne 3.2
     53 * @since 3.2
    5454 */
    5555function update_post_thumbnail_cache() {
    5656        global $wp_query;