Warning: This function has been deprecated. Use wp_list_bookmarks() instead.

wp_get_links() WordPress Function

The wp_get_links() function is used to get the links associated with a post. This function can be used in conjunction with the_ content() or get_the_content() to display the links in a post.

wp_get_links( string $args = '' ) #

Gets the links associated with category.


Description

Top ↑

See also


Top ↑

Parameters

$args

(string)(Optional)a query string

Default value: ''


Top ↑

Return

(null|string)


Top ↑

Source

File: wp-includes/deprecated.php

function wp_get_links($args = '') {
	_deprecated_function( __FUNCTION__, '2.1.0', 'wp_list_bookmarks()' );

	if ( strpos( $args, '=' ) === false ) {
		$cat_id = $args;
		$args = add_query_arg( 'category', $cat_id, $args );
	}

	$defaults = array(
		'after' => '<br />',
		'before' => '',
		'between' => ' ',
		'categorize' => 0,
		'category' => '',
		'echo' => true,
		'limit' => -1,
		'orderby' => 'name',
		'show_description' => true,
		'show_images' => true,
		'show_rating' => false,
		'show_updated' => true,
		'title_li' => '',
	);

	$parsed_args = wp_parse_args( $args, $defaults );

	return wp_list_bookmarks($parsed_args);
}


Top ↑

Changelog

Changelog
VersionDescription
2.1.0Use wp_list_bookmarks()
1.0.1Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More