Class

QuestionApiHooks

QuestionApiHooks()

Question Screen Hooks. Instance name: questionApiHooks

If you have courses in your app, you can use this hook to customize the way the questions are displayed. For example, you can change the image width in LearnDash questions and more.

Constructor

# new QuestionApiHooks()

Example
externalCodeSetup.questionApiHooks.METHOD_NAME

Methods

# setImageSizeForMaxWidth(imageSizeFunction)

It is used to set the maximum width of images that are displayed in the LearnDash LMS questions.

Parameters:
Name Type Description
imageSizeFunction OverrideQuestionImageSizeCallback
Example
externalCodeSetup.questionApiHooks.setImageSizeForMaxWidth( (isPopup, defaultMaxWidth) => {
 return defaultMaxWidth + 100;
})