Ticket #18560: 18560.wp-includes-2.diff
| File 18560.wp-includes-2.diff, 38.3 KB (added by , 15 years ago) |
|---|
-
wp-includes/kses.php
842 842 * Performs different checks for attribute values. 843 843 * 844 844 * The currently implemented checks are "maxlen", "minlen", "maxval", "minval" 845 * and "valueless" with even more checks to come soon.845 * and "valueless". 846 846 * 847 847 * @since 1.0.0 848 848 * … … 887 887 break; 888 888 889 889 case 'minval' : 890 # The minval check checksthat the attribute value is a positive integer,890 # The minval check makes sure that the attribute value is a positive integer, 891 891 # and that it is not smaller than the given value. 892 892 893 893 if (!preg_match('/^\s{0,6}[0-9]{1,6}\s{0,6}$/', $value)) … … 897 897 break; 898 898 899 899 case 'valueless' : 900 # The valueless check checksif the attribute has a value900 # The valueless check makes sure if the attribute has a value 901 901 # (like <a href="blah">) or not (<option selected>). If the given value 902 902 # is a "y" or a "Y", the attribute must not have a value. 903 903 # If the given value is an "n" or an "N", the attribute must have one. … … 954 954 /** 955 955 * Strips slashes from in front of quotes. 956 956 * 957 * This function changes the character sequence \" to just". It leaves all957 * This function changes the character sequence \" to just ". It leaves all 958 958 * other slashes alone. It's really weird, but the quoting from 959 959 * preg_replace(//e) seems to require this. 960 960 * 961 961 * @since 1.0.0 962 962 * 963 963 * @param string $string String to strip slashes 964 * @return string Fixed string swith quoted slashes964 * @return string Fixed string with quoted slashes 965 965 */ 966 966 function wp_kses_stripslashes($string) { 967 967 return preg_replace('%\\\\"%', '"', $string); … … 1042 1042 * Callback for wp_kses_bad_protocol_once() regular expression. 1043 1043 * 1044 1044 * 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. 1046 1046 * 1047 1047 * @access private 1048 1048 * @since 1.0.0 … … 1119 1119 /** 1120 1120 * Callback for wp_kses_normalize_entities() regular expression. 1121 1121 * 1122 * This function helps wp_kses_normalize_entities() to only accept 16 bit values1122 * This function helps wp_kses_normalize_entities() to only accept 16-bit values 1123 1123 * and nothing more for &#number; entities. 1124 1124 * 1125 1125 * @access private … … 1166 1166 * Helper function to determine if a Unicode value is valid. 1167 1167 * 1168 1168 * @param int $i Unicode value 1169 * @return bool true if the value was a valid Unicode number1169 * @return bool True if the value was a valid Unicode number 1170 1170 */ 1171 1171 function valid_unicode($i) { 1172 1172 return ( $i == 0x9 || $i == 0xa || $i == 0xd || … … 1342 1342 * will be added. 1343 1343 * 1344 1344 * 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 html1345 * to have Kses filter the content. If the user does not have unfiltered_html 1346 1346 * capability, then Kses filters are added. 1347 1347 * 1348 1348 * @uses kses_remove_filters() Removes the Kses filters -
wp-includes/l10n.php
16 16 * defined. Then it is filtered through the 'locale' filter hook and the value 17 17 * for the locale global set and the locale is returned. 18 18 * 19 * The process to get the locale should only be done once but the locale will19 * The process to get the locale should only be done once, but the locale will 20 20 * always be filtered using the 'locale' hook. 21 21 * 22 22 * @since 1.5.0 … … 53 53 54 54 /** 55 55 * 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. 57 57 * 58 58 * @see __() Don't use translate() directly, use __() 59 59 * @since 2.2.0 … … 84 84 85 85 /** 86 86 * 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. 88 88 * 89 89 * @see translate() An alias of translate() 90 90 * @since 2.1.0 … … 99 99 100 100 /** 101 101 * 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. 103 103 * 104 104 * @see translate() An alias of translate() 105 105 * @see esc_attr() … … 115 115 116 116 /** 117 117 * 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. 119 119 * 120 120 * @see translate() An alias of translate() 121 121 * @see esc_html() … … 177 177 * found in more than two places but with different translated context. 178 178 * 179 179 * By including the context in the pot file translators can translate the two 180 * string differently.180 * strings differently. 181 181 * 182 182 * @since 2.8.0 183 183 * … … 257 257 /** 258 258 * Register plural strings in POT file, but don't translate them. 259 259 * 260 * Used when you want do keep structures with translatable plural strings and260 * Used when you want to keep structures with translatable plural strings and 261 261 * use them later. 262 262 * 263 263 * Example: … … 291 291 * Translate the result of _n_noop() or _nx_noop() 292 292 * 293 293 * @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 objects294 * @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 296 296 * @param string $domain Optional. The domain identifier the text should be retrieved in 297 297 */ 298 298 function translate_nooped_plural( $nooped_plural, $count, $domain = 'default' ) { … … 316 316 * 317 317 * @param string $domain Unique identifier for retrieving translated strings 318 318 * @param string $mofile Path to the .mo file 319 * @return bool true on success, false on failure319 * @return bool True on success, false on failure 320 320 */ 321 321 function load_textdomain( $domain, $mofile ) { 322 322 global $l10n; … … 373 373 * Loads default translated strings based on locale. 374 374 * 375 375 * Loads the .mo file in WP_LANG_DIR constant path from WordPress root. The 376 * translated (.mo) file is named based o ff ofthe locale.376 * translated (.mo) file is named based on the locale. 377 377 * 378 378 * @since 1.5.0 379 379 */ … … 422 422 * @since 3.0.0 423 423 * 424 424 * @param string $domain Unique identifier for retrieving translated strings 425 * @param string s$mu_plugin_rel_path Relative to WPMU_PLUGIN_DIR directory in which426 * the MO file resides. Defaults isempty 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. 427 427 */ 428 428 function load_muplugin_textdomain( $domain, $mu_plugin_rel_path = '' ) { 429 429 $locale = apply_filters( 'plugin_locale', get_locale(), $domain ); … … 520 520 * @since 3.0.0 521 521 * 522 522 * @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. 524 524 */ 525 525 function get_available_languages( $dir = null ) { 526 526 $languages = array(); -
wp-includes/link-template.php
560 560 /** 561 561 * Retrieve the feed link for a category. 562 562 * 563 * Returns a link to the feed for all post in a given category. A specific feed563 * Returns a link to the feed for all posts in a given category. A specific feed 564 564 * can be requested or left blank to get the default feed. 565 565 * 566 566 * @package WordPress … … 576 576 } 577 577 578 578 /** 579 * Retrieve the feed link for a t axonomy.579 * Retrieve the feed link for a term. 580 580 * 581 * Returns a link to the feed for all post in a given term. A specific feed581 * Returns a link to the feed for all posts in a given term. A specific feed 582 582 * can be requested or left blank to get the default feed. 583 583 * 584 584 * @since 3.0 … … 586 586 * @param int $term_id ID of a category. 587 587 * @param string $taxonomy Optional. Taxonomy of $term_id 588 588 * @param string $feed Optional. Feed type. 589 * @return string Link to the feed for the t axonomyspecified by $term_id and $taxonomy.589 * @return string Link to the feed for the term specified by $term_id and $taxonomy. 590 590 */ 591 591 function get_term_feed_link( $term_id, $taxonomy = 'category', $feed = '' ) { 592 592 global $wp_rewrite; … … 895 895 * @since 2.3.0 896 896 * 897 897 * @param int $id Optional. Post ID. 898 * @param string $context Optional, default to display. How to write the '&', defaults to '&'.898 * @param string $context Optional, defaults to display. How to write the '&', defaults to '&'. 899 899 * @return string 900 900 */ 901 901 function get_edit_post_link( $id = 0, $context = 'display' ) { … … 1064 1064 * 1065 1065 * @since 1.5.0 1066 1066 * 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. 1068 1068 * @param array|string $excluded_categories Optional. Array or comma-separated list of excluded category IDs. 1069 1069 * @return mixed Post object if successful. Null if global $post is not set. Empty string if no corresponding post exists. 1070 1070 */ … … 1077 1077 * 1078 1078 * @since 1.5.0 1079 1079 * 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. 1081 1081 * @param array|string $excluded_categories Optional. Array or comma-separated list of excluded category IDs. 1082 1082 * @return mixed Post object if successful. Null if global $post is not set. Empty string if no corresponding post exists. 1083 1083 */ … … 1092 1092 * 1093 1093 * @since 2.5.0 1094 1094 * 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. 1096 1096 * @param array|string $excluded_categories Optional. Array or comma-separated list of excluded category IDs. 1097 1097 * @param bool $previous Optional. Whether to retrieve previous post. 1098 1098 * @return mixed Post object if successful. Null if global $post is not set. Empty string if no corresponding post exists. … … 1170 1170 * @since 2.8.0 1171 1171 * 1172 1172 * @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. 1174 1174 * @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 previouspost.1175 * @param bool $previous Optional, default is true. Whether to display link to previous or next post. 1176 1176 * @return string 1177 1177 */ 1178 1178 function get_adjacent_post_rel_link($title = '%title', $in_same_cat = false, $excluded_categories = '', $previous = true) { … … 1207 1207 * @since 2.8.0 1208 1208 * 1209 1209 * @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. 1211 1211 * @param array|string $excluded_categories Optional. Array or comma-separated list of excluded category IDs. 1212 1212 */ 1213 1213 function adjacent_posts_rel_link($title = '%title', $in_same_cat = false, $excluded_categories = '') { … … 1218 1218 /** 1219 1219 * Display relational links for the posts adjacent to the current post for single post pages. 1220 1220 * 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. 1222 1222 * @since 3.0.0 1223 1223 * 1224 1224 */ … … 1234 1234 * @since 2.8.0 1235 1235 * 1236 1236 * @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. 1238 1238 * @param array|string $excluded_categories Optional. Array or comma-separated list of excluded category IDs. 1239 1239 */ 1240 1240 function next_post_rel_link($title = '%title', $in_same_cat = false, $excluded_categories = '') { … … 1247 1247 * @since 2.8.0 1248 1248 * 1249 1249 * @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. 1251 1251 * @param array|string $excluded_categories Optional. Array or comma-separated list of excluded category IDs. 1252 1252 */ 1253 1253 function prev_post_rel_link($title = '%title', $in_same_cat = false, $excluded_categories = '') { … … 1258 1258 * Retrieve boundary post. 1259 1259 * 1260 1260 * Boundary being either the first or last post by publish date within the constraints specified 1261 * by in same category or excludedcategories.1261 * by $in_same_cat or $excluded_categories. 1262 1262 * 1263 1263 * @since 2.8.0 1264 1264 * 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. 1266 1266 * @param array|string $excluded_categories Optional. Array or comma-separated list of excluded category IDs. 1267 1267 * @param bool $start Optional. Whether to retrieve first or last post. 1268 1268 * @return object … … 1307 1307 * @since 2.8.0 1308 1308 * 1309 1309 * @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. 1311 1311 * @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. 1313 1313 * @return string 1314 1314 */ 1315 1315 function get_boundary_post_rel_link($title = '%title', $in_same_cat = false, $excluded_categories = '', $start = true) { … … 1344 1344 * @since 2.8.0 1345 1345 * 1346 1346 * @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. 1348 1348 * @param array|string $excluded_categories Optional. Array or comma-separated list of excluded category IDs. 1349 1349 */ 1350 1350 function start_post_rel_link($title = '%title', $in_same_cat = false, $excluded_categories = '') { … … 1416 1416 * 1417 1417 * @param string $format Optional. Link anchor format. 1418 1418 * @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. 1420 1420 * @param array|string $excluded_categories Optional. Array or comma-separated list of excluded category IDs. 1421 1421 */ 1422 1422 function previous_post_link($format='« %link', $link='%title', $in_same_cat = false, $excluded_categories = '') { … … 1430 1430 * 1431 1431 * @param string $format Optional. Link anchor format. 1432 1432 * @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. 1434 1434 * @param array|string $excluded_categories Optional. Array or comma-separated list of excluded category IDs. 1435 1435 */ 1436 1436 function next_post_link($format='%link »', $link='%title', $in_same_cat = false, $excluded_categories = '') { … … 1446 1446 * 1447 1447 * @param string $format Link anchor format. 1448 1448 * @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. 1450 1450 * @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 previouspost.1451 * @param bool $previous Optional, default is true. Whether to display link to previous or next post. 1452 1452 */ 1453 1453 function adjacent_post_link($format, $link, $in_same_cat = false, $excluded_categories = '', $previous = true) { 1454 1454 if ( $previous && is_attachment() ) … … 1480 1480 } 1481 1481 1482 1482 /** 1483 * Retrieve getlinks for page numbers.1483 * Retrieve links for page numbers. 1484 1484 * 1485 1485 * @since 1.5.0 1486 1486 * … … 1542 1542 } 1543 1543 1544 1544 /** 1545 * Retrieve next posts page slink.1545 * Retrieve next posts page link. 1546 1546 * 1547 1547 * Backported from 2.1.3 to 2.0.10. 1548 1548 * … … 1564 1564 } 1565 1565 1566 1566 /** 1567 * Display or return the next posts page slink.1567 * Display or return the next posts page link. 1568 1568 * 1569 1569 * @since 0.71 1570 1570 * … … 1581 1581 } 1582 1582 1583 1583 /** 1584 * Return the next posts page slink.1584 * Return the next posts page link. 1585 1585 * 1586 1586 * @since 2.7.0 1587 1587 * … … 1610 1610 } 1611 1611 1612 1612 /** 1613 * Display the next posts page slink.1613 * Display the next posts page link. 1614 1614 * 1615 1615 * @since 0.71 1616 1616 * @uses get_next_posts_link() … … 1623 1623 } 1624 1624 1625 1625 /** 1626 * Retrieve previous post pageslink.1626 * Retrieve previous posts page link. 1627 1627 * 1628 1628 * Will only return string, if not on a single page or post. 1629 1629 * … … 1645 1645 } 1646 1646 1647 1647 /** 1648 * Display or return the previous posts page slink.1648 * Display or return the previous posts page link. 1649 1649 * 1650 1650 * @since 0.71 1651 1651 * … … 1661 1661 } 1662 1662 1663 1663 /** 1664 * Return the previous posts page slink.1664 * Return the previous posts page link. 1665 1665 * 1666 1666 * @since 2.7.0 1667 1667 * … … 1746 1746 } 1747 1747 1748 1748 /** 1749 * Retrieve page numbers links.1749 * Retrieve comments page number link. 1750 1750 * 1751 1751 * @since 2.7.0 1752 1752 * … … 1782 1782 } 1783 1783 1784 1784 /** 1785 * Return the link to next comments page s.1785 * Return the link to next comments page. 1786 1786 * 1787 1787 * @since 2.7.1 1788 1788 * … … 1816 1816 } 1817 1817 1818 1818 /** 1819 * Display the link to next comments page s.1819 * Display the link to next comments page. 1820 1820 * 1821 1821 * @since 2.7.0 1822 1822 * … … 1869 1869 * @see paginate_links() 1870 1870 * @since 2.7.0 1871 1871 * 1872 * @param string|array $args Optional args. See paginate_links .1872 * @param string|array $args Optional args. See paginate_links(). 1873 1873 * @return string Markup for pagination links. 1874 1874 */ 1875 1875 function paginate_comments_links($args = array()) { … … 1935 1935 /** 1936 1936 * Retrieve the home url for the current site. 1937 1937 * 1938 * Returns the 'home' option with the appropriate protocol, 'https' if1938 * Returns the 'home' option with the appropriate protocol, 'https' if 1939 1939 * is_ssl() and 'http' otherwise. If $scheme is 'http' or 'https', is_ssl() is 1940 1940 * overridden. 1941 1941 * … … 1945 1945 * @uses get_home_url() 1946 1946 * 1947 1947 * @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'. 1949 1949 * @return string Home url link with optional path appended. 1950 1950 */ 1951 1951 function home_url( $path = '', $scheme = null ) { … … 1955 1955 /** 1956 1956 * Retrieve the home url for a given site. 1957 1957 * 1958 * Returns the 'home' option with the appropriate protocol, 'https' if1958 * Returns the 'home' option with the appropriate protocol, 'https' if 1959 1959 * is_ssl() and 'http' otherwise. If $scheme is 'http' or 'https', is_ssl() is 1960 1960 * overridden. 1961 1961 * … … 1964 1964 * 1965 1965 * @param int $blog_id (optional) Blog ID. Defaults to current blog. 1966 1966 * @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'. 1968 1968 * @return string Home url link with optional path appended. 1969 1969 */ 1970 1970 function get_home_url( $blog_id = null, $path = '', $scheme = null ) { … … 1990 1990 /** 1991 1991 * Retrieve the site url for the current site. 1992 1992 * 1993 * Returns the 'site_url' option with the appropriate protocol, 'https' if1993 * Returns the 'site_url' option with the appropriate protocol, 'https' if 1994 1994 * is_ssl() and 'http' otherwise. If $scheme is 'http' or 'https', is_ssl() is 1995 1995 * overridden. 1996 1996 * … … 2000 2000 * @uses get_site_url() 2001 2001 * 2002 2002 * @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'. 2004 2004 * @return string Site url link with optional path appended. 2005 2005 */ 2006 2006 function site_url( $path = '', $scheme = null ) { … … 2010 2010 /** 2011 2011 * Retrieve the site url for a given site. 2012 2012 * 2013 * Returns the 'site_url' option with the appropriate protocol, 'https' if2013 * Returns the 'site_url' option with the appropriate protocol, 'https' if 2014 2014 * is_ssl() and 'http' otherwise. If $scheme is 'http' or 'https', is_ssl() is 2015 2015 * overridden. 2016 2016 * … … 2019 2019 * 2020 2020 * @param int $blog_id (optional) Blog ID. Defaults to current blog. 2021 2021 * @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'. 2023 2023 * @return string Site url link with optional path appended. 2024 2024 */ 2025 2025 function get_site_url( $blog_id = null, $path = '', $scheme = null ) { … … 2056 2056 * @package WordPress 2057 2057 * @since 2.6.0 2058 2058 * 2059 * @param string $path Optional path relative to the admin url 2059 * @param string $path Optional path relative to the admin url. 2060 2060 * @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. 2062 2062 */ 2063 2063 function admin_url( $path = '', $scheme = 'admin' ) { 2064 2064 return get_admin_url(null, $path, $scheme); … … 2071 2071 * @since 3.0.0 2072 2072 * 2073 2073 * @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. 2075 2075 * @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. 2077 2077 */ 2078 2078 function get_admin_url( $blog_id = null, $path = '', $scheme = 'admin' ) { 2079 2079 $url = get_site_url($blog_id, 'wp-admin/', $scheme); … … 2164 2164 /** 2165 2165 * Retrieve the site url for the current network. 2166 2166 * 2167 * Returns the site url with the appropriate protocol, 'https' if2167 * Returns the site url with the appropriate protocol, 'https' if 2168 2168 * is_ssl() and 'http' otherwise. If $scheme is 'http' or 'https', is_ssl() is 2169 2169 * overridden. 2170 2170 * … … 2172 2172 * @since 3.0.0 2173 2173 * 2174 2174 * @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'. 2176 2176 * @return string Site url link with optional path appended. 2177 2177 */ 2178 2178 function network_site_url( $path = '', $scheme = null ) { … … 2204 2204 /** 2205 2205 * Retrieve the home url for the current network. 2206 2206 * 2207 * Returns the home url with the appropriate protocol, 'https' if2207 * Returns the home url with the appropriate protocol, 'https' if 2208 2208 * is_ssl() and 'http' otherwise. If $scheme is 'http' or 'https', is_ssl() is 2209 2209 * overridden. 2210 2210 * … … 2212 2212 * @since 3.0.0 2213 2213 * 2214 2214 * @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'. 2216 2216 * @return string Home url link with optional path appended. 2217 2217 */ 2218 2218 function network_home_url( $path = '', $scheme = null ) { … … 2240 2240 * @package WordPress 2241 2241 * @since 3.0.0 2242 2242 * 2243 * @param string $path Optional path relative to the admin url 2243 * @param string $path Optional path relative to the admin url. 2244 2244 * @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. 2246 2246 */ 2247 2247 function network_admin_url( $path = '', $scheme = 'admin' ) { 2248 2248 if ( ! is_multisite() ) … … 2262 2262 * @package WordPress 2263 2263 * @since 3.0.0 2264 2264 * 2265 * @param string $path Optional path relative to the admin url 2265 * @param string $path Optional path relative to the admin url. 2266 2266 * @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. 2268 2268 */ 2269 2269 function user_admin_url( $path = '', $scheme = 'admin' ) { 2270 2270 $url = network_site_url('wp-admin/user/', $scheme); … … 2281 2281 * @package WordPress 2282 2282 * @since 3.1.0 2283 2283 * 2284 * @param string $path Optional path relative to the admin url 2284 * @param string $path Optional path relative to the admin url. 2285 2285 * @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. 2287 2287 */ 2288 2288 function self_admin_url($path = '', $scheme = 'admin') { 2289 2289 if ( is_network_admin() ) … … 2297 2297 /** 2298 2298 * Get the URL to the user's dashboard. 2299 2299 * 2300 * If a user does not belong to any site s, 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's2300 * 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 2302 2302 * primary blog is returned. 2303 2303 * 2304 2304 * @since 3.1.0 2305 2305 * 2306 2306 * @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. 2308 2308 * @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. 2310 2310 */ 2311 2311 function get_dashboard_url( $user_id, $path = '', $scheme = 'admin' ) { 2312 2312 $user_id = (int) $user_id; … … 2339 2339 * 2340 2340 * @param int $user User ID 2341 2341 * @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. 2343 2343 */ 2344 2344 function get_edit_profile_url( $user, $scheme = 'admin' ) { 2345 2345 $user = (int) $user; … … 2355 2355 } 2356 2356 2357 2357 /** 2358 * Output rel=canonical for singular queries 2358 * Output rel=canonical for singular queries. 2359 2359 * 2360 2360 * @package WordPress 2361 2361 * @since 2.9.0 … … 2375 2375 /** 2376 2376 * Return a shortlink for a post, page, attachment, or blog. 2377 2377 * 2378 * This function exists to provide a shortlink tag that all themes and plugins can target. A plugin must hook in to2379 * 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 output2378 * 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 2381 2381 * via the get_shortlink filter. 2382 2382 * 2383 2383 * @since 3.0.0. 2384 2384 * 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. 2386 2386 * @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'. 2387 2387 * @param bool $allow_slugs Whether to allow post slugs in the shortlink. It is up to the plugin how and whether to honor this. 2388 2388 * @return string A shortlink or an empty string if no shortlink exists for the requested resource or if shortlinks are not enabled. … … 2462 2462 * 2463 2463 * @since 3.0.0 2464 2464 * 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. 2467 2467 * @param string $before Optional HTML to display before the link. 2468 * @param string $ beforeOptional HTML to display after the link.2468 * @param string $after Optional HTML to display after the link. 2469 2469 */ 2470 2470 function the_shortlink( $text = '', $title = '', $before = '', $after = '' ) { 2471 2471 global $post; -
wp-includes/load.php
186 186 * 187 187 * @access private 188 188 * @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. 190 190 * @return bool Always returns true. 191 191 */ 192 192 function timer_start() { … … 210 210 * timer_stop(1); 211 211 * </code> 212 212 * 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. 214 214 * 215 215 * @since 0.71 216 * @global int $timestart Seconds and Microseconds added together from when timer_start() is called217 * @global int $timeend Seconds and Microseconds added together from when function is called216 * @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 218 218 * 219 219 * @param int $display Use '0' or null to not echo anything and 1 to echo the total time 220 220 * @param int $precision The amount of digits from the right of the decimal to display. Default is 3. … … 287 287 * 288 288 * To set directory manually, define <code>WP_LANG_DIR</code> in wp-config.php. 289 289 * 290 * If the language directory exists within WP_CONTENT_DIR that is used291 * Otherwise if the language directory exists within WPINC, that's used 292 * Finally, If neither of the preceeding directories isfound,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, 293 293 * WP_CONTENT_DIR/languages is used. 294 294 * 295 295 * The WP_LANG_DIR constant was introduced in 2.1.0. … … 396 396 } else if ( !$_wp_using_ext_object_cache && file_exists( WP_CONTENT_DIR . '/object-cache.php' ) ) { 397 397 // Sometimes advanced-cache.php can load object-cache.php before it is loaded here. 398 398 // 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. 400 400 $_wp_using_ext_object_cache = true; 401 401 } 402 402 -
wp-includes/locale.php
25 25 * Stores the translated strings for the one character weekday names. 26 26 * 27 27 * 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. 29 29 * 30 30 * @see WP_Locale::init() for how to handle the hack. 31 31 * -
wp-includes/media.php
17 17 * than the supported will result in the content_width size or 500 if that is 18 18 * not set. 19 19 * 20 * Finally, there is a filter named , 'editor_max_image_size'that will be called20 * Finally, there is a filter named 'editor_max_image_size', that will be called 21 21 * on the calculated array for width and height, respectively. The second 22 22 * parameter will be the value that was in the $size parameter. The returned 23 23 * type for the hook is an array with the width as the first element and the … … 177 177 178 178 /** 179 179 * Registers a new image size 180 * 181 * @since 2.9.0 180 182 */ 181 183 function add_image_size( $name, $width = 0, $height = 0, $crop = false ) { 182 184 global $_wp_additional_image_sizes; … … 185 187 186 188 /** 187 189 * Registers an image size for the post thumbnail 190 * 191 * @since 2.9.0 188 192 */ 189 193 function set_post_thumbnail_size( $width = 0, $height = 0, $crop = false ) { 190 194 add_image_size( 'post-thumbnail', $width, $height, $crop ); … … 329 333 * @param int $dest_w New width. 330 334 * @param int $dest_h New height. 331 335 * @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. 333 337 */ 334 338 function image_resize_dimensions($orig_w, $orig_h, $dest_w, $dest_h, $crop = false) { 335 339 … … 398 402 * @param int $max_w Maximum width to resize to. 399 403 * @param int $max_h Maximum height to resize to. 400 404 * @param bool $crop Optional. Whether to crop image or resize. 401 * @param string $suffix Optional. File Suffix.405 * @param string $suffix Optional. File suffix. 402 406 * @param string $dest_path Optional. New image file path. 403 407 * @param int $jpeg_quality Optional, default is 90. Image quality percentage. 404 408 * @return mixed WP_Error on failure. String with new destination path. … … 669 673 } 670 674 671 675 /** 672 * Adds a 'wp-post-image' class to post thumbnail thumbnails676 * Adds a 'wp-post-image' class to post thumbnails 673 677 * 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 thumbnails678 * dynamically add/remove itself so as to only filter post thumbnails 675 679 * 676 680 * @since 2.9.0 677 681 * @param array $attr Attributes including src, class, alt, title … … 752 756 * 753 757 * @since 2.5.0 754 758 * 755 * @param array $attr Attributes attributed tothe shortcode.759 * @param array $attr Attributes of the shortcode. 756 760 * @return string HTML content to display gallery. 757 761 */ 758 762 function gallery_shortcode($attr) { … … 906 910 * 907 911 * @since 2.5.0 908 912 * 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. 910 914 */ 911 915 function adjacent_image_link($prev = true, $size = 'thumbnail', $text = false) { 912 916 global $post; … … 1079 1083 } 1080 1084 1081 1085 /** 1082 * If a post/page was saved, then output Java script to make1086 * If a post/page was saved, then output JavaScript to make 1083 1087 * an AJAX request that will call WP_Embed::cache_oembed(). 1084 1088 */ 1085 1089 function maybe_run_ajax_cache() { … … 1373 1377 * @uses WP_oEmbed::get_html() 1374 1378 * 1375 1379 * @param string $url The URL that should be embeded. 1376 * @param array $args Add tional arguments and parameters.1380 * @param array $args Additional arguments and parameters. 1377 1381 * @return string The original URL on failure or the embed HTML on success. 1378 1382 */ 1379 1383 function wp_oembed_get( $url, $args = '' ) { -
wp-includes/pomo/translations.php
81 81 /** 82 82 * Given the number of items, returns the 0-based index of the plural form to use 83 83 * 84 * Here, in the base Translations class, the common g logic for English is implmented:84 * Here, in the base Translations class, the common logic for English is implemented: 85 85 * 0 if there is one element, 1 otherwise 86 86 * 87 87 * This function should be overrided by the sub-classes. For example MO/PO can derive the logic -
wp-includes/post-thumbnail-template.php
50 50 /** 51 51 * Update cache for thumbnails in the current loop 52 52 * 53 * @si cne 3.253 * @since 3.2 54 54 */ 55 55 function update_post_thumbnail_cache() { 56 56 global $wp_query;
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)