get_bookmark_field() – Retrieve single bookmark data item or field.
You appear to be a bot. Output may be restricted
Description
Retrieves single bookmark data item or field.
Usage
$string|WP_Error = get_bookmark_field( $field, $bookmark, $context );
Parameters
- $field
- ( string ) required – The name of the data field to return.
- $bookmark
- ( int ) required – The bookmark ID to get field.
- $context
- ( string ) optional default: display – Optional. The context of how the field will be used. Default 'display'.
Returns
string|WP_Error
Source
File name: wordpress/wp-includes/bookmark.php
Lines:
1 to 18 of 18
function get_bookmark_field( $field, $bookmark, $context = 'display' ) { $bookmark = (int) $bookmark; $bookmark = get_bookmark( $bookmark ); if ( is_wp_error( $bookmark ) ) { return $bookmark; } if ( ! is_object( $bookmark ) ) { return ''; } if ( ! isset( $bookmark->$field ) ) { return ''; } return sanitize_bookmark_field( $field, $bookmark->$field, $bookmark->link_id, $context ); }