wp_get_linksbyname

Gets the links associated with the named category.

Description

(string|null) wp_get_linksbyname( (string) $category, (string) $args = '' ); 

Returns (string|null)

Parameters (2)

0. $category (string)
The category to use.
1. $args — Optional. (string) => ''
The args.

Usage

  1. if ( !function_exists( 'wp_get_linksbyname' ) ) { 
  2. require_once ABSPATH . WPINC . '/deprecated.php'; 
  3.  
  4. // The category to use. 
  5. $category = ''; 
  6.  
  7. // The args. 
  8. $args = ''; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = wp_get_linksbyname($category, $args); 
  12.  

Defined (1)

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

/wp-includes/deprecated.php  
  1. function wp_get_linksbyname($category, $args = '') { 
  2. _deprecated_function(__FUNCTION__, '2.1.0', 'wp_list_bookmarks()'); 
  3.  
  4. $defaults = array( 
  5. 'after' => '<br />',  
  6. 'before' => '',  
  7. 'categorize' => 0,  
  8. 'category_after' => '',  
  9. 'category_before' => '',  
  10. 'category_name' => $category,  
  11. 'show_description' => 1,  
  12. 'title_li' => '',  
  13. ); 
  14.  
  15. $r = wp_parse_args( $args, $defaults ); 
  16.  
  17. return wp_list_bookmarks($r);