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

get_linkrating() WordPress Function

The get_linkrating() WordPress function is used to get the link rating for a given link. This function takes a link ID as an input and outputs the rating for that link. The rating is a number between 1 and 5, with 5 being the highest rating.

get_linkrating( object $link ) #

Legacy function that retrieved the value of a link’s link_rating field.


Description

Top ↑

See also


Top ↑

Parameters

$link

(object)(Required)Link object.


Top ↑

Return

(mixed) Value of the 'link_rating' field, false otherwise.


Top ↑

Source

File: wp-includes/deprecated.php

function get_linkrating( $link ) {
	_deprecated_function( __FUNCTION__, '2.1.0', 'sanitize_bookmark_field()' );
	return sanitize_bookmark_field('link_rating', $link->link_rating, $link->link_id, 'display');
}


Top ↑

Changelog

Changelog
VersionDescription
2.1.0Use sanitize_bookmark_field()
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