get_linkobjects

Gets an array of link objects associated with category n.

Description

(array) get_linkobjects( (int) $category = 0, (string) $orderby = 'name', (int) $limit = 0 ); 

Usage:

Fields are:

- link_id - link_url - link_name - link_image - link_target - link_category - link_description - link_visible - link_owner - link_rating - link_updated - link_rel - link_notes

Returns (array)

Parameters (3)

0. $category — Optional. (int)
The category to use. If no category supplied uses all
1. $orderby — Optional. (string) => 'name'
The order to output the links. E.g. id,, name., url , 'description', or rating. Or maybe owner. 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 random order.
2. $limit — Optional. (int)
Limit to X entries. If not specified, all entries are shown.

Usage

  1. if ( !function_exists( 'get_linkobjects' ) ) { 
  2. require_once ABSPATH . WPINC . '/deprecated.php'; 
  3.  
  4. // The category to use. If no category supplied uses all 
  5. $category = -1; 
  6. $orderby = 'name'; 
  7.  
  8. // Limit to X entries. If not specified, all entries are shown. 
  9. $limit = -1; 
  10.  
  11. // NOTICE! Understand what this does before running. 
  12. $result = get_linkobjects($category, $orderby, $limit); 
  13.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/deprecated.php  
  1. function get_linkobjects($category = 0, $orderby = 'name', $limit = 0) { 
  2. _deprecated_function( __FUNCTION__, '2.1.0', 'get_bookmarks()' ); 
  3.  
  4. $links = get_bookmarks( array( 'category' => $category, 'orderby' => $orderby, 'limit' => $limit ) ) ; 
  5.  
  6. $links_array = array(); 
  7. foreach ($links as $link) 
  8. $links_array[] = $link; 
  9.  
  10. return $links_array;