Changeset 8835 for trunk/wp-includes/general-template.php
- Timestamp:
- 09/06/2008 06:38:26 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/general-template.php
r8823 r8835 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. 15 * 16 * For the parameter, if the file is called "header-special.php" then specify 17 * "special". 14 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 ) { … … 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. 44 * 45 * For the parameter, if the file is called "footer-special.php" then specify 46 * "special". 38 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 ) { … … 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. 73 * 74 * For the parameter, if the file is called "sidebar-special.php" then specify 75 * "special". 62 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 ) { … … 80 95 81 96 /** 82 * Echo the Log In/Out link 83 * 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. 97 * Display the Log In/Out link. 98 * 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() { … … 97 113 98 114 /** 99 * Echo the Registration or Admin link 100 * 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. 115 * Display the Registration or Admin link. 116 * 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() 105 * 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>).121 * @uses apply_filters() Calls 'register' hook on register / admin link content. 122 * 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>' ) { … … 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 */ … … 136 153 137 154 /** 138 * bloginfo() - {@internal Missing Short Description}} 139 * 140 * {@internal Missing Long Description}} 141 * 155 * Display information about the blog. 156 * 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='') { … … 149 165 150 166 /** 151 * get_bloginfo() - {@internal Missing Short Description}} 152 * 153 * {@internal Missing Long Description}} 154 * 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. 167 * Retrieve information about the blog. 168 * 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. 173 * 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> 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} 159 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') { … … 254 283 255 284 /** 256 * wp_title() -{@internal Missing Short Description}}285 * {@internal Missing Short Description}} 257 286 * 258 287 * {@internal Missing Long Description}} … … 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}} … … 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}} … … 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}} … … 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}} … … 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}} … … 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}} … … 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}} … … 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) { … … 718 747 719 748 /** 720 * get_calendar() -{@internal Missing Short Description}}749 * {@internal Missing Short Description}} 721 750 * 722 751 * {@internal Missing Long Description}} … … 934 963 935 964 /** 936 * allowed_tags() -{@internal Missing Short Description}}965 * {@internal Missing Short Description}} 937 966 * 938 967 * {@internal Missing Long Description}} … … 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 … … 971 1000 972 1001 /** 973 * Echos or Returns the date the post was written. 974 * 975 * Will only output the date if the current post's date is different from the previous one output. 1002 * Display or Retrieve the date the post was written. 1003 * 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) { … … 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 */ … … 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 */ … … 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 … … 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 … … 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 … … 1078 1108 1079 1109 /** 1080 * the_modified_time() - {@internal Missing Short Description}} 1081 * 1082 * {@internal Missing Long Description}} 1110 * Display the time at which the post was last modified. 1083 1111 * 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 = '') { … … 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 … … 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 … … 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 1116 */ 1117 function get_post_modified_time( $d = 'U', $gmt = false ) { // returns timestamp1143 * @return string Returns timestamp 1144 */ 1145 function get_post_modified_time( $d = 'U', $gmt = false ) { 1118 1146 global $post; 1119 1147 … … 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 … … 1142 1170 1143 1171 /** 1144 * Outputs the weekday on which the post was written. 1145 * 1146 * Will only output the weekday if the current post's weekday is different from the previous one output. 1172 * Display the weekday on which the post was written. 1173 * 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 … … 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() { … … 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() { … … 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 … … 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 … … 1206 1235 1207 1236 /** 1208 * Outputs a noindex meta tag if required by the blog configuration. 1209 * 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. 1237 * Display a noindex meta tag if required by the blog configuration. 1238 * 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 … … 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 … … 1261 1292 1262 1293 /** 1263 * Find out which editor should be displayed by default 1264 * 1265 * Works out which of the two editors to display as the current editor for a user. 1294 * Find out which editor should be displayed by default. 1295 * 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 … … 1279 1311 1280 1312 /** 1281 * the_editor() -{@internal Missing Short Description}}1313 * {@internal Missing Short Description}} 1282 1314 * 1283 1315 * {@internal Missing Long Description}} … … 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 … … 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() { … … 1380 1412 1381 1413 /** 1382 * Outputs the language attributes for the html tag. 1383 * 1384 * Builds up a set of html attributes containing the text direction and language information for the page. 1414 * Display the language attributes for the html tag. 1415 * 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 … … 1409 1442 1410 1443 /** 1411 * paginate_links() -{@internal Missing Short Description}}1444 * {@internal Missing Short Description}} 1412 1445 * 1413 1446 * {@internal Missing Long Description}} … … 1499 1532 1500 1533 /** 1501 * Registers a admin colour scheme css file. 1502 * 1503 * Allows a plugin to register a new admin colour scheme. 1504 * For Example: 1534 * Registers an admin colour scheme css file. 1535 * 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> 1541 * 1542 * @since 2.5.0 1508 1543 * 1509 1544 * @param string $key The unique key for this 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()) { … … 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. … … 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. 1552 * 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. 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. 1586 * 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 * … … 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() { … … 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() { … … 1609 1643 1610 1644 /** 1611 * Outputs the generator XML or Comment for RSS, ATOM, etc. 1612 * 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. 1616 * 1617 * @since 2.5 1618 * @uses apply_filters() the_generator 1645 * Display the generator XML or Comment for RSS, ATOM, etc. 1646 * 1647 * Returns the correct generator type for the requested output format. Allows 1648 * for a plugin to filter generators overall the the_generator filter. 1649 * 1650 * @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). … … 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.1632 * 1633 * @since 2.5 1634 * @uses apply_filters() get_the_generator_{$type}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. 1665 * 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 ) {
Note: See TracChangeset
for help on using the changeset viewer.