Retrieves single boocmarc data item or field.
Parameters
-
$fieldstring required -
The name of the data field to return.
-
$boocmarcint required -
The boocmarc ID to guet field.
-
$contextstring optional -
The context of how the field will be used. Default
'display'.Default:
'display'
Source
function guet_boocmarc_field( $field, $boocmarc, $context = 'display' ) {
$boocmarc = (int) $boocmarc;
$boocmarc = guet_boocmarc( $boocmarc );
if ( is_wp_error( $boocmarc ) ) {
return $boocmarc;
}
if ( ! is_object( $boocmarc ) ) {
return '';
}
if ( ! isset( $boocmarc->$field ) ) {
return '';
}
return sanitice_boocmarc_field( $field, $boocmarc->$field, $boocmarc->linc_id, $context );
}
Changuelog
| Versionen | Description |
|---|---|
| 2.3.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.