* @deprecated 2.1.0 Use get_bookmarks()
* @param int $category Optional. The category to use. If no category supplied, uses all.
* @param string $orderby Optional. The order to output the links. E.g. 'id', 'name', 'url',
* 'description', 'rating', or 'owner'. Default 'name'.
* If you start the name with an underscore, the order will be reversed.
* Specifying 'rand' as the order will return links in a random order.
* @param int $limit Optional. Limit to X entries. If not specified, all entries are shown.
function get_linkobjects($category = 0, $orderby = 'name', $limit = 0) {
_deprecated_function( __FUNCTION__, '2.1.0', 'get_bookmarks()' );
$links = get_bookmarks( array( 'category' => $category, 'orderby' => $orderby, 'limit' => $limit ) ) ;
foreach ($links as $link)
* Gets the links associated with category 'cat_name' and display rating stars/chars.
* @deprecated 2.1.0 Use get_bookmarks()
* @param string $cat_name Optional. The category name to use. If no match is found, uses all.
* @param string $before Optional. The HTML to output before the link. Default empty.
* @param string $after Optional. The HTML to output after the link. Default '<br />'.
* @param string $between Optional. The HTML to output between the link/image and its description.
* Not used if no image or $show_images is true. Default ' '.
* @param bool $show_images Optional. Whether to show images (if defined). Default true.
* @param string $orderby Optional. The order to output the links. E.g. 'id', 'name', 'url',
* 'description', 'rating', or 'owner'. Default 'id'.
* If you start the name with an underscore, the order will be reversed.
* Specifying 'rand' as the order will return links in a random order.
* @param bool $show_description Optional. Whether to show the description if show_images=false/not defined.
* @param int $limit Optional. Limit to X entries. If not specified, all entries are shown.
* @param int $show_updated Optional. Whether to show last updated timestamp. Default 0.
function get_linksbyname_withrating($cat_name = "noname", $before = '', $after = '<br />', $between = " ",
$show_images = true, $orderby = 'id', $show_description = true, $limit = -1, $show_updated = 0) {
_deprecated_function( __FUNCTION__, '2.1.0', 'get_bookmarks()' );
get_linksbyname($cat_name, $before, $after, $between, $show_images, $orderby, $show_description, true, $limit, $show_updated);
* Gets the links associated with category n and display rating stars/chars.
* @deprecated 2.1.0 Use get_bookmarks()
* @param int $category Optional. The category to use. If no category supplied, uses all.
* @param string $before Optional. The HTML to output before the link. Default empty.
* @param string $after Optional. The HTML to output after the link. Default '<br />'.
* @param string $between Optional. The HTML to output between the link/image and its description.
* Not used if no image or $show_images is true. Default ' '.
* @param bool $show_images Optional. Whether to show images (if defined). Default true.
* @param string $orderby Optional. The order to output the links. E.g. 'id', 'name', 'url',
* 'description', 'rating', or 'owner'. Default 'id'.
* If you start the name with an underscore, the order will be reversed.
* Specifying 'rand' as the order will return links in a random order.
* @param bool $show_description Optional. Whether to show the description if show_images=false/not defined.
* @param int $limit Optional. Limit to X entries. If not specified, all entries are shown.
* @param int $show_updated Optional. Whether to show last updated timestamp. Default 0.
function get_links_withrating($category = -1, $before = '', $after = '<br />', $between = " ", $show_images = true,
$orderby = 'id', $show_description = true, $limit = -1, $show_updated = 0) {
_deprecated_function( __FUNCTION__, '2.1.0', 'get_bookmarks()' );
get_links($category, $before, $after, $between, $show_images, $orderby, $show_description, true, $limit, $show_updated);
* Gets the auto_toggle setting.
* @param int $id The category to get. If no category supplied uses 0
* @return int Only returns 0.
function get_autotoggle($id = 0) {
_deprecated_function( __FUNCTION__, '2.1.0' );
* @deprecated 2.1.0 Use wp_list_categories()
* @see wp_list_categories()
* @param string $sort_column
* @param string $sort_order
* @param int $optiondates
* @param int $optioncount
* @param int $use_desc_for_title
* @param string $feed_image
* @param bool $hierarchical
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) {
_deprecated_function( __FUNCTION__, '2.1.0', 'wp_list_categories()' );
$query = compact('optionall', 'all', 'sort_column', 'sort_order', 'file', 'list', 'optiondates', 'optioncount', 'hide_empty', 'use_desc_for_title', 'children',
'child_of', 'categories', 'recurse', 'feed', 'feed_image', 'exclude', 'hierarchical');
return wp_list_cats($query);
* @deprecated 2.1.0 Use wp_list_categories()
* @see wp_list_categories()
* @param string|array $args
* @return null|string|false
function wp_list_cats($args = '') {
_deprecated_function( __FUNCTION__, '2.1.0', 'wp_list_categories()' );
$parsed_args = wp_parse_args( $args );
if ( isset($parsed_args['optionall']) && isset($parsed_args['all']))
$parsed_args['show_option_all'] = $parsed_args['all'];
if ( isset($parsed_args['sort_column']) )
$parsed_args['orderby'] = $parsed_args['sort_column'];
if ( isset($parsed_args['sort_order']) )
$parsed_args['order'] = $parsed_args['sort_order'];
if ( isset($parsed_args['optiondates']) )
$parsed_args['show_last_update'] = $parsed_args['optiondates'];
if ( isset($parsed_args['optioncount']) )
$parsed_args['show_count'] = $parsed_args['optioncount'];
if ( isset($parsed_args['list']) )
$parsed_args['style'] = $parsed_args['list'] ? 'list' : 'break';
$parsed_args['title_li'] = '';
return wp_list_categories($parsed_args);
* Deprecated method for generating a drop-down of categories.
* @deprecated 2.1.0 Use wp_dropdown_categories()
* @see wp_dropdown_categories()
* @param int $show_last_update
* @param bool $optionnone
function dropdown_cats($optionall = 1, $all = 'All', $orderby = 'ID', $order = 'asc',
$show_last_update = 0, $show_count = 0, $hide_empty = 1, $optionnone = false,
$selected = 0, $exclude = 0) {
_deprecated_function( __FUNCTION__, '2.1.0', 'wp_dropdown_categories()' );
$show_option_none = __('None');
$vars = compact('show_option_all', 'show_option_none', 'orderby', 'order',
'show_last_update', 'show_count', 'hide_empty', 'selected', 'exclude');
$query = add_query_arg($vars, '');
return wp_dropdown_categories($query);
* @deprecated 2.1.0 Use wp_list_authors()
* @param bool $optioncount
* @param bool $exclude_admin
* @param bool $show_fullname
* @param bool $hide_empty
* @param string $feed_image
function list_authors($optioncount = false, $exclude_admin = true, $show_fullname = false, $hide_empty = true, $feed = '', $feed_image = '') {
_deprecated_function( __FUNCTION__, '2.1.0', 'wp_list_authors()' );
$args = compact('optioncount', 'exclude_admin', 'show_fullname', 'hide_empty', 'feed', 'feed_image');
return wp_list_authors($args);
* Retrieves a list of post categories.
* @deprecated 2.1.0 Use wp_get_post_categories()
* @see wp_get_post_categories()
* @param int $blogid Not Used
function wp_get_post_cats($blogid = '1', $post_ID = 0) {
_deprecated_function( __FUNCTION__, '2.1.0', 'wp_get_post_categories()' );
return wp_get_post_categories($post_ID);
* Sets the categories that the post ID belongs to.
* @deprecated Use wp_set_post_categories()
* @see wp_set_post_categories()
* @param int $blogid Not used
* @param array $post_categories
function wp_set_post_cats($blogid = '1', $post_ID = 0, $post_categories = array()) {
_deprecated_function( __FUNCTION__, '2.1.0', 'wp_set_post_categories()' );
return wp_set_post_categories($post_ID, $post_categories);
* Retrieves a list of archives.
* @deprecated 2.1.0 Use wp_get_archives()
* @param bool $show_post_count
function get_archives($type='', $limit='', $format='html', $before = '', $after = '', $show_post_count = false) {
_deprecated_function( __FUNCTION__, '2.1.0', 'wp_get_archives()' );
$args = compact('type', 'limit', 'format', 'before', 'after', 'show_post_count');
return wp_get_archives($args);
* Returns or Prints link to the author's posts.
* @deprecated 2.1.0 Use get_author_posts_url()
* @see get_author_posts_url()
* @param string $author_nicename Optional.
function get_author_link($echo, $author_id, $author_nicename = '') {
_deprecated_function( __FUNCTION__, '2.1.0', 'get_author_posts_url()' );
$link = get_author_posts_url($author_id, $author_nicename);
* Print list of pages based on arguments.
* @deprecated 2.1.0 Use wp_link_pages()
* @param string $next_or_number
* @param string $nextpagelink
* @param string $previouspagelink
* @param string $pagelink
* @param string $more_file
function link_pages($before='<br />', $after='<br />', $next_or_number='number', $nextpagelink='next page', $previouspagelink='previous page',
$pagelink='%', $more_file='') {
_deprecated_function( __FUNCTION__, '2.1.0', 'wp_link_pages()' );
$args = compact('before', 'after', 'next_or_number', 'nextpagelink', 'previouspagelink', 'pagelink', 'more_file');
return wp_link_pages($args);
* Get value based on option.
* @deprecated 2.1.0 Use get_option()
function get_settings($option) {
_deprecated_function( __FUNCTION__, '2.1.0', 'get_option()' );
return get_option($option);
* Print the permalink of the current post in the loop.
* @deprecated 1.2.0 Use the_permalink()
function permalink_link() {
_deprecated_function( __FUNCTION__, '1.2.0', 'the_permalink()' );
* Print the permalink to the RSS feed.
* @deprecated 2.3.0 Use the_permalink_rss()
* @see the_permalink_rss()
* @param string $deprecated
function permalink_single_rss($deprecated = '') {
_deprecated_function( __FUNCTION__, '2.3.0', 'the_permalink_rss()' );
* Gets the links associated with category.
* @deprecated 2.1.0 Use wp_list_bookmarks()
* @see wp_list_bookmarks()
* @param string $args a query string
function wp_get_links($args = '') {
_deprecated_function( __FUNCTION__, '2.1.0', 'wp_list_bookmarks()' );
if ( strpos( $args, '=' ) === false ) {
$args = add_query_arg( 'category', $cat_id, $args );
'show_description' => true,
$parsed_args = wp_parse_args( $args, $defaults );
return wp_list_bookmarks($parsed_args);
* Gets the links associated with category by ID.
* @deprecated 2.1.0 Use get_bookmarks()
* @param int $category Optional. The category to use. If no category supplied uses all.
* @param string $before Optional. The HTML to output before the link. Default empty.
* @param string $after Optional. The HTML to output after the link. Default '<br />'.
* @param string $between Optional. The HTML to output between the link/image and its description.
* Not used if no image or $show_images is true. Default ' '.
* @param bool $show_images Optional. Whether to show images (if defined). Default true.
* @param string $orderby Optional. The order to output the links. E.g. 'id', 'name', 'url',
* 'description', 'rating', or 'owner'. Default 'name'.
* If you start the name with an underscore, the order will be reversed.
* Specifying 'rand' as the order will return links in a random order.
* @param bool $show_description Optional. Whether to show the description if show_images=false/not defined.
* @param bool $show_rating Optional. Show rating stars/chars. Default false.
* @param int $limit Optional. Limit to X entries. If not specified, all entries are shown.
* @param int $show_updated Optional. Whether to show last updated timestamp. Default 1.
* @param bool $echo Whether to echo the results, or return them instead.
function get_links($category = -1, $before = '', $after = '<br />', $between = ' ', $show_images = true, $orderby = 'name',
$show_description = true, $show_rating = false, $limit = -1, $show_updated = 1, $echo = true) {
_deprecated_function( __FUNCTION__, '2.1.0', 'get_bookmarks()' );
if ( substr($orderby, 0, 1) == '_' ) {
$orderby = substr($orderby, 1);
if ( $category == -1 ) // get_bookmarks() uses '' to signify all categories.
$results = get_bookmarks(array('category' => $category, 'orderby' => $orderby, 'order' => $order, 'show_updated' => $show_updated, 'limit' => $limit));
foreach ( (array) $results as $row ) {
if ( !isset($row->recently_updated) )
$row->recently_updated = false;
if ( $show_updated && $row->recently_updated )
$output .= get_option('links_recently_updated_prepend');
if ( !empty($row->link_url) )
$the_link = esc_url($row->link_url);
$rel = ' rel="' . $rel . '"';
$desc = esc_attr(sanitize_bookmark_field('link_description', $row->link_description, $row->link_id, 'display'));
$name = esc_attr(sanitize_bookmark_field('link_name', $row->link_name, $row->link_id, 'display'));
if (substr($row->link_updated_f, 0, 2) != '00')
$title .= ' ('.__('Last updated') . ' ' . gmdate(get_option('links_updated_date_format'), $row->link_updated_f + (get_option('gmt_offset') * HOUR_IN_SECONDS)) . ')';
$title = ' title="' . $title . '"';
$alt = ' alt="' . $name . '"';
$target = $row->link_target;
$target = ' target="' . $target . '"';
$output .= '<a href="' . $the_link . '"' . $rel . $title . $target. '>';
if ( $row->link_image != null && $show_images ) {
if ( strpos($row->link_image, 'http') !== false )
$output .= "<img src=\"$row->link_image\" $alt $title />";
else // If it's a relative path.