wp_get_links

Gets the links associated with category.

Description

(null|string) wp_get_links( (string) $args = '' ); 

Returns (null|string)

Parameters (1)

0. $args — Optional. (string) => ''
A query string

Usage

  1. if ( !function_exists( 'wp_get_links' ) ) { 
  2. require_once ABSPATH . WPINC . '/deprecated.php'; 
  3.  
  4. // a query string 
  5. $args = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = wp_get_links($args); 
  9.  

Defined (1)

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

/wp-includes/deprecated.php  
  1. function wp_get_links($args = '') { 
  2. _deprecated_function( __FUNCTION__, '2.1.0', 'wp_list_bookmarks()' ); 
  3.  
  4. if ( strpos( $args, '=' ) === false ) { 
  5. $cat_id = $args; 
  6. $args = add_query_arg( 'category', $cat_id, $args ); 
  7.  
  8. $defaults = array( 
  9. 'after' => '<br />',  
  10. 'before' => '',  
  11. 'between' => ' ',  
  12. 'categorize' => 0,  
  13. 'category' => '',  
  14. 'echo' => true,  
  15. 'limit' => -1,  
  16. 'orderby' => 'name',  
  17. 'show_description' => true,  
  18. 'show_images' => true,  
  19. 'show_rating' => false,  
  20. 'show_updated' => true,  
  21. 'title_li' => '',  
  22. ); 
  23.  
  24. $r = wp_parse_args( $args, $defaults ); 
  25.  
  26. return wp_list_bookmarks($r);