Description

This function returns an artefact by ID.

Usage

$artefact = tp_artefacts::get_artefact($artefact_id, $output_type);

Parameters

artefact_id

(int) The ID of the artefact.

output_type (optional)

(string) You can choice between:

  • OBJECT
  • ARRAY_A (default)
  • ARRAY_N

Return

(array or object)

An array or object containing all the artefact fields.

Example

$artefact = tp_artefacts::get_artefact(12, ARRAY_A);

Changelog

  • Since: 5.0.0