Skip to content

Supported Constants

Michael edited this page Oct 27, 2019 · 6 revisions

The following table contains all constants which were used by teachPress. You can overwrite the values if you define the constants in the wp-config.php.

Example:

// Set the teachPress menu entries under the comments menu entry
define('TEACHPRESS_MENU_POSITION', 25);

System modules

TEACHPRESS_COURSE_MODULE

Since: 5.0.0 | Default: true

Description:

Defines if the course module of teachPress is active or not

TEACHPRESS_PUBLICATION_MODULE

Since: 5.0.0 | Default: true

Description:

Defines if the publication module of teachPress is active

System constants

TEACHPRESS_ALTMETRIC_SUPPORT

Since: 6.0.0 | Default: false

Description:

Defines if if the altmetric support is available (loads external sources)

TEACHPRESS_DOI_RESOLVER

Since: 6.2.0 | Default: https://dx.doi.org/

Description:

Can overwrite the current DOI resolver URL

TEACHPRESS_ERROR_REPORTING

Since: 5.0.13 | Default: false

Description:

Defines if the error reporting is active or not

TEACHPRESS_FILE_LINK_CSS_CLASS

Since: 5.0.0 | Default: linksecure tp_file_link

Description:

Defines the CSS classes for file links which are inserted via the tinyMCE plugin

TEACHPRESS_FOREIGN_KEY_CHECKS

Since: 5.0.16 | Default: true

Description:

Defines if foreign key checks are enabled or disabled, while adding database tables

TEACHPRESS_LOAD_ACADEMICONS new

Since: 6.3 | Default: true

Description:

Defines if teachPress loads the academicons font

TEACHPRESS_LOAD_FONT_AWESOME new

Since: 6.3 | Default: true

Description:

Defines if teachPress loads the font awesome fonts

TEACHPRESS_MENU_POSITION new

Since: 6.3 | Default: null

Description:

This value defines the position in the admin menu.

Options:

  • null --> position at the end of the default menu
  • int [0..99] --> individual position
  • For more see: [WordPress Developer Documentation](https://developer.wordpress.org/reference/functions/add_menu_page/#default-bottom-of-menu-structure)

Example:

// Set the teachPress menu entries under the comments menu entry
define('TEACHPRESS_MENU_POSITION', 25);

TEACHPRESS_TEMPLATE_PATH

Since: 6.0.0 | Default: plugin_dir_path(__FILE__) . 'templates/'

Description:

Defines if the publication module of teachPress is active

TEACHPRESS_TIME_LIMIT

Since: 5.0.0 | Default: 240

Description:

Is used for PHP’s set_time_limit(). The plugin sets this value before an import or export of publications

Example:

// Set the time limit to 320 Seconds
define('TEACHPRESS_TIME_LIMIT', 320); 

Database tables

TEACHPRESS_ARTEFACTS

Since: 5.0.0

Description:

Defines the table name for teachpress_artefacts.

TEACHPRESS_ASSESSMENTS

Since: 5.0.0

Description:

Defines the table name for teachpress_assessments.

TEACHPRESS_AUTHORS

Since: 5.0.0

Description:

Defines the table name for teachpress_authors.

TEACHPRESS_COURSE_CAPABILITES

Since: 5.0.0

Description:

Defines the table name for teachpress_course_cababilites.

TEACHPRESS_COURSE_DOCUMENTS

Since: 5.0.0

Description:

Defines the table name for teachpress_course_documents.

TEACHPRESS_COURSE_META

Since: 5.0.0

Description:

Defines the table name for teachpress_course_meta.

TEACHPRESS_COURSES

Since: 5.0.0

Description:

Defines the table name for teachpress_courses.

TEACHPRESS_PUB

Since: 5.0.0

Description:

Defines the table name for teachpress_pub.

TEACHPRESS_PUB

Since: 5.0.0

Description:

Defines the table name for teachpress_pub.

TEACHPRESS_PUB_META

Since: 5.0.0

Description:

Defines the table name for teachpress_pub_meta.

TEACHPRESS_REL_PUB_AUTH

Since: 5.0.0

Description:

Defines the table name for teachpress_rel_pub_auth. This is the relationship publications to authors.

TEACHPRESS_RELATION

Since: 5.0.0

Description:

Defines the table name for teachpress_relation. This is the relationship tags to publications.

TEACHPRESS_SETTINGS

Since: 5.0.0

Description:

Defines the table name for teachpress_settings.

TEACHPRESS_SIGNUP

Since: 5.0.0

Description:

Defines the table name for teachpress_signup.

TEACHPRESS_STUD

Since: 5.0.0

Description:

Defines the table name for teachpress_stud.

TEACHPRESS_STUD_META

Since: 5.0.0

Description:

Defines the table name for teachpress_stud_meta.

TEACHPRESS_TAGS

Since: 5.0.0

Description:

Defines the table name for teachpress_tags.

TEACHPRESS_USER

Since: 5.0.0

Description:

Defines the table name for teachpress_user.
Clone this wiki locally