Description

This function returns an array/object of authors/editors of publications.

Usage

$authors = tp_authors::get_authors($args = array());

Default Usage

$args = array(
           'pub_id' => '',
           'user' => '',
           'exclude' => '',
           'order' => 'ASC',
           'limit' => '',
           'search' => '',
           'include_editors' => false,
           'count' => false,
           'group_by' => false, 
           'output_type' => OBJECT
        ); 

Parameters for $args

course_id

(string) The publication IDs (separated by comma)

user

(string) The user IDs (separated by comma)

exclude

(string) The authors IDs you want to exclude from the result (separated by comma)

order

(string) ASC or DESC; default is ASC

limit

(string) The sql search limit, example: 0,30

search

(string) A normal search string

include_editors

(boolean) Boolean flag. Set it to true, if you want to include editors (default: false)

group_by

(boolean) Boolean flag for the group by clause (default: false)

count

(boolean) Set it to true, if you only need a number of authors, which will be returned by your selection (default: false)

output_type

(string) OBJECT, ARRAY_A, ARRAY_N, default is OBJECT.

Return

array|object

An array|object containing all the data fields.

Example

$authors = tp_authors::get_authors( array('pub_id' => '12') );

Changelog

  • Since: 5.0.0