On this page
wp_get_linksbyname( string $category, string $args = '' ): string|null
This function has been deprecated. Use wp_list_bookmarks() instead.
Gets the links associated with the named category.
Description
See also
Parameters
$categorystring Required-
The category to use.
$argsstring Optional-
Default:
''
Return
string|null
Source
File: wp-includes/deprecated.php. View all references
function wp_get_linksbyname($category, $args = '') {
_deprecated_function(__FUNCTION__, '2.1.0', 'wp_list_bookmarks()');
$defaults = array(
'after' => '<br />',
'before' => '',
'categorize' => 0,
'category_after' => '',
'category_before' => '',
'category_name' => $category,
'show_description' => 1,
'title_li' => '',
);
$parsed_args = wp_parse_args( $args, $defaults );
return wp_list_bookmarks($parsed_args);
}
Related
Uses
| Uses | Description |
|---|---|
| wp_list_bookmarks() wp-includes/bookmark-template.php | Retrieves or echoes all of the bookmarks. |
| _deprecated_function() wp-includes/functions.php | Marks a function as deprecated and inform when it has been used. |
| wp_parse_args() wp-includes/functions.php | Merges user defined arguments into defaults array. |
Changelog
| Version | Description |
|---|---|
| 2.1.0 | Use wp_list_bookmarks() |
| 1.0.1 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_get_linksbyname