Make WordPress Core


Ignore:
Timestamp:
12/10/2007 06:52:24 PM (17 years ago)
Author:
ryan
Message:

phpdoc for deprecated funcs. Props darkdragon. fixes #5444

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/deprecated.php

    r6365 r6370  
    11<?php
     2/**
     3 * Deprecated functions from past WordPress versions
     4 * @package WordPress
     5 * @subpackage Deprecated
     6 */
    27
    38/*
     
    510 */
    611
     12/**
     13 * The name of the Posts table
     14 * @global string $tableposts
     15 * @deprecated Use $wpdb->posts
     16 */
    717$tableposts = $wpdb->posts;
     18
     19/**
     20 * The name of the Users table
     21 * @global string $tableusers
     22 * @deprecated Use $wpdb->users
     23 */
    824$tableusers = $wpdb->users;
     25
     26/**
     27 * The name of the Categories table
     28 * @global string $tablecategories
     29 * @deprecated Use $wpdb->categories
     30 */
    931$tablecategories = $wpdb->categories;
     32
     33/**
     34 * The name of the post to category table
     35 * @global string $tablepost2cat
     36 * @deprecated Use $wpdb->post2cat;
     37 */
    1038$tablepost2cat = $wpdb->post2cat;
     39
     40/**
     41 * The name of the comments table
     42 * @global string $tablecomments
     43 * @deprecated Use $wpdb->comments;
     44 */
    1145$tablecomments = $wpdb->comments;
     46
     47/**
     48 * The name of the links table
     49 * @global string $tablelinks
     50 * @deprecated Use $wpdb->links;
     51 */
    1252$tablelinks = $wpdb->links;
     53
     54/**
     55 * @global string $tablelinkcategories
     56 * @deprecated Not used anymore;
     57 */
    1358$tablelinkcategories = 'linkcategories_is_gone';
     59
     60/**
     61 * The name of the options table
     62 * @global string $tableoptions
     63 * @deprecated Use $wpdb->options;
     64 */
    1465$tableoptions = $wpdb->options;
     66
     67/**
     68 * The name of the postmeta table
     69 * @global string $tablepostmeta
     70 * @deprecated Use $wpdb->postmeta;
     71 */
    1572$tablepostmeta = $wpdb->postmeta;
    1673
     
    1976 */
    2077
    21 // Use get_post().
     78/**
     79 * get_postdata() - Entire Post data
     80 *
     81 * @since 0.71
     82 * @deprecated Use get_post()
     83 * @see get_post()
     84 *
     85 * @param int $postid
     86 * @return array
     87 */
    2288function get_postdata($postid) {
    2389    $post = &get_post($postid);
     
    44110}
    45111
    46 // Use the new post loop.
     112/**
     113 * start_wp() - Sets up the WordPress Loop
     114 *
     115 * @since 1.0.1
     116 * @deprecated Since 1.5 - {@link http://codex.wordpress.org/The_Loop Use new WordPress Loop}
     117 */
    47118function start_wp() {
    48119    global $wp_query, $post;
     
    54125}
    55126
     127/**
     128 * the_category_ID() - Return or Print Category ID
     129 *
     130 * @since 0.71
     131 * @deprecated use get_the_category()
     132 * @see get_the_category()
     133 *
     134 * @param bool $echo
     135 * @return null|int
     136 */
    56137function the_category_ID($echo = true) {
    57138    // Grab the first cat in the list.
     
    65146}
    66147
     148/**
     149 * the_category_head() - Print category with optional text before and after
     150 *
     151 * @since 0.71
     152 * @deprecated use get_the_category_by_ID()
     153 * @see get_the_category_by_ID()
     154 *
     155 * @param string $before
     156 * @param string $after
     157 */
    67158function the_category_head($before='', $after='') {
    68159    global $currentcat, $previouscat;
     
    78169}
    79170
    80 // Use previous_post_link().
     171/**
     172 * previous_post() - Prints link to the previous post
     173 *
     174 * @since 1.5
     175 * @deprecated Use previous_post_link()
     176 * @see previous_post_link()
     177 *
     178 * @param string $format
     179 * @param string $previous
     180 * @param string $title
     181 * @param string $in_same_cat
     182 * @param int $limitprev
     183 * @param string $excluded_categories
     184 */
    81185function previous_post($format='%', $previous='previous post: ', $title='yes', $in_same_cat='no', $limitprev=1, $excluded_categories='') {
    82186
     
    99203}
    100204
    101 // Use next_post_link().
     205/**
     206 * next_post() - Prints link to the next post
     207 *
     208 * @since 0.71
     209 * @deprecated Use next_post_link()
     210 * @see next_post_link()
     211 *
     212 * @param string $format
     213 * @param string $previous
     214 * @param string $title
     215 * @param string $in_same_cat
     216 * @param int $limitprev
     217 * @param string $excluded_categories
     218 */
    102219function next_post($format='%', $next='next post: ', $title='yes', $in_same_cat='no', $limitnext=1, $excluded_categories='') {
    103220
     
    120237}
    121238
    122 //
    123 // Use current_user_can() for these.
    124 //
    125 
    126 /* returns true if $user_id can create a new post */
     239/**
     240 * user_can_create_post() - Whether user can create a post
     241 *
     242 * @since 1.5
     243 * @deprecated Use current_user_can()
     244 * @see current_user_can()
     245 *
     246 * @param int $user_id
     247 * @param int $blog_id Not Used
     248 * @param int $category_id Not Used
     249 * @return bool
     250 */
    127251function user_can_create_post($user_id, $blog_id = 1, $category_id = 'None') {
    128252    $author_data = get_userdata($user_id);
     
    130254}
    131255
    132 /* returns true if $user_id can create a new post */
     256/**
     257 * user_can_create_draft() - Whether user can create a post
     258 *
     259 * @since 1.5
     260 * @deprecated Use current_user_can()
     261 * @see current_user_can()
     262 *
     263 * @param int $user_id
     264 * @param int $blog_id Not Used
     265 * @param int $category_id Not Used
     266 * @return bool
     267 */
    133268function user_can_create_draft($user_id, $blog_id = 1, $category_id = 'None') {
    134269    $author_data = get_userdata($user_id);
     
    136271}
    137272
    138 /* returns true if $user_id can edit $post_id */
     273/**
     274 * user_can_edit_post() - Whether user can edit a post
     275 *
     276 * @since 1.5
     277 * @deprecated Use current_user_can()
     278 * @see current_user_can()
     279 *
     280 * @param int $user_id
     281 * @param int $post_id
     282 * @param int $blog_id Not Used
     283 * @return bool
     284 */
    139285function user_can_edit_post($user_id, $post_id, $blog_id = 1) {
    140286    $author_data = get_userdata($user_id);
     
    151297}
    152298
    153 /* returns true if $user_id can delete $post_id */
     299/**
     300 * user_can_delete_post() - Whether user can delete a post
     301 *
     302 * @since 1.5
     303 * @deprecated Use current_user_can()
     304 * @see current_user_can()
     305 *
     306 * @param int $user_id
     307 * @param int $post_id
     308 * @param int $blog_id Not Used
     309 * @return bool
     310 */
    154311function user_can_delete_post($user_id, $post_id, $blog_id = 1) {
    155312    // right now if one can edit, one can delete
     
    157314}
    158315
    159 /* returns true if $user_id can set new posts' dates on $blog_id */
     316/**
     317 * user_can_set_post_date() - Whether user can set new posts' dates
     318 *
     319 * @since 1.5
     320 * @deprecated Use current_user_can()
     321 * @see current_user_can()
     322 *
     323 * @param int $user_id
     324 * @param int $blog_id Not Used
     325 * @param int $category_id Not Used
     326 * @return bool
     327 */
    160328function user_can_set_post_date($user_id, $blog_id = 1, $category_id = 'None') {
    161329    $author_data = get_userdata($user_id);
     
    164332
    165333/* returns true if $user_id can edit $post_id's date */
     334/**
     335 * user_can_edit_post_date() - Whether user can delete a post
     336 *
     337 * @since 1.5
     338 * @deprecated Use current_user_can()
     339 * @see current_user_can()
     340 *
     341 * @param int $user_id
     342 * @param int $post_id
     343 * @param int $blog_id Not Used
     344 * @return bool
     345 */
    166346function user_can_edit_post_date($user_id, $post_id, $blog_id = 1) {
    167347    $author_data = get_userdata($user_id);
     
    170350
    171351/* returns true if $user_id can edit $post_id's comments */
     352/**
     353 * user_can_edit_post_comments() - Whether user can delete a post
     354 *
     355 * @since 1.5
     356 * @deprecated Use current_user_can()
     357 * @see current_user_can()
     358 *
     359 * @param int $user_id
     360 * @param int $post_id
     361 * @param int $blog_id Not Used
     362 * @return bool
     363 */
    172364function user_can_edit_post_comments($user_id, $post_id, $blog_id = 1) {
    173365    // right now if one can edit a post, one can edit comments made on it
     
    176368
    177369/* returns true if $user_id can delete $post_id's comments */
     370/**
     371 * user_can_delete_post_comments() - Whether user can delete a post
     372 *
     373 * @since 1.5
     374 * @deprecated Use current_user_can()
     375 * @see current_user_can()
     376 *
     377 * @param int $user_id
     378 * @param int $post_id
     379 * @param int $blog_id Not Used
     380 * @return bool
     381 */
    178382function user_can_delete_post_comments($user_id, $post_id, $blog_id = 1) {
    179383    // right now if one can edit comments, one can delete comments
     
    181385}
    182386
     387/**
     388 * user_can_edit_user() - Can user can edit other user
     389 *
     390 * @since 1.5
     391 * @deprecated Use current_user_can()
     392 * @see current_user_can()
     393 *
     394 * @param int $user_id
     395 * @param int $other_user
     396 * @return bool
     397 */
    183398function user_can_edit_user($user_id, $other_user) {
    184399    $user  = get_userdata($user_id);
     
    190405}
    191406
    192 /** function get_linksbyname()
    193  ** Gets the links associated with category 'cat_name'.
    194  ** Parameters:
    195  **   cat_name (default 'noname')  - The category name to use. If no
    196  **     match is found uses all
    197  **   before (default '')  - the html to output before the link
    198  **   after (default '<br />')  - the html to output after the link
    199  **   between (default ' ')  - the html to output between the link/image
    200  **     and it's description. Not used if no image or show_images == true
    201  **   show_images (default true) - whether to show images (if defined).
    202  **   orderby (default 'id') - the order to output the links. E.g. 'id', 'name',
    203  **     'url', 'description' or 'rating'. Or maybe owner. If you start the
    204  **     name with an underscore the order will be reversed.
    205  **     You can also specify 'rand' as the order which will return links in a
    206  **     random order.
    207  **   show_description (default true) - whether to show the description if
    208  **     show_images=false/not defined
    209  **   show_rating (default false) - show rating stars/chars
    210  **   limit (default -1) - Limit to X entries. If not specified, all entries
    211  **     are shown.
    212  **   show_updated (default 0) - whether to show last updated timestamp
    213  */
    214 function get_linksbyname($cat_name = "noname", $before = '', $after = '<br />',
    215                                                  $between = " ", $show_images = true, $orderby = 'id',
    216                                                  $show_description = true, $show_rating = false,
    217                                                  $limit = -1, $show_updated = 0) {
    218         global $wpdb;
    219         $cat_id = -1;
    220         $cat = get_term_by('name', $cat_name, 'link_category');
    221         if ( $cat )
    222             $cat_id = $cat->term_id;
    223 
    224         get_links($cat_id, $before, $after, $between, $show_images, $orderby,
    225                             $show_description, $show_rating, $limit, $show_updated);
    226 }
    227 
    228 /** function wp_get_linksbyname()
    229  ** Gets the links associated with the named category.
    230  ** Parameters:
    231  **   category (no default)  - The category to use.
    232  **/
     407/**
     408 * get_linksbyname() - Gets the links associated with category $cat_name.
     409 *
     410 * @since 0.71
     411 * @deprecated Use get_links()
     412 * @see get_links()
     413 *
     414 * @param string    $cat_name   Optional. The category name to use. If no match is found uses all.
     415 * @param string    $before     Optional. The html to output before the link.
     416 * @param string    $after      Optional. The html to output after the link.
     417 * @param string    $between    Optional. The html to output between the link/image and it's description. Not used if no image or $show_images is true.
     418 * @param bool      $show_images Optional. Whether to show images (if defined).
     419 * @param string    $orderby    Optional. The order to output the links. E.g. 'id', 'name', 'url', 'description' or 'rating'. Or maybe owner.
     420 *      If you start the name with an underscore the order will be reversed. You can also specify 'rand' as the order which will return links in a
     421 *      random order.
     422 * @param bool      $show_description Optional. Whether to show the description if show_images=false/not defined.
     423 * @param bool      $show_rating Optional. Show rating stars/chars.
     424 * @param int       $limit      Optional. Limit to X entries. If not specified, all entries are shown.
     425 * @param int       $show_updated Optional. Whether to show last updated timestamp
     426 */
     427function get_linksbyname($cat_name = "noname", $before = '', $after = '<br />', $between = " ", $show_images = true, $orderby = 'id',
     428                         $show_description = true, $show_rating = false,
     429                         $limit = -1, $show_updated = 0) {
     430    $cat_id = -1;
     431    $cat = get_term_by('name', $cat_name, 'link_category');
     432    if ( $cat )
     433        $cat_id = $cat->term_id;
     434
     435    get_links($cat_id, $before, $after, $between, $show_images, $orderby, $show_description, $show_rating, $limit, $show_updated);
     436}
     437
     438/**
     439 * wp_get_linksbyname() - Gets the links associated with the named category.
     440 *
     441 * @since 1.0.1
     442 * @deprecated Use wp_get_links()
     443 * @see wp_get_links()
     444 *
     445 * @param string $category The category to use.
     446 * @param string $args
     447 * @return bool|null
     448 */
    233449function wp_get_linksbyname($category, $args = '') {
    234     global $wpdb;
    235 
    236     $cat = get_term_by('name', $cat_name, 'link_category');
     450    $cat = get_term_by('name', $category, 'link_category');
    237451    if ( !$cat )
    238452        return false;
     
    243457}
    244458
    245 /** function get_linkobjectsbyname()
    246  ** Gets an array of link objects associated with category 'cat_name'.
    247  ** Parameters:
    248  **   cat_name (default 'noname')  - The category name to use. If no
    249  **     match is found uses all
    250  **   orderby (default 'id') - the order to output the links. E.g. 'id', 'name',
    251  **     'url', 'description', or 'rating'. Or maybe owner. If you start the
    252  **     name with an underscore the order will be reversed.
    253  **     You can also specify 'rand' as the order which will return links in a
    254  **     random order.
    255  **   limit (default -1) - Limit to X entries. If not specified, all entries
    256  **     are shown.
    257  **
    258  ** Use this like:
    259  ** $links = get_linkobjectsbyname('fred');
    260  ** foreach ($links as $link) {
    261  **   echo '<li>'.$link->link_name.'</li>';
    262  ** }
    263  **/
     459/**
     460 * get_linkobjectsbyname() - Gets an array of link objects associated with category $cat_name.
     461 *
     462 * <code>
     463 *  $links = get_linkobjectsbyname('fred');
     464 *  foreach ($links as $link) {
     465 *      echo '<li>'.$link->link_name.'</li>';
     466 *  }
     467 * </code>
     468 *
     469 * @since 1.0.1
     470 * @deprecated Use get_linkobjects()
     471 * @see get_linkobjects()
     472 *
     473 * @param string $cat_name The category name to use. If no match is found uses all.
     474 * @param string $orderby The order to output the links. E.g. 'id', 'name', 'url', 'description', or 'rating'.
     475 *      Or maybe owner. If you start the name with an underscore the order will be reversed. You can also
     476 *      specify 'rand' as the order which will return links in a random order.
     477 * @param int $limit Limit to X entries. If not specified, all entries are shown.
     478 * @return unknown
     479 */
    264480function get_linkobjectsbyname($cat_name = "noname" , $orderby = 'name', $limit = -1) {
    265         global $wpdb;
    266         $cat_id = -1;
    267         $cat = get_term_by('name', $cat_name, 'link_category');
    268         if ( $cat )
    269             $cat_id = $cat->term_id;
    270 
    271         return get_linkobjects($cat_id, $orderby, $limit);
    272 }
    273 
    274 /** function get_linkobjects()
    275  ** Gets an array of link objects associated with category n.
    276  ** Parameters:
    277  **   category (default -1)  - The category to use. If no category supplied
    278  **      uses all
    279  **   orderby (default 'id') - the order to output the links. E.g. 'id', 'name',
    280  **     'url', 'description', or 'rating'. Or maybe owner. If you start the
    281  **     name with an underscore the order will be reversed.
    282  **     You can also specify 'rand' as the order which will return links in a
    283  **     random order.
    284  **   limit (default -1) - Limit to X entries. If not specified, all entries
    285  **     are shown.
    286  **
    287  ** Use this like:
    288  ** $links = get_linkobjects(1);
    289  ** if ($links) {
    290  **   foreach ($links as $link) {
    291  **     echo '<li>'.$link->link_name.'<br />'.$link->link_description.'</li>';
    292  **   }
    293  ** }
    294  ** Fields are:
    295  ** link_id
    296  ** link_url
    297  ** link_name
    298  ** link_image
    299  ** link_target
    300  ** link_category
    301  ** link_description
    302  ** link_visible
    303  ** link_owner
    304  ** link_rating
    305  ** link_updated
    306  ** link_rel
    307  ** link_notes
    308  **/
    309 // Deprecate in favor of get_linkz().
     481    $cat_id = -1;
     482    $cat = get_term_by('name', $cat_name, 'link_category');
     483    if ( $cat )
     484        $cat_id = $cat->term_id;
     485
     486    return get_linkobjects($cat_id, $orderby, $limit);
     487}
     488
     489/**
     490 * get_linkobjects() - Gets an array of link objects associated with category n.
     491 *
     492 * Usage:
     493 * <code>
     494 *  $links = get_linkobjects(1);
     495 *  if ($links) {
     496 *      foreach ($links as $link) {
     497 *          echo '<li>'.$link->link_name.'<br />'.$link->link_description.'</li>';
     498 *      }
     499 *  }
     500 * </code>
     501 *
     502 * Fields are:
     503 * <ol>
     504 *  <li>link_id</li>
     505 *  <li>link_url</li>
     506 *  <li>link_name</li>
     507 *  <li>link_image</li>
     508 *  <li>link_target</li>
     509 *  <li>link_category</li>
     510 *  <li>link_description</li>
     511 *  <li>link_visible</li>
     512 *  <li>link_owner</li>
     513 *  <li>link_rating</li>
     514 *  <li>link_updated</li>
     515 *  <li>link_rel</li>
     516 *  <li>link_notes</li>
     517 * </ol>
     518 *
     519 * @since 1.0.1
     520 * @deprecated Use get_bookmarks()
     521 * @see get_bookmarks()
     522 *
     523 * @param int $category The category to use. If no category supplied uses all
     524 * @param string $orderby the order to output the links. E.g. 'id', 'name', 'url',
     525 *      'description', or 'rating'. Or maybe owner. If you start the name with an
     526 *      underscore the order will be reversed. You can also specify 'rand' as the
     527 *      order which will return links in a random order.
     528 * @param int $limit Limit to X entries. If not specified, all entries are shown.
     529 * @return unknown
     530 */
    310531function get_linkobjects($category = 0, $orderby = 'name', $limit = 0) {
    311         global $wpdb;
    312 
    313         $links = get_bookmarks("category=$category&orderby=$orderby&limit=$limit");
    314 
    315         $links_array = array();
    316         foreach ($links as $link) {
    317             $links_array[] = $link;
    318         }
    319 
    320         return $links_array;
    321 }
    322 
    323 /** function get_linksbyname_withrating()
    324  ** Gets the links associated with category 'cat_name' and display rating stars/chars.
    325  ** Parameters:
    326  **   cat_name (default 'noname')  - The category name to use. If no
    327  **     match is found uses all
    328  **   before (default '')  - the html to output before the link
    329  **   after (default '<br />')  - the html to output after the link
    330  **   between (default ' ')  - the html to output between the link/image
    331  **     and it's description. Not used if no image or show_images == true
    332  **   show_images (default true) - whether to show images (if defined).
    333  **   orderby (default 'id') - the order to output the links. E.g. 'id', 'name',
    334  **     'url' or 'description'. Or maybe owner. If you start the
    335  **     name with an underscore the order will be reversed.
    336  **     You can also specify 'rand' as the order which will return links in a
    337  **     random order.
    338  **   show_description (default true) - whether to show the description if
    339  **     show_images=false/not defined
    340  **   limit (default -1) - Limit to X entries. If not specified, all entries
    341  **     are shown.
    342  **   show_updated (default 0) - whether to show last updated timestamp
    343  */
    344 function get_linksbyname_withrating($cat_name = "noname", $before = '',
    345                                                                         $after = '<br />', $between = " ",
    346                                                                         $show_images = true, $orderby = 'id',
    347                                                                         $show_description = true, $limit = -1, $show_updated = 0) {
    348 
    349         get_linksbyname($cat_name, $before, $after, $between, $show_images,
    350                                         $orderby, $show_description, true, $limit, $show_updated);
    351 }
    352 
    353 /** function get_links_withrating()
    354  ** Gets the links associated with category n and display rating stars/chars.
    355  ** Parameters:
    356  **   category (default -1)  - The category to use. If no category supplied
    357  **      uses all
    358  **   before (default '')  - the html to output before the link
    359  **   after (default '<br />')  - the html to output after the link
    360  **   between (default ' ')  - the html to output between the link/image
    361  **     and it's description. Not used if no image or show_images == true
    362  **   show_images (default true) - whether to show images (if defined).
    363  **   orderby (default 'id') - the order to output the links. E.g. 'id', 'name',
    364  **     'url' or 'description'. Or maybe owner. If you start the
    365  **     name with an underscore the order will be reversed.
    366  **     You can also specify 'rand' as the order which will return links in a
    367  **     random order.
    368  **   show_description (default true) - whether to show the description if
    369  **    show_images=false/not defined .
    370  **   limit (default -1) - Limit to X entries. If not specified, all entries
    371  **     are shown.
    372  **   show_updated (default 0) - whether to show last updated timestamp
    373  */
    374 function get_links_withrating($category = -1, $before = '', $after = '<br />',
    375                                                             $between = " ", $show_images = true,
    376                                                             $orderby = 'id', $show_description = true,
    377                                                             $limit = -1, $show_updated = 0) {
    378 
    379         get_links($category, $before, $after, $between, $show_images, $orderby,
    380                             $show_description, true, $limit, $show_updated);
    381 }
    382 
    383 /** function get_get_autotoggle()
    384  ** Gets the auto_toggle setting of category n.
    385  ** Parameters: id (default 0)  - The category to get. If no category supplied
    386  **                uses 0
     532    $links = get_bookmarks("category=$category&orderby=$orderby&limit=$limit");
     533
     534    $links_array = array();
     535    foreach ($links as $link)
     536        $links_array[] = $link;
     537
     538    return $links_array;
     539}
     540
     541/**
     542 * get_linksbyname_withrating() - Gets the links associated with category 'cat_name' and display rating stars/chars.
     543 *
     544 * @since 0.71
     545 * @deprecated Use get_bookmarks()
     546 * @see get_bookmarks()
     547 *
     548 * @param string $cat_name The category name to use. If no match is found uses all
     549 * @param string $before The html to output before the link
     550 * @param string $after The html to output after the link
     551 * @param string $between The html to output between the link/image and it's description. Not used if no image or show_images is true
     552 * @param bool $show_images Whether to show images (if defined).
     553 * @param string $orderby the order to output the links. E.g. 'id', 'name', 'url',
     554 *      'description', or 'rating'. Or maybe owner. If you start the name with an
     555 *      underscore the order will be reversed. You can also specify 'rand' as the
     556 *      order which will return links in a random order.
     557 * @param bool $show_description Whether to show the description if show_images=false/not defined
     558 * @param int $limit Limit to X entries. If not specified, all entries are shown.
     559 * @param int $show_updated Whether to show last updated timestamp
     560 */
     561function get_linksbyname_withrating($cat_name = "noname", $before = '', $after = '<br />', $between = " ",
     562                                    $show_images = true, $orderby = 'id', $show_description = true, $limit = -1, $show_updated = 0) {
     563
     564    get_linksbyname($cat_name, $before, $after, $between, $show_images, $orderby, $show_description, true, $limit, $show_updated);
     565}
     566
     567/**
     568 * get_links_withrating() - Gets the links associated with category n and display rating stars/chars.
     569 *
     570 * @since 0.71
     571 * @deprecated Use get_bookmarks()
     572 * @see get_bookmarks()
     573 *
     574 * @param int $category The category to use. If no category supplied uses all
     575 * @param string $before The html to output before the link
     576 * @param string $after The html to output after the link
     577 * @param string $between The html to output between the link/image and it's description. Not used if no image or show_images == true
     578 * @param bool $show_images Whether to show images (if defined).
     579 * @param string $orderby The order to output the links. E.g. 'id', 'name', 'url',
     580 *      'description', or 'rating'. Or maybe owner. If you start the name with an
     581 *      underscore the order will be reversed. You can also specify 'rand' as the
     582 *      order which will return links in a random order.
     583 * @param bool $show_description Whether to show the description if show_images=false/not defined.
     584 * @param string $limit Limit to X entries. If not specified, all entries are shown.
     585 * @param int $show_updated Whether to show last updated timestamp
     586 */
     587function get_links_withrating($category = -1, $before = '', $after = '<br />', $between = " ", $show_images = true,
     588                              $orderby = 'id', $show_description = true, $limit = -1, $show_updated = 0) {
     589
     590    get_links($category, $before, $after, $between, $show_images, $orderby, $show_description, true, $limit, $show_updated);
     591}
     592
     593/**
     594 * get_autotoggle() - Gets the auto_toggle setting
     595 *
     596 * @since 0.71
     597 * @deprecated No alternative function available
     598 *
     599 * @param int $id The category to get. If no category supplied uses 0
     600 * @return int Only returns 0.
    387601 */
    388602function get_autotoggle($id = 0) {
     
    390604}
    391605
    392 // Use wp_list_cats().
    393 function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_order = 'asc', $file = '', $list = true, $optiondates = 0, $optioncount = 0, $hide_empty = 1, $use_desc_for_title = 1, $children=FALSE, $child_of=0, $categories=0, $recurse=0, $feed = '', $feed_image = '', $exclude = '', $hierarchical=FALSE) {
     606/**
     607 * @since 0.71
     608 * @deprecated Use wp_list_categories()
     609 * @see wp_list_categories()
     610 *
     611 * @param int $optionall
     612 * @param string $all
     613 * @param string $sort_column
     614 * @param string $sort_order
     615 * @param string $file
     616 * @param bool $list
     617 * @param int $optiondates
     618 * @param int $optioncount
     619 * @param int $hide_empty
     620 * @param int $use_desc_for_title
     621 * @param bool $children
     622 * @param int $child_of
     623 * @param int $categories
     624 * @param int $recurse
     625 * @param string $feed
     626 * @param string $feed_image
     627 * @param string $exclude
     628 * @param bool $hierarchical
     629 * @return unknown
     630 */
     631function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_order = 'asc', $file = '', $list = true, $optiondates = 0,
     632                   $optioncount = 0, $hide_empty = 1, $use_desc_for_title = 1, $children=false, $child_of=0, $categories=0,
     633                   $recurse=0, $feed = '', $feed_image = '', $exclude = '', $hierarchical=false) {
    394634    $query = compact('optionall', 'all', 'sort_column', 'sort_order', 'file', 'list', 'optiondates', 'optioncount', 'hide_empty', 'use_desc_for_title', 'children',
    395635        'child_of', 'categories', 'recurse', 'feed', 'feed_image', 'exclude', 'hierarchical');
     
    397637}
    398638
     639/**
     640 * @since 1.2
     641 * @deprecated Use wp_list_categories()
     642 * @see wp_list_categories()
     643 *
     644 * @param string|array $args
     645 * @return unknown
     646 */
    399647function wp_list_cats($args = '') {
    400648    $r = wp_parse_args( $args );
     
    418666}
    419667
     668/**
     669 * @since 0.71
     670 * @deprecated Use wp_dropdown_categories()
     671 * @see wp_dropdown_categories()
     672 *
     673 * @param int $optionall
     674 * @param string $all
     675 * @param string $orderby
     676 * @param string $order
     677 * @param int $show_last_update
     678 * @param int $show_count
     679 * @param int $hide_empty
     680 * @param bool $optionnone
     681 * @param int $selected
     682 * @param int $exclude
     683 * @return unknown
     684 */
    420685function dropdown_cats($optionall = 1, $all = 'All', $orderby = 'ID', $order = 'asc',
    421         $show_last_update = 0, $show_count = 0, $hide_empty = 1, $optionnone = FALSE,
     686        $show_last_update = 0, $show_count = 0, $hide_empty = 1, $optionnone = false,
    422687        $selected = 0, $exclude = 0) {
    423688
     
    436701}
    437702
    438 // Use wp_print_scripts() or WP_Scripts.
     703/**
     704 * @since 2.1
     705 * @deprecated Use wp_print_scripts() or WP_Scripts.
     706 * @see wp_print_scripts()
     707 * @see WP_Scripts
     708 */
    439709function tinymce_include() {
    440710    wp_print_script('wp_tiny_mce');
    441711}
    442712
     713/**
     714 * @since 1.2
     715 * @deprecated Use wp_list_authors()
     716 * @see wp_list_authors()
     717 *
     718 * @param bool $optioncount
     719 * @param bool $exclude_admin
     720 * @param bool $show_fullname
     721 * @param bool $hide_empty
     722 * @param string $feed
     723 * @param string $feed_image
     724 * @return unknown
     725 */
    443726function list_authors($optioncount = false, $exclude_admin = true, $show_fullname = false, $hide_empty = true, $feed = '', $feed_image = '') {
    444727    $args = compact('optioncount', 'exclude_admin', 'show_fullname', 'hide_empty', 'feed', 'feed_image');
     
    446729}
    447730
     731/**
     732 * @since 1.0.1
     733 * @deprecated Use wp_get_post_categories()
     734 * @see wp_get_post_categories()
     735 *
     736 * @param int $blogid Not Used
     737 * @param int $post_ID
     738 * @return unknown
     739 */
    448740function wp_get_post_cats($blogid = '1', $post_ID = 0) {
    449741    return wp_get_post_categories($post_ID);
    450742}
    451743
     744/**
     745 * wp_set_post_cats() - Sets the categories that the post id belongs to.
     746 *
     747 * @since 1.0.1
     748 * @deprecated Use wp_set_post_categories()
     749 * @see wp_set_post_categories()
     750 *
     751 * @param int $blogid Not used
     752 * @param int $post_ID
     753 * @param array $post_categories
     754 * @return unknown
     755 */
    452756function wp_set_post_cats($blogid = '1', $post_ID = 0, $post_categories = array()) {
    453757    return wp_set_post_categories($post_ID, $post_categories);
    454758}
    455759
    456 // Use wp_get_archives().
     760/**
     761 * @since 0.71
     762 * @deprecated Use wp_get_archives()
     763 * @see wp_get_archives()
     764 *
     765 * @param string $type
     766 * @param string $limit
     767 * @param string $format
     768 * @param string $before
     769 * @param string $after
     770 * @param bool $show_post_count
     771 * @return unknown
     772 */
    457773function get_archives($type='', $limit='', $format='html', $before = '', $after = '', $show_post_count = false) {
    458774    $args = compact('type', 'limit', 'format', 'before', 'after', 'show_post_count');
     
    460776}
    461777
    462 // Use get_author_posts_url().
     778/**
     779 * get_author_link() - Returns or Prints link to the author's posts
     780 *
     781 * @since 1.2
     782 * @deprecated Use get_author_posts_url()
     783 * @see get_author_posts_url()
     784 *
     785 * @param bool $echo Optional.
     786 * @param int $author_id Required.
     787 * @param string $author_nicename Optional.
     788 * @return string|null
     789 */
    463790function get_author_link($echo = false, $author_id, $author_nicename = '') {
    464791    $link = get_author_posts_url($author_id, $author_nicename);
     
    469796}
    470797
    471 // Use wp_link_pages().
    472 function link_pages($before='<br />', $after='<br />', $next_or_number='number', $nextpagelink='next page', $previouspagelink='previous page', $pagelink='%', $more_file='') {
     798/**
     799 * link_pages() - Print list of pages based on arguments
     800 *
     801 * @since 0.71
     802 * @deprecated Use wp_link_pages()
     803 * @see wp_link_pages()
     804 *
     805 * @param string $before
     806 * @param string $after
     807 * @param string $next_or_number
     808 * @param string $nextpagelink
     809 * @param string $previouspagelink
     810 * @param string $pagelink
     811 * @param string $more_file
     812 * @return string
     813 */
     814function link_pages($before='<br />', $after='<br />', $next_or_number='number', $nextpagelink='next page', $previouspagelink='previous page',
     815                    $pagelink='%', $more_file='') {
    473816    $args = compact('before', 'after', 'next_or_number', 'nextpagelink', 'previouspagelink', 'pagelink', 'more_file');
    474817    return wp_link_pages($args);
    475818}
    476819
    477 // Use get_option().
     820/**
     821 * get_settings() - Get value based on option
     822 *
     823 * @since 0.71
     824 * @deprecated Use get_option()
     825 * @see get_option()
     826 *
     827 * @param string $option
     828 * @return string
     829 */
    478830function get_settings($option) {
    479831    return get_option($option);
    480832}
    481833
    482 // Use the_permalink().
     834/**
     835 * permalink_link() - Print the permalink of the current post in the loop
     836 *
     837 * @since 0.71
     838 * @deprecated Use the_permalink()
     839 * @see the_permalink()
     840 */
    483841function permalink_link() {
    484842    the_permalink();
    485843}
    486844
    487 // Use the_permalink_rss()
     845/**
     846 * permalink_single_rss() - Print the permalink to the RSS feed
     847 *
     848 * @since 0.71
     849 * @deprecated Use the_permalink_rss()
     850 * @see the_permalink_rss()
     851 *
     852 * @param string $file
     853 */
    488854function permalink_single_rss($file = '') {
    489855    the_permalink_rss();
    490856}
    491857
    492 /** function wp_get_links()
    493  ** Gets the links associated with category n.
    494  ** Parameters:
    495  **   category (no default)  - The category to use.
    496  ** or:
    497  **   a query string
    498  **/
     858/**
     859 * wp_get_links() - Gets the links associated with category.
     860 *
     861 * @see get_links() for argument information that can be used in $args
     862 * @since 1.0.1
     863 * @deprecated Use get_bookmarks()
     864 * @see get_bookmarks()
     865 *
     866 * @param string $args a query string
     867 * @return null|string
     868 */
    499869function wp_get_links($args = '') {
    500     global $wpdb;
    501 
    502870    if ( strpos( $args, '=' ) === false ) {
    503871        $cat_id = $args;
     
    518886
    519887    return get_links($category, $before, $after, $between, $show_images, $orderby, $show_description, $show_rating, $limit, $show_updated, $echo);
    520 } // end wp_get_links
    521 
    522 /** function get_links()
    523  ** Gets the links associated with category n.
    524  ** Parameters:
    525  **   category (default -1)  - The category to use. If no category supplied
    526  **      uses all
    527  **   before (default '')  - the html to output before the link
    528  **   after (default '<br />')  - the html to output after the link
    529  **   between (default ' ')  - the html to output between the link/image
    530  **     and its description. Not used if no image or show_images == true
    531  **   show_images (default true) - whether to show images (if defined).
    532  **   orderby (default 'id') - the order to output the links. E.g. 'id', 'name',
    533  **     'url', 'description', or 'rating'. Or maybe owner. If you start the
    534  **     name with an underscore the order will be reversed.
    535  **     You can also specify 'rand' as the order which will return links in a
    536  **     random order.
    537  **   show_description (default true) - whether to show the description if
    538  **    show_images=false/not defined .
    539  **   show_rating (default false) - show rating stars/chars
    540  **   limit (default -1) - Limit to X entries. If not specified, all entries
    541  **     are shown.
    542  **   show_updated (default 0) - whether to show last updated timestamp
    543  **   echo (default true) - whether to echo the results, or return them instead
    544  */
    545 function get_links($category = -1,
    546             $before = '',
    547             $after = '<br />',
    548             $between = ' ',
    549             $show_images = true,
    550             $orderby = 'name',
    551             $show_description = true,
    552             $show_rating = false,
    553             $limit = -1,
    554             $show_updated = 1,
    555             $echo = true) {
    556 
    557     global $wpdb;
     888}
     889
     890/**
     891 * get_links() - Gets the links associated with category by id.
     892 *
     893 * @since 0.71
     894 * @deprecated Use get_bookmarks()
     895 * @see get_bookmarks()
     896 *
     897 * @param int $category The category to use. If no category supplied uses all
     898 * @param string $before the html to output before the link
     899 * @param string $after the html to output after the link
     900 * @param string $between the html to output between the link/image and its description.
     901 *      Not used if no image or show_images == true
     902 * @param bool $show_images whether to show images (if defined).
     903 * @param string $orderby the order to output the links. E.g. 'id', 'name', 'url',
     904 *      'description', or 'rating'. Or maybe owner. If you start the name with an
     905 *      underscore the order will be reversed. You can also specify 'rand' as the order
     906 *      which will return links in a random order.
     907 * @param bool $show_description whether to show the description if show_images=false/not defined.
     908 * @param bool $show_rating show rating stars/chars
     909 * @param int $limit Limit to X entries. If not specified, all entries are shown.
     910 * @param int $show_updated whether to show last updated timestamp
     911 * @param bool $echo whether to echo the results, or return them instead
     912 * @return null|string
     913 */
     914function get_links($category = -1, $before = '', $after = '<br />', $between = ' ', $show_images = true, $orderby = 'name',
     915            $show_description = true, $show_rating = false, $limit = -1, $show_updated = 1, $echo = true) {
    558916
    559917    $order = 'ASC';
     
    634992}
    635993
    636 /*
    637  * function get_links_list()
    638  *
    639  * added by Dougal
     994/**
     995 * get_links_list() - Output entire list of links by category
    640996 *
    641997 * Output a list of all links, listed by category, using the
     
    643999 * HTML unordered list.
    6441000 *
    645  * Parameters:
    646  *   order (default 'name')  - Sort link categories by 'name' or 'id'
    647  *   hide_if_empty (default true)  - Supress listing empty link categories
    648  */
    649 function get_links_list($order = 'name', $hide_if_empty = 'obsolete') {
     1001 * @author Dougal
     1002 * @since 1.0.1
     1003 * @deprecated Use get_categories()
     1004 * @see get_categories()
     1005 *
     1006 * @param string $order Sort link categories by 'name' or 'id'
     1007 * @param string $$deprecated Not Used
     1008 */
     1009function get_links_list($order = 'name', $deprecated = '') {
    6501010    $order = strtolower($order);
    6511011
     
    6781038}
    6791039
    680 
    681 /** function links_popup_script()
    682  ** This function contributed by Fullo -- http://sprite.csr.unibo.it/fullo/
    683  ** Show the link to the links popup and the number of links
    684  ** Parameters:
    685  **   text (default Links)  - the text of the link
    686  **   width (default 400)  - the width of the popup window
    687  **   height (default 400)  - the height of the popup window
    688  **   file (default linkspopup.php) - the page to open in the popup window
    689  **   count (default true) - the number of links in the db
     1040/**
     1041 * links_popup_script() - Show the link to the links popup and the number of links
     1042 *
     1043 * @author Fullo
     1044 * @link http://sprite.csr.unibo.it/fullo/
     1045 *
     1046 * @since 0.71
     1047 * @deprecated {@internal Use function instead is unknown}}
     1048 *
     1049 * @param string $text the text of the link
     1050 * @param int $width the width of the popup window
     1051 * @param int $height the height of the popup window
     1052 * @param string $file the page to open in the popup window
     1053 * @param bool $count the number of links in the db
    6901054 */
    6911055function links_popup_script($text = 'Links', $width=400, $height=400, $file='links.all.php', $count = true) {
     
    7031067}
    7041068
    705 
     1069/**
     1070 * @since 1.0.1
     1071 * @deprecated Use sanitize_bookmark_field()
     1072 * @see sanitize_bookmark_field()
     1073 *
     1074 * @param object $link
     1075 * @return unknown
     1076 */
    7061077function get_linkrating($link) {
    7071078    return sanitize_bookmark_field('link_rating', $link->link_rating, $link->link_id, 'display');
    7081079}
    7091080
    710 /** function get_linkcatname()
    711  ** Gets the name of category n.
    712  ** Parameters: id (default 0)  - The category to get. If no category supplied
    713  **                uses 0
     1081/**
     1082 * get_linkcatname() - Gets the name of category by id.
     1083 *
     1084 * @since 0.71
     1085 * @deprecated Use get_category()
     1086 * @see get_category()
     1087 *
     1088 * @param int $id The category to get. If no category supplied uses 0
     1089 * @return string
    7141090 */
    7151091function get_linkcatname($id = 0) {
     
    7301106}
    7311107
    732 
     1108/**
     1109 * comment_rss_link() - Print RSS comment feed link
     1110 *
     1111 * @since 1.0.1
     1112 * @deprecated Use post_comments_feed_link()
     1113 * @see post_comments_feed_link()
     1114 *
     1115 * @param string $link_text
     1116 * @param string $deprecated Not used
     1117 */
    7331118function comments_rss_link($link_text = 'Comments RSS', $deprecated = '') {
    7341119    post_comments_feed_link($link_text);
    7351120}
    7361121
    737 function get_category_rss_link($echo = false, $cat_ID, $deprecated = '') {
     1122/**
     1123 * get_category_rss_link() - Print/Return link to category RSS2 feed
     1124 *
     1125 * @since 1.2
     1126 * @deprecated Use get_category_feed_link()
     1127 * @see get_category_feed_link()
     1128 *
     1129 * @param bool $echo
     1130 * @param int $cat_ID
     1131 * @param string $deprecated Not used
     1132 * @return string|null
     1133 */
     1134function get_category_rss_link($echo = false, $cat_ID = 1, $deprecated = '') {
    7381135    $link = get_category_feed_link($cat_ID, $feed = 'rss2');
    7391136
     
    7431140}
    7441141
    745 function get_author_rss_link($echo = false, $author_id, $deprecated = '') {
     1142/**
     1143 * get_author_rss_link() - Print/Return link to author RSS feed
     1144 *
     1145 * @since 1.2
     1146 * @deprecated Use get_author_feed_link()
     1147 * @see get_author_feed_link()
     1148 *
     1149 * @param bool $echo
     1150 * @param int $author_id
     1151 * @param string $deprecated Not used
     1152 * @return string|null
     1153 */
     1154function get_author_rss_link($echo = false, $author_id = 1, $deprecated = '') {
    7461155    $link = get_author_feed_link($author_id);
    7471156    if ( $echo )
Note: See TracChangeset for help on using the changeset viewer.