wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi



get_bookmark_field › WordPress Function

Da2.3.0
Deprecaton/a
get_bookmark_field ( $field, $bookmark, $context = 'display' )
Parametri: (3)
  • (string) $field The name of the data field to return.
    Richiesto:
  • (int) $bookmark The bookmark ID to get field.
    Richiesto:
  • (string) $context Optional. The context of how the field will be used. Default 'display'.
    Richiesto: No
    Default: 'display'
Ritorna:
  • (string|WP_Error)
Definito a:
Codex:

Retrieves single bookmark data item or field.



Sorgenti

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 );
}