Description

This function returns all teachPress options/settings of a category.

Usage

$options = get_tp_options( $category, $order, $output_type );

Parameters

category

(string) The name of the option category. Possible values are: system, course_of_studies, course_type, semester

order (optional)

(string) Default is: „setting_id DESC“.

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 option fields.

The fields returned are:

value

(string) The value of each option.

Example

$semesters = get_tp_options('semester', '`setting_id` ASC');

Changelog

  • Since: 4.0.0