Ticket #5640: 5640.r8831.diff
File 5640.r8831.diff, 21.7 KB (added by , 17 years ago) |
---|
-
general-template.php
9 9 /** 10 10 * Load header template. 11 11 * 12 * Includes the header template for a theme or if a name is specified then a specialised header will be included. 13 * If the theme contains no header.php file then the header from the default theme will be included. 12 * Includes the header template for a theme or if a name is specified then a 13 * specialised header will be included. If the theme contains no header.php file 14 * then the header from the default theme will be included. 14 15 * 16 * For the parameter, if the file is called "header-special.php" then specify 17 * "special". 18 * 15 19 * @uses locate_template() 16 20 * @since 1.5.0 17 21 * @uses do_action() Calls 'get_header' action. 18 * @param $name String The name of the specialised header. If the file is called "header-special.php" then specify "special". 22 * 23 * @param string $name The name of the specialised header. 19 24 */ 20 25 function get_header( $name = null ) { 21 26 do_action( 'get_header' ); … … 33 38 /** 34 39 * Load footer template. 35 40 * 36 * Includes the footer template for a theme or if a name is specified then a specialised footer will be included. 37 * If the theme contains no footer.php file then the footer from the default theme will be included. 41 * Includes the footer template for a theme or if a name is specified then a 42 * specialised footer will be included. If the theme contains no footer.php file 43 * then the footer from the default theme will be included. 38 44 * 45 * For the parameter, if the file is called "footer-special.php" then specify 46 * "special". 47 * 39 48 * @uses locate_template() 40 49 * @since 1.5.0 41 50 * @uses do_action() Calls 'get_footer' action. 42 * @param $name String The name of the specialised footer. If the file is called "footer-special.php" then specify "special". 51 * 52 * @param string $name The name of the specialised footer. 43 53 */ 44 54 function get_footer( $name = null ) { 45 55 do_action( 'get_footer' ); … … 57 67 /** 58 68 * Load sidebar template. 59 69 * 60 * Includes the sidebar template for a theme or if a name is specified then a specialised sidebar will be included. 61 * If the theme contains no sidebar.php file then the sidebar from the default theme will be included. 70 * Includes the sidebar template for a theme or if a name is specified then a 71 * specialised sidebar will be included. If the theme contains no sidebar.php 72 * file then the sidebar from the default theme will be included. 62 73 * 74 * For the parameter, if the file is called "sidebar-special.php" then specify 75 * "special". 76 * 63 77 * @uses locate_template() 64 78 * @since 1.5.0 65 79 * @uses do_action() Calls 'get_sidebar' action. 66 * @param $name String The name of the specialised sidebar. If the file is called "sidebar-special.php" then specify "special". 80 * 81 * @param string $name The name of the specialised sidebar. 67 82 */ 68 83 function get_sidebar( $name = null ) { 69 84 do_action( 'get_sidebar' ); … … 79 94 } 80 95 81 96 /** 82 * Echo the Log In/Out link97 * Display the Log In/Out link. 83 98 * 84 * Echos out a link which allows the user to navigate to the Login page to login or logout depending on whether or not they are currently logged in. 99 * Displays a link, which allows the user to navigate to the Login page to login 100 * or logout depending on whether or not they are currently logged in. 85 101 * 86 102 * @since 1.5.0 87 * @uses apply_filters() 103 * @uses apply_filters() Calls 'loginout' hook on HTML link content. 88 104 */ 89 105 function wp_loginout() { 90 106 if ( ! is_user_logged_in() ) … … 96 112 } 97 113 98 114 /** 99 * Echo the Registration or Admin link 115 * Display the Registration or Admin link. 100 116 * 101 * Echos out a link which allows the user to navigate to the registration page if not logged in and registration is enabled or to the dashboard if logged in. 117 * Display a link which allows the user to navigate to the registration page if 118 * not logged in and registration is enabled or to the dashboard if logged in. 102 119 * 103 120 * @since 1.5.0 104 * @uses apply_filters() 121 * @uses apply_filters() Calls 'register' hook on register / admin link content. 105 122 * 106 * @param String $before Text to output before the link (defaults to <li>).107 * @param String $after Text to output after the link (defaults to </li>).123 * @param string $before Text to output before the link (defaults to <li>). 124 * @param string $after Text to output after the link (defaults to </li>). 108 125 */ 109 126 function wp_register( $before = '<li>', $after = '</li>' ) { 110 127 … … 127 144 * but one purpose might have been to allow for theme switching. 128 145 * 129 146 * @since 1.5.0 130 * @link http://trac.wordpress.org/ticket/1458 Expla ination of 'wp_meta' action.147 * @link http://trac.wordpress.org/ticket/1458 Explanation of 'wp_meta' action. 131 148 * @uses do_action() Calls 'wp_meta' hook. 132 149 */ 133 150 function wp_meta() { … … 135 152 } 136 153 137 154 /** 138 * bloginfo() - {@internal Missing Short Description}}155 * Display information about the blog. 139 156 * 140 * {@internal Missing Long Description}} 141 * 157 * @see get_bloginfo() For possible values for the parameter. 142 158 * @since 0.71 143 159 * 144 * @param unknown_type $show160 * @param string $show What to display. 145 161 */ 146 162 function bloginfo($show='') { 147 163 echo get_bloginfo($show, 'display'); 148 164 } 149 165 150 166 /** 151 * get_bloginfo() - {@internal Missing Short Description}}167 * Retrieve information about the blog. 152 168 * 153 * {@internal Missing Long Description}} 169 * Some show parameter values are deprecated and will be removed in future 170 * versions. Care should be taken to check the function contents and know what 171 * the deprecated blog info options are. Options without "// DEPRECATED" are 172 * the preferred and recommended ways to get the information. 154 173 * 155 * Note: some of these values are DEPRECATED. Meaning they could be 156 * taken out at any time and shouldn't be relied upon. Options 157 * without "// DEPRECATED" are the preferred and recommended ways 158 * to get the information. 174 * The possible values for the 'show' parameter are listed below. 175 * <ol> 176 * <li><strong>url<strong> - Blog URI to homepage.</li> 177 * <li><strong>wpurl</strong> - Blog URI path to WordPress.</li> 178 * <li><strong>description</strong> - Secondary title</li> 179 * </ol> 159 180 * 181 * The feed URL options can be retrieved from 'rdf_url' (RSS 0.91), 182 * 'rss_url' (RSS 1.0), 'rss2_url' (RSS 2.0), or 'atom_url' (Atom feed). The 183 * comment feeds can be retrieved from the 'comments_atom_url' (Atom comment 184 * feed) or 'comments_rss2_url' (RSS 2.0 comment feed). 185 * 186 * There are many other options and you should check the function contents: 187 * {@source 32 37} 188 * 160 189 * @since 0.71 161 190 * 162 * @param unknown_type $show163 * @param unknown_type $filter164 * @return unknown191 * @param string $show Blog info to retrieve. 192 * @param string $filter How to filter what is retrieved. 193 * @return string Mostly string values, might be empty. 165 194 */ 166 195 function get_bloginfo($show = '', $filter = 'raw') { 167 196 … … 253 282 } 254 283 255 284 /** 256 * wp_title() -{@internal Missing Short Description}}285 * {@internal Missing Short Description}} 257 286 * 258 287 * {@internal Missing Long Description}} 259 288 * … … 369 398 } 370 399 371 400 /** 372 * single_post_title() -{@internal Missing Short Description}}401 * {@internal Missing Short Description}} 373 402 * 374 403 * {@internal Missing Long Description}} 375 404 * … … 399 428 } 400 429 401 430 /** 402 * single_cat_title() -{@internal Missing Short Description}}431 * {@internal Missing Short Description}} 403 432 * 404 433 * {@internal Missing Long Description}} 405 434 * … … 425 454 } 426 455 427 456 /** 428 * single_tag_title() -{@internal Missing Short Description}}457 * {@internal Missing Short Description}} 429 458 * 430 459 * {@internal Missing Long Description}} 431 460 * … … 456 485 } 457 486 458 487 /** 459 * single_month_title() -{@internal Missing Short Description}}488 * {@internal Missing Short Description}} 460 489 * 461 490 * {@internal Missing Long Description}} 462 491 * … … 492 521 } 493 522 494 523 /** 495 * get_archives_link() -{@internal Missing Short Description}}524 * {@internal Missing Short Description}} 496 525 * 497 526 * {@internal Missing Long Description}} 498 527 * … … 527 556 } 528 557 529 558 /** 530 * wp_get_archives() -{@internal Missing Short Description}}559 * {@internal Missing Short Description}} 531 560 * 532 561 * {@internal Missing Long Description}} 533 562 * … … 701 730 } 702 731 703 732 /** 704 * calendar_week_mod() -{@internal Missing Short Description}}733 * {@internal Missing Short Description}} 705 734 * 706 735 * {@internal Missing Long Description}} 707 736 * 708 737 * @since 1.5.0 709 738 * @usedby get_calendar() 710 739 * 711 * @param unknown_type $num712 * @return unknown740 * @param int $num Number of day. 741 * @return int 713 742 */ 714 743 function calendar_week_mod($num) { 715 744 $base = 7; … … 717 746 } 718 747 719 748 /** 720 * get_calendar() -{@internal Missing Short Description}}749 * {@internal Missing Short Description}} 721 750 * 722 751 * {@internal Missing Long Description}} 723 752 * … … 933 962 add_action( 'update_option_start_of_week', 'delete_get_calendar_cache' ); 934 963 935 964 /** 936 * allowed_tags() -{@internal Missing Short Description}}965 * {@internal Missing Short Description}} 937 966 * 938 967 * {@internal Missing Long Description}} 939 968 * … … 960 989 /***** Date/Time tags *****/ 961 990 962 991 /** 963 * Outputs the date in iso8601 format for xml files ,992 * Outputs the date in iso8601 format for xml files. 964 993 * 965 994 * @since 1.0.0 966 995 */ … … 970 999 } 971 1000 972 1001 /** 973 * Echos or Returnsthe date the post was written.1002 * Display or Retrieve the date the post was written. 974 1003 * 975 * Will only output the date if the current post's date is different from the previous one output. 1004 * Will only output the date if the current post's date is different from the 1005 * previous one output. 976 1006 * 977 1007 * @since 0.71 978 1008 * 979 * @param string $d phpdate format defaults to the date_format option if not specified.980 * @param string $before output before the date.981 * @param string $after output after the date.982 * @param bool $echo Whether to echo the date or return it.983 * @return unknown1009 * @param string $d Optional. PHP date format defaults to the date_format option if not specified. 1010 * @param string $before Optional. Output before the date. 1011 * @param string $after Optional. Output after the date. 1012 * @param bool $echo Optional, default is display. Whether to echo the date or return it. 1013 * @return string|null Null if displaying, string if retrieving. 984 1014 */ 985 1015 function the_date($d='', $before='', $after='', $echo = true) { 986 1016 global $post, $day, $previousday; … … 1002 1032 } 1003 1033 1004 1034 /** 1005 * Outputsthe date on which the post was last modified.1035 * Display the date on which the post was last modified. 1006 1036 * 1007 1037 * @since 2.1.0 1008 1038 * 1009 * @param string $d phpdate format.1039 * @param string $d Optional. PHP date format. 1010 1040 * @return string 1011 1041 */ 1012 1042 function the_modified_date($d = '') { … … 1014 1044 } 1015 1045 1016 1046 /** 1017 * Ret urnsthe date on which the post was last modified.1047 * Retrieve the date on which the post was last modified. 1018 1048 * 1019 1049 * @since 2.1.0 1020 1050 * 1021 * @param string $d phpdate format. Defaults to the "date_format" option1051 * @param string $d Optional. PHP date format. Defaults to the "date_format" option 1022 1052 * @return string 1023 1053 */ 1024 1054 function get_the_modified_date($d = '') { … … 1030 1060 } 1031 1061 1032 1062 /** 1033 * Outputthe time at which the post was written.1063 * Display the time at which the post was written. 1034 1064 * 1035 1065 * @since 0.71 1036 1066 * … … 1041 1071 } 1042 1072 1043 1073 /** 1044 * Ret urnsthe time at which the post was written.1074 * Retrieve the time at which the post was written. 1045 1075 * 1046 1076 * @since 1.5.0 1047 1077 * … … 1057 1087 } 1058 1088 1059 1089 /** 1060 * Ret urns the time at which the post was written1090 * Retrieve the time at which the post was written. 1061 1091 * 1062 1092 * @since 2.0.0 1063 1093 * … … 1077 1107 } 1078 1108 1079 1109 /** 1080 * the_modified_time() - {@internal Missing Short Description}}1110 * Display the time at which the post was last modified. 1081 1111 * 1082 * {@internal Missing Long Description}}1083 *1084 1112 * @since 2.0.0 1085 1113 * 1086 * @param unknown_type $d1114 * @param string $d Either 'G', 'U', or php date format defaults to the value specified in the time_format option. 1087 1115 */ 1088 1116 function the_modified_time($d = '') { 1089 1117 echo apply_filters('the_modified_time', get_the_modified_time($d), $d); 1090 1118 } 1091 1119 1092 1120 /** 1093 * Ret urnsthe time at which the post was last modified.1121 * Retrieve the time at which the post was last modified. 1094 1122 * 1095 1123 * @since 2.0.0 1096 1124 * … … 1106 1134 } 1107 1135 1108 1136 /** 1109 * Ret urnsthe time at which the post was last modified.1137 * Retrieve the time at which the post was last modified. 1110 1138 * 1111 1139 * @since 2.0.0 1112 1140 * 1113 1141 * @param string $d Either 'G', 'U', or php date format. 1114 1142 * @param bool $gmt Whether of not to return the gmt time. 1115 * @return string 1143 * @return string Returns timestamp 1116 1144 */ 1117 function get_post_modified_time( $d = 'U', $gmt = false ) { // returns timestamp1145 function get_post_modified_time( $d = 'U', $gmt = false ) { 1118 1146 global $post; 1119 1147 1120 1148 if ( $gmt ) … … 1127 1155 } 1128 1156 1129 1157 /** 1130 * Outputsthe weekday on which the post was written.1158 * Display the weekday on which the post was written. 1131 1159 * 1132 1160 * @since 0.71 1133 1161 * @uses $wp_locale … … 1141 1169 } 1142 1170 1143 1171 /** 1144 * Outputsthe weekday on which the post was written.1172 * Display the weekday on which the post was written. 1145 1173 * 1146 * Will only output the weekday if the current post's weekday is different from the previous one output. 1174 * Will only output the weekday if the current post's weekday is different from 1175 * the previous one output. 1147 1176 * 1148 1177 * @since 0.71 1149 1178 * … … 1167 1196 * Fire the wp_head action 1168 1197 * 1169 1198 * @since 1.2.0 1170 * @uses do_action() 1199 * @uses do_action() Calls 'wp_head' hook. 1171 1200 */ 1172 1201 function wp_head() { 1173 1202 do_action('wp_head'); … … 1177 1206 * Fire the wp_footer action 1178 1207 * 1179 1208 * @since 1.5.1 1180 * @uses do_action() 1209 * @uses do_action() Calls 'wp_footer' hook. 1181 1210 */ 1182 1211 function wp_footer() { 1183 1212 do_action('wp_footer'); 1184 1213 } 1185 1214 1186 1215 /** 1187 * Outputsthe link to the Really Simple Discovery service endpoint.1216 * Display the link to the Really Simple Discovery service endpoint. 1188 1217 * 1189 1218 * @link http://archipelago.phrasewise.com/rsd 1190 1219 * @since 2.0.0 … … 1194 1223 } 1195 1224 1196 1225 /** 1197 * Outputsthe link to the Windows Live Writer manifest file.1226 * Display the link to the Windows Live Writer manifest file. 1198 1227 * 1199 1228 * @link http://msdn.microsoft.com/en-us/library/bb463265.aspx 1200 1229 * @since 2.3.1 … … 1205 1234 } 1206 1235 1207 1236 /** 1208 * Outputsa noindex meta tag if required by the blog configuration.1237 * Display a noindex meta tag if required by the blog configuration. 1209 1238 * 1210 * If a blog is marked as not being public then the noindex meta tag will be ouput to tell web robots not to index the page content. 1239 * If a blog is marked as not being public then the noindex meta tag will be 1240 * output to tell web robots not to index the page content. 1211 1241 * 1212 1242 * @since 2.1.0 1213 1243 */ … … 1236 1266 /** 1237 1267 * Whether or not the user should have a WYSIWIG editor. 1238 1268 * 1239 * Checks that the user requires a WYSIWIG editor and that the editor is supported in the users browser. 1269 * Checks that the user requires a WYSIWIG editor and that the editor is 1270 * supported in the users browser. 1240 1271 * 1241 1272 * @since 2.0.0 1242 1273 * … … 1260 1291 } 1261 1292 1262 1293 /** 1263 * Find out which editor should be displayed by default 1294 * Find out which editor should be displayed by default. 1264 1295 * 1265 * Works out which of the two editors to display as the current editor for a user. 1296 * Works out which of the two editors to display as the current editor for a 1297 * user. 1266 1298 * 1267 1299 * @since 2.5.0 1268 1300 * … … 1278 1310 } 1279 1311 1280 1312 /** 1281 * the_editor() -{@internal Missing Short Description}}1313 * {@internal Missing Short Description}} 1282 1314 * 1283 1315 * {@internal Missing Long Description}} 1284 1316 * … … 1355 1387 } 1356 1388 1357 1389 /** 1358 * Ret urns the contents of the search query variable 's'1390 * Retrieve the contents of the search WordPress query variable. 1359 1391 * 1360 1392 * @since 2.3.0 1361 1393 * … … 1366 1398 } 1367 1399 1368 1400 /** 1369 * Outputs the contents of the search query variable 's'1401 * Display the contents of the search query variable. 1370 1402 * 1371 * The search query string is paseed through attribute_escape to ensure that it is safe for placing in an html attribute 1403 * The search query string is passed through {@link attribute_escape()} 1404 * to ensure that it is safe for placing in an html attribute. 1372 1405 * 1373 1406 * @uses attribute_escape 1374 1407 * @since 2.1.0 1375 *1376 1408 */ 1377 1409 function the_search_query() { 1378 1410 echo attribute_escape( apply_filters( 'the_search_query', get_search_query() ) ); 1379 1411 } 1380 1412 1381 1413 /** 1382 * Outputsthe language attributes for the html tag.1414 * Display the language attributes for the html tag. 1383 1415 * 1384 * Builds up a set of html attributes containing the text direction and language information for the page. 1416 * Builds up a set of html attributes containing the text direction and language 1417 * information for the page. 1385 1418 * 1386 1419 * @since 2.1.0 1387 1420 * … … 1408 1441 } 1409 1442 1410 1443 /** 1411 * paginate_links() -{@internal Missing Short Description}}1444 * {@internal Missing Short Description}} 1412 1445 * 1413 1446 * {@internal Missing Long Description}} 1414 1447 * … … 1498 1531 } 1499 1532 1500 1533 /** 1501 * Registers a admin colour scheme css file.1534 * Registers an admin colour scheme css file. 1502 1535 * 1503 * Allows a plugin to register a new admin colour scheme. 1504 * For Example: 1536 * Allows a plugin to register a new admin colour scheme. For example: 1505 1537 * <code> 1506 * wp_admin_css_color('classic', __('Classic'), admin_url("css/colors-classic.css"), array('#07273E', '#14568A', '#D54E21', '#2683AE')); 1538 * wp_admin_css_color('classic', __('Classic'), admin_url("css/colors-classic.css"), 1539 * array('#07273E', '#14568A', '#D54E21', '#2683AE')); 1507 1540 * </code> 1508 1541 * 1542 * @since 2.5.0 1543 * 1509 1544 * @param string $key The unique key for this theme. 1510 1545 * @param string $name The name of the theme. 1511 1546 * @param string $url The url of the css file containing the colour scheme. 1512 1547 * @param array @colors An array of CSS color definitions which are used to give the user a feel for the theme. 1513 *1514 * @since 2.5.01515 1548 */ 1516 1549 function wp_admin_css_color($key, $name, $url, $colors = array()) { 1517 1550 global $_wp_admin_css_colors; … … 1523 1556 } 1524 1557 1525 1558 /** 1526 * Outputs the URL of a WordPress admin CSS file1559 * Display the URL of a WordPress admin CSS file. 1527 1560 * 1528 1561 * @see WP_Styles::_css_href and its style_loader_src filter. 1529 1562 * … … 1545 1578 /** 1546 1579 * Enqueues or directly prints a stylesheet link to the specified CSS file. 1547 1580 * 1548 * "Intelligently" decides to enqueue or to print the CSS file. 1549 * If the wp_print_styles action has *not* yet been called, the CSS file will be enqueued. 1550 * If the wp_print_styles action *has* been called, the CSS link will be printed. 1551 * Printing may be forced by passing TRUE as the $force_echo (second) parameter. 1581 * "Intelligently" decides to enqueue or to print the CSS file. If the 1582 * 'wp_print_styles' action has *not* yet been called, the CSS file will be 1583 * enqueued. If the wp_print_styles action *has* been called, the CSS link will 1584 * be printed. Printing may be forced by passing TRUE as the $force_echo 1585 * (second) parameter. 1552 1586 * 1553 * For backward compatibility with WordPress 2.3 calling method: 1554 * If the $file (first) parameter does not correspond to a registered CSS file, we assume $file is a 1555 * file relative to wp-admin/ without its ".css" extension. A stylesheet link to that generated URL is printed. 1587 * For backward compatibility with WordPress 2.3 calling method: If the $file 1588 * (first) parameter does not correspond to a registered CSS file, we assume 1589 * $file is a file relative to wp-admin/ without its ".css" extension. A 1590 * stylesheet link to that generated URL is printed. 1556 1591 * 1557 1592 * @package WordPress 1558 * @since 2.3 1559 * 1593 * @since 2.3.0 1560 1594 * @uses $wp_styles WordPress Styles Object 1561 1595 * 1562 1596 * @param string $file Style handle name or file name (without ".css" extension) relative to wp-admin/ … … 1587 1621 /** 1588 1622 * Enqueues the default ThickBox js and css. 1589 1623 * 1590 * If any of the settings need to be changed, this can be done with another js file1591 * similar to media-upload.js and theme-preview.js. That file should require array('thickbox')1592 * to ensure it is loaded after.1593 * 1594 * @since 0.01624 * If any of the settings need to be changed, this can be done with another js 1625 * file similar to media-upload.js and theme-preview.js. That file should 1626 * require array('thickbox') to ensure it is loaded after. 1627 * 1628 * @since 2.5.0 1595 1629 */ 1596 1630 function add_thickbox() { 1597 1631 wp_enqueue_script( 'thickbox' ); … … 1599 1633 } 1600 1634 1601 1635 /** 1602 * Outputsthe XHTML generator that is generated on the wp_head hook.1603 * 1604 * @since 2.5 1636 * Display the XHTML generator that is generated on the wp_head hook. 1637 * 1638 * @since 2.5.0 1605 1639 */ 1606 1640 function wp_generator() { 1607 1641 the_generator( apply_filters( 'wp_generator_type', 'xhtml' ) ); 1608 1642 } 1609 1643 1610 1644 /** 1611 * Outputsthe generator XML or Comment for RSS, ATOM, etc.1645 * Display the generator XML or Comment for RSS, ATOM, etc. 1612 1646 * 1613 * Returns the correct generator type for the requested output format. 1614 * 1615 * Allows for a plugin to filter generators overall the the_generator filter. 1647 * Returns the correct generator type for the requested output format. Allows 1648 * for a plugin to filter generators overall the the_generator filter. 1616 1649 * 1617 * @since 2.5 1618 * @uses apply_filters() the_generator1650 * @since 2.5.0 1651 * @uses apply_filters() Calls 'the_generator' hook. 1619 1652 * 1620 1653 * @param string $type The type of generator to output - (html|xhtml|atom|rss2|rdf|comment|export). 1621 1654 */ … … 1626 1659 /** 1627 1660 * Creates the generator XML or Comment for RSS, ATOM, etc. 1628 1661 * 1629 * Returns the correct generator type for the requested output format. 1630 * 1631 * Allows for a plugin to filter generators on an individual basis using the get_the_generator_{$type}filter.1662 * Returns the correct generator type for the requested output format. Allows 1663 * for a plugin to filter generators on an individual basis using the 1664 * 'get_the_generator_{$type}' filter. 1632 1665 * 1633 * @since 2.5 1634 * @uses apply_filters() get_the_generator_{$type}1666 * @since 2.5.0 1667 * @uses apply_filters() Calls 'get_the_generator_$type' hook. 1635 1668 * 1636 1669 * @param string $type The type of generator to return - (html|xhtml|atom|rss2|rdf|comment|export). 1670 * @return string The HTML content for the generator. 1637 1671 */ 1638 1672 function get_the_generator( $type ) { 1639 1673 switch ($type) {