Make WordPress Core


Ignore:
Timestamp:
09/05/2008 09:47:53 PM (16 years ago)
Author:
westi
Message:

Update the General Template phpdoc see #5640.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/general-template.php

    r8822 r8823  
    88
    99/**
    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.
    1314 *
    1415 * @uses locate_template()
    1516 * @since 1.5.0
    1617 * @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".
    1719 */
    1820function get_header( $name = null ) {
     
    3032
    3133/**
    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()
    3640 * @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".
    3843 */
    3944function get_footer( $name = null ) {
     
    5156
    5257/**
    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()
    5764 * @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".
    5967 */
    6068function get_sidebar( $name = null ) {
     
    7280
    7381/**
    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.
    7785 *
    7886 * @since 1.5.0
     
    8997
    9098/**
    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 * 
    95103 * @since 1.5.0
    96104 * @uses apply_filters()
    97105 *
    98  * @param unknown_type $before
    99  * @param unknown_type $after
     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>).
    100108 */
    101109function wp_register( $before = '<li>', $after = '</li>' ) {
     
    911919
    912920/**
    913  * delete_get_calendar_cache() - {@internal Missing Short Description}}
    914  *
     921 * Purge the cached results of get_calendar.
     922 *
     923 * @see get_calendar
    915924 * @since 2.1.0
    916925 */
     
    952961
    953962/**
    954  * the_date_xml() - {@internal Missing Short Description}}
    955  *
    956  * {@internal Missing Long Description}}
     963 * Outputs the date in iso8601 format for xml files,
    957964 *
    958965 * @since 1.0.0
    959  *
    960966 */
    961967function the_date_xml() {
    962968    global $post;
    963969    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.
    971976 *
    972977 * @since 0.71
    973978 *
    974  * @param unknown_type $d
    975  * @param unknown_type $before
    976  * @param unknown_type $after
    977  * @param unknown_type $echo
     979 * @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.
    978983 * @return unknown
    979984 */
     
    9981003
    9991004/**
    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.
    10031006 *
    10041007 * @since 2.1.0
    10051008 *
    1006  * @param unknown_type $d
     1009 * @param string $d php date format.
     1010 * @return string
    10071011 */
    10081012function the_modified_date($d = '') {
     
    10111015
    10121016/**
    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.
    10161018 *
    10171019 * @since 2.1.0
    10181020 *
    1019  * @param unknown_type $d
    1020  * @return unknown
     1021 * @param string $d php date format. Defaults to the "date_format" option
     1022 * @return string
    10211023 */
    10221024function get_the_modified_date($d = '') {
     
    10291031
    10301032/**
    1031  * the_time() - {@internal Missing Short Description}}
    1032  *
    1033  * {@internal Missing Long Description}}
     1033 * Output the time at which the post was written.
    10341034 *
    10351035 * @since 0.71
    10361036 *
    1037  * @param unknown_type $d
     1037 * @param string $d Either 'G', 'U', or php date format.
    10381038 */
    10391039function the_time( $d = '' ) {
     
    10421042
    10431043/**
    1044  * get_the_time() - {@internal Missing Short Description}}
    1045  *
    1046  * {@internal Missing Long Description}}
     1044 * Returns the time at which the post was written.
    10471045 *
    10481046 * @since 1.5.0
    10491047 *
    1050  * @param unknown_type $d
    1051  * @return unknown
     1048 * @param string $d Either 'G', 'U', or php date format defaults to the value specified in the time_format option.
     1049 * @return string
    10521050 */
    10531051function get_the_time( $d = '' ) {
     
    10601058
    10611059/**
    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
    10711067 */
    10721068function get_post_time( $d = 'U', $gmt = false ) { // returns timestamp
     
    10951091
    10961092/**
    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.
    11001094 *
    11011095 * @since 2.0.0
    11021096 *
    1103  * @param unknown_type $d
    1104  * @return unknown
     1097 * @param string $d Either 'G', 'U', or php date format defaults to the value specified in the time_format option.
     1098 * @return string
    11051099 */
    11061100function get_the_modified_time($d = '') {
     
    11131107
    11141108/**
    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.
    11181110 *
    11191111 * @since 2.0.0
    11201112 *
    1121  * @param unknown_type $d
    1122  * @param unknown_type $gmt
    1123  * @return unknown
     1113 * @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
    11241116 */
    11251117function get_post_modified_time( $d = 'U', $gmt = false ) { // returns timestamp
     
    11361128
    11371129/**
    1138  * the_weekday() - {@internal Missing Short Description}}
    1139  *
    1140  * {@internal Missing Long Description}}
     1130 * Outputs the weekday on which the post was written.
    11411131 *
    11421132 * @since 0.71
     
    11521142
    11531143/**
    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.
    11571147 *
    11581148 * @since 0.71
    11591149 *
    1160  * @param unknown_type $before
    1161  * @param unknown_type $after
    1162  */
     1150 * @param string $before output before the date.
     1151 * @param string $after output after the date.
     1152  */
    11631153function the_weekday_date($before='',$after='') {
    11641154    global $wp_locale, $post, $day, $previousweekday;
     
    11751165
    11761166/**
    1177  * wp_head() - {@internal Missing Short Description}}
    1178  *
    1179  * {@internal Missing Long Description}}
     1167 * Fire the wp_head action
    11801168 *
    11811169 * @since 1.2.0
     
    11871175
    11881176/**
    1189  * wp_footer() - {@internal Missing Short Description}}
    1190  *
    1191  * {@internal Missing Long Description}}
     1177 * Fire the wp_footer action
    11921178 *
    11931179 * @since 1.5.1
     
    11991185
    12001186/**
    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
    12051190 * @since 2.0.0
    1206  *
    12071191 */
    12081192function rsd_link() {
     
    12111195
    12121196/**
    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
    12171200 * @since 2.3.1
    1218  *
    12191201 */
    12201202function wlwmanifest_link() {
     
    12241206
    12251207/**
    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.
    12291211 *
    12301212 * @since 2.1.0
     
    12371219
    12381220/**
    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.
    12421224 *
    12431225 * @since 2.1.0
    12441226 *
    1245  * @return unknown
     1227 * @return bool Whether of not TinyMCE exists.
    12461228 */
    12471229function rich_edit_exists() {
     
    12531235
    12541236/**
    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.
    12581240 *
    12591241 * @since 2.0.0
    12601242 *
    1261  * @return unknown
     1243 * @return bool
    12621244 */
    12631245function user_can_richedit() {
     
    12791261
    12801262/**
    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.
    12841266 *
    12851267 * @since 2.5.0
     
    13741356
    13751357/**
    1376  * get_search_query() - {@internal Missing Short Description}}
    1377  *
    1378  * {@internal Missing Long Description}}
     1358 * Returns the contents of the search query variable 's'
    13791359 *
    13801360 * @since 2.3.0
    13811361 *
    1382  * @return unknown
     1362 * @return string
    13831363 */
    13841364function get_search_query() {
     
    13871367
    13881368/**
    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
    13931374 * @since 2.1.0
    13941375 *
     
    13991380
    14001381/**
    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.
    14041385 *
    14051386 * @since 2.1.0
    14061387 *
    1407  * @param unknown_type $doctype
     1388 * @param string $doctype The type of html document (xhtml|html).
    14081389 */
    14091390function language_attributes($doctype = 'html') {
     
    15171498}
    15181499
     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 */
    15191516function wp_admin_css_color($key, $name, $url, $colors = array()) {
    15201517    global $_wp_admin_css_colors;
     
    15271524
    15281525/**
    1529  * wp_admin_css_uri() - Outputs the URL of a WordPress admin CSS file
     1526 * Outputs the URL of a WordPress admin CSS file
    15301527 *
    15311528 * @see WP_Styles::_css_href and its style_loader_src filter.
     
    15331530 * @since 2.3.0
    15341531 *
    1535  *
    15361532 * @param string $file file relative to wp-admin/ without its ".css" extension.
    15371533 */
    1538 
    15391534function wp_admin_css_uri( $file = 'wp-admin' ) {
    15401535    if ( defined('WP_INSTALLING') ) {
     
    15491544
    15501545/**
    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.
    15521547 *
    15531548 * "Intelligently" decides to enqueue or to print the CSS file.
     
    15911586
    15921587/**
    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.0
    1598  * @uses apply_filters()
    15991588 * Enqueues the default ThickBox js and css.
     1589 *
    16001590 * If any of the settings need to be changed, this can be done with another js file
    16011591 * similar to media-upload.js and theme-preview.js. That file should require array('thickbox')
    16021592 * to ensure it is loaded after.
     1593 * 
     1594 * @since 0.0
    16031595 */
    16041596function add_thickbox() {
     
    16091601/**
    16101602 * Outputs the XHTML generator that is generated on the wp_head hook.
     1603 *
     1604 * @since 2.5
    16111605 */
    16121606function wp_generator() {
     
    16151609
    16161610/**
    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.
    16201616 *
    16211617 * @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).
    16251621 */
    16261622function the_generator( $type ) {
     
    16291625
    16301626/**
    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.
    16341632 *
    16351633 * @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).
    16391637 */
    16401638function get_the_generator( $type ) {
Note: See TracChangeset for help on using the changeset viewer.