Description

This function returns a single publication.

Usage

$publication = tp_publications::get_publication($pub_id, $output_type);

Parameters

pub_id

(int) The ID of the publication.

output_type (optional)

(string) You can choice between:

  • OBJECT (default)
  • ARRAY_A
  • ARRAY_N

Return

(array or object)

An array or object containing all the publication fields.

Example

$publication = tp_publications::get_publication(12, ARRAY_A);

Changelog

  • Since: 5.0.0