Changeset 8823 for trunk/wp-includes/general-template.php
- Timestamp:
- 09/05/2008 09:47:53 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/general-template.php
r8822 r8823 8 8 9 9 /** 10 * Load template header or named header file. 11 * 12 * {@internal Missing Long Description}} 10 * Load header template. 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. 13 14 * 14 15 * @uses locate_template() 15 16 * @since 1.5.0 16 17 * @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". 17 19 */ 18 20 function get_header( $name = null ) { … … 30 32 31 33 /** 32 * get_footer() - {@internal Missing Short Description}} 33 * 34 * {@internal Missing Long Description}} 35 * 34 * Load footer template. 35 * 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. 38 * 39 * @uses locate_template() 36 40 * @since 1.5.0 37 * @uses do_action() 41 * @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". 38 43 */ 39 44 function get_footer( $name = null ) { … … 51 56 52 57 /** 53 * get_sidebar() - {@internal Missing Short Description}} 54 * 55 * {@internal Missing Long Description}} 56 * 58 * Load sidebar template. 59 * 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. 62 * 63 * @uses locate_template() 57 64 * @since 1.5.0 58 * @uses do_action() 65 * @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". 59 67 */ 60 68 function get_sidebar( $name = null ) { … … 72 80 73 81 /** 74 * wp_loginout() - {@internal Missing Short Description}}75 * 76 * {@internal Missing Long Description}}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. 77 85 * 78 86 * @since 1.5.0 … … 89 97 90 98 /** 91 * wp_register() - {@internal Missing Short Description}} 92 * 93 * {@internal Missing Long Description}}94 * 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. 102 * 95 103 * @since 1.5.0 96 104 * @uses apply_filters() 97 105 * 98 * @param unknown_type $before99 * @param unknown_type $after106 * @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>). 100 108 */ 101 109 function wp_register( $before = '<li>', $after = '</li>' ) { … … 911 919 912 920 /** 913 * delete_get_calendar_cache() - {@internal Missing Short Description}} 914 * 921 * Purge the cached results of get_calendar. 922 * 923 * @see get_calendar 915 924 * @since 2.1.0 916 925 */ … … 952 961 953 962 /** 954 * the_date_xml() - {@internal Missing Short Description}} 955 * 956 * {@internal Missing Long Description}} 963 * Outputs the date in iso8601 format for xml files, 957 964 * 958 965 * @since 1.0.0 959 *960 966 */ 961 967 function the_date_xml() { 962 968 global $post; 963 969 echo mysql2date('Y-m-d', $post->post_date); 964 //echo ""+$post->post_date; 965 } 966 967 /** 968 * the_date() - {@internal Missing Short Description}} 969 * 970 * {@internal Missing Long Description}} 970 } 971 972 /** 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. 971 976 * 972 977 * @since 0.71 973 978 * 974 * @param unknown_type $d975 * @param unknown_type $before976 * @param unknown_type $after977 * @param unknown_type $echo979 * @param string $d php date 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. 978 983 * @return unknown 979 984 */ … … 998 1003 999 1004 /** 1000 * the_modified_date() - {@internal Missing Short Description}} 1001 * 1002 * {@internal Missing Long Description}} 1005 * Outputs the date on which the post was last modified. 1003 1006 * 1004 1007 * @since 2.1.0 1005 1008 * 1006 * @param unknown_type $d 1009 * @param string $d php date format. 1010 * @return string 1007 1011 */ 1008 1012 function the_modified_date($d = '') { … … 1011 1015 1012 1016 /** 1013 * get_the_modified_date() - {@internal Missing Short Description}} 1014 * 1015 * {@internal Missing Long Description}} 1017 * Returns the date on which the post was last modified. 1016 1018 * 1017 1019 * @since 2.1.0 1018 1020 * 1019 * @param unknown_type $d1020 * @return unknown1021 * @param string $d php date format. Defaults to the "date_format" option 1022 * @return string 1021 1023 */ 1022 1024 function get_the_modified_date($d = '') { … … 1029 1031 1030 1032 /** 1031 * the_time() - {@internal Missing Short Description}} 1032 * 1033 * {@internal Missing Long Description}} 1033 * Output the time at which the post was written. 1034 1034 * 1035 1035 * @since 0.71 1036 1036 * 1037 * @param unknown_type $d1037 * @param string $d Either 'G', 'U', or php date format. 1038 1038 */ 1039 1039 function the_time( $d = '' ) { … … 1042 1042 1043 1043 /** 1044 * get_the_time() - {@internal Missing Short Description}} 1045 * 1046 * {@internal Missing Long Description}} 1044 * Returns the time at which the post was written. 1047 1045 * 1048 1046 * @since 1.5.0 1049 1047 * 1050 * @param unknown_type $d1051 * @return unknown1048 * @param string $d Either 'G', 'U', or php date format defaults to the value specified in the time_format option. 1049 * @return string 1052 1050 */ 1053 1051 function get_the_time( $d = '' ) { … … 1060 1058 1061 1059 /** 1062 * get_post_time() - {@internal Missing Short Description}} 1063 * 1064 * {@internal Missing Long Description}} 1065 * 1066 * @since 1.5.0 1067 * 1068 * @param unknown_type $d 1069 * @param unknown_type $gmt 1070 * @return unknown 1060 * Returns the time at which the post was written 1061 * 1062 * @since 2.0.0 1063 * 1064 * @param string $d Either 'G', 'U', or php date format. 1065 * @param bool $gmt Whether of not to return the gmt time. 1066 * @return string 1071 1067 */ 1072 1068 function get_post_time( $d = 'U', $gmt = false ) { // returns timestamp … … 1095 1091 1096 1092 /** 1097 * get_the_modified_time() - {@internal Missing Short Description}} 1098 * 1099 * {@internal Missing Long Description}} 1093 * Returns the time at which the post was last modified. 1100 1094 * 1101 1095 * @since 2.0.0 1102 1096 * 1103 * @param unknown_type $d1104 * @return unknown1097 * @param string $d Either 'G', 'U', or php date format defaults to the value specified in the time_format option. 1098 * @return string 1105 1099 */ 1106 1100 function get_the_modified_time($d = '') { … … 1113 1107 1114 1108 /** 1115 * get_post_modified_time() - {@internal Missing Short Description}} 1116 * 1117 * {@internal Missing Long Description}} 1109 * Returns the time at which the post was last modified. 1118 1110 * 1119 1111 * @since 2.0.0 1120 1112 * 1121 * @param unknown_type $d1122 * @param unknown_type $gmt1123 * @return unknown1113 * @param string $d Either 'G', 'U', or php date format. 1114 * @param bool $gmt Whether of not to return the gmt time. 1115 * @return string 1124 1116 */ 1125 1117 function get_post_modified_time( $d = 'U', $gmt = false ) { // returns timestamp … … 1136 1128 1137 1129 /** 1138 * the_weekday() - {@internal Missing Short Description}} 1139 * 1140 * {@internal Missing Long Description}} 1130 * Outputs the weekday on which the post was written. 1141 1131 * 1142 1132 * @since 0.71 … … 1152 1142 1153 1143 /** 1154 * the_weekday_date() - {@internal Missing Short Description}}1155 * 1156 * {@internal Missing Long Description}}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. 1157 1147 * 1158 1148 * @since 0.71 1159 1149 * 1160 * @param unknown_type $before1161 * @param unknown_type $after1162 */1150 * @param string $before output before the date. 1151 * @param string $after output after the date. 1152 */ 1163 1153 function the_weekday_date($before='',$after='') { 1164 1154 global $wp_locale, $post, $day, $previousweekday; … … 1175 1165 1176 1166 /** 1177 * wp_head() - {@internal Missing Short Description}} 1178 * 1179 * {@internal Missing Long Description}} 1167 * Fire the wp_head action 1180 1168 * 1181 1169 * @since 1.2.0 … … 1187 1175 1188 1176 /** 1189 * wp_footer() - {@internal Missing Short Description}} 1190 * 1191 * {@internal Missing Long Description}} 1177 * Fire the wp_footer action 1192 1178 * 1193 1179 * @since 1.5.1 … … 1199 1185 1200 1186 /** 1201 * rsd_link() - {@internal Missing Short Description}} 1202 * 1203 * {@internal Missing Long Description}} 1204 * 1187 * Outputs the link to the Really Simple Discovery service endpoint. 1188 * 1189 * @link http://archipelago.phrasewise.com/rsd 1205 1190 * @since 2.0.0 1206 *1207 1191 */ 1208 1192 function rsd_link() { … … 1211 1195 1212 1196 /** 1213 * wlwmanifest_link() - {@internal Missing Short Description}} 1214 * 1215 * {@internal Missing Long Description}} 1216 * 1197 * Outputs the link to the Windows Live Writer manifest file. 1198 * 1199 * @link http://msdn.microsoft.com/en-us/library/bb463265.aspx 1217 1200 * @since 2.3.1 1218 *1219 1201 */ 1220 1202 function wlwmanifest_link() { … … 1224 1206 1225 1207 /** 1226 * noindex() - {@internal Missing Short Description}}1227 * 1228 * {@internal Missing Long Description}}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. 1229 1211 * 1230 1212 * @since 2.1.0 … … 1237 1219 1238 1220 /** 1239 * rich_edit_exists() - {@internal Missing Short Description}}1240 * 1241 * {@internal Missing Long Description}}1221 * Determine if TinyMCE is available. 1222 * 1223 * Checks to see if the user has deleted the tinymce files to slim down there WordPress install. 1242 1224 * 1243 1225 * @since 2.1.0 1244 1226 * 1245 * @return unknown1227 * @return bool Whether of not TinyMCE exists. 1246 1228 */ 1247 1229 function rich_edit_exists() { … … 1253 1235 1254 1236 /** 1255 * user_can_richedit() - {@internal Missing Short Description}}1256 * 1257 * {@internal Missing Long Description}}1237 * Whether or not the user should have a WYSIWIG editor. 1238 * 1239 * Checks that the user requires a WYSIWIG editor and that the editor is supported in the users browser. 1258 1240 * 1259 1241 * @since 2.0.0 1260 1242 * 1261 * @return unknown1243 * @return bool 1262 1244 */ 1263 1245 function user_can_richedit() { … … 1279 1261 1280 1262 /** 1281 * wp_default_editor() - {@internal Missing Short Description}}1282 * 1283 * {@internal Missing Long Description}}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. 1284 1266 * 1285 1267 * @since 2.5.0 … … 1374 1356 1375 1357 /** 1376 * get_search_query() - {@internal Missing Short Description}} 1377 * 1378 * {@internal Missing Long Description}} 1358 * Returns the contents of the search query variable 's' 1379 1359 * 1380 1360 * @since 2.3.0 1381 1361 * 1382 * @return unknown1362 * @return string 1383 1363 */ 1384 1364 function get_search_query() { … … 1387 1367 1388 1368 /** 1389 * the_search_query() - {@internal Missing Short Description}} 1390 * 1391 * {@internal Missing Long Description}} 1392 * 1369 * Outputs the contents of the search query variable 's' 1370 * 1371 * The search query string is paseed through attribute_escape to ensure that it is safe for placing in an html attribute 1372 * 1373 * @uses attribute_escape 1393 1374 * @since 2.1.0 1394 1375 * … … 1399 1380 1400 1381 /** 1401 * language_attributes() - {@internal Missing Short Description}}1402 * 1403 * {@internal Missing Long Description}}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. 1404 1385 * 1405 1386 * @since 2.1.0 1406 1387 * 1407 * @param unknown_type $doctype1388 * @param string $doctype The type of html document (xhtml|html). 1408 1389 */ 1409 1390 function language_attributes($doctype = 'html') { … … 1517 1498 } 1518 1499 1500 /** 1501 * Registers a admin colour scheme css file. 1502 * 1503 * Allows a plugin to register a new admin colour scheme. 1504 * For Example: 1505 * <code> 1506 * wp_admin_css_color('classic', __('Classic'), admin_url("css/colors-classic.css"), array('#07273E', '#14568A', '#D54E21', '#2683AE')); 1507 * </code> 1508 * 1509 * @param string $key The unique key for this theme. 1510 * @param string $name The name of the theme. 1511 * @param string $url The url of the css file containing the colour scheme. 1512 * @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.0 1515 */ 1519 1516 function wp_admin_css_color($key, $name, $url, $colors = array()) { 1520 1517 global $_wp_admin_css_colors; … … 1527 1524 1528 1525 /** 1529 * wp_admin_css_uri() -Outputs the URL of a WordPress admin CSS file1526 * Outputs the URL of a WordPress admin CSS file 1530 1527 * 1531 1528 * @see WP_Styles::_css_href and its style_loader_src filter. … … 1533 1530 * @since 2.3.0 1534 1531 * 1535 *1536 1532 * @param string $file file relative to wp-admin/ without its ".css" extension. 1537 1533 */ 1538 1539 1534 function wp_admin_css_uri( $file = 'wp-admin' ) { 1540 1535 if ( defined('WP_INSTALLING') ) { … … 1549 1544 1550 1545 /** 1551 * wp_admin_css() -Enqueues or directly prints a stylesheet link to the specified CSS file.1546 * Enqueues or directly prints a stylesheet link to the specified CSS file. 1552 1547 * 1553 1548 * "Intelligently" decides to enqueue or to print the CSS file. … … 1591 1586 1592 1587 /** 1593 * wp_generator() - Outputs the XHTML generator that is generated on the wp_head hook.1594 *1595 * {@internal Missing Long Description}}1596 *1597 * @since 2.5.01598 * @uses apply_filters()1599 1588 * Enqueues the default ThickBox js and css. 1589 * 1600 1590 * If any of the settings need to be changed, this can be done with another js file 1601 1591 * similar to media-upload.js and theme-preview.js. That file should require array('thickbox') 1602 1592 * to ensure it is loaded after. 1593 * 1594 * @since 0.0 1603 1595 */ 1604 1596 function add_thickbox() { … … 1609 1601 /** 1610 1602 * Outputs the XHTML generator that is generated on the wp_head hook. 1603 * 1604 * @since 2.5 1611 1605 */ 1612 1606 function wp_generator() { … … 1615 1609 1616 1610 /** 1617 * the_generator() - Outputs the generator XML or Comment for RSS, ATOM, etc. 1618 * 1619 * {@internal Missing Long Description}} 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. 1620 1616 * 1621 1617 * @since 2.5 1622 * @uses apply_filters() 1623 * 1624 * @param string $type The type of generator to return.1618 * @uses apply_filters() the_generator 1619 * 1620 * @param string $type The type of generator to output - (html|xhtml|atom|rss2|rdf|comment|export). 1625 1621 */ 1626 1622 function the_generator( $type ) { … … 1629 1625 1630 1626 /** 1631 * get_the_generator() - Creates the generator XML or Comment for RSS, ATOM, etc. 1632 * 1633 * {@internal Missing Long Description}} 1627 * Creates the generator XML or Comment for RSS, ATOM, etc. 1628 * 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. 1634 1632 * 1635 1633 * @since 2.5 1636 * @uses apply_filters() 1637 * 1638 * @param string $type The type of generator to return .1634 * @uses apply_filters() get_the_generator_{$type} 1635 * 1636 * @param string $type The type of generator to return - (html|xhtml|atom|rss2|rdf|comment|export). 1639 1637 */ 1640 1638 function get_the_generator( $type ) {
Note: See TracChangeset
for help on using the changeset viewer.