# learnpress/4.4.9/assets/js/dist/frontend/custom.js

LearnPress – WordPress LMS Plugin for Create and Sell Online Courses, version 4.4.9. 29 lines.

- Page: https://pluginprobe.com/plugins/learnpress/4.4.9/code/assets/js/dist/frontend/custom.js
- Raw: https://pluginprobe.com/plugins/learnpress/4.4.9/raw/assets/js/dist/frontend/custom.js
- Modified: 2026-09-27T10:32:46+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/learnpress/4.4.9/code/assets/js/dist/frontend/custom.js#L10-L20`.

```javascript
/******/ (() => { // webpackBootstrap
/*!***********************************************!*\
  !*** ./assets/src/apps/js/frontend/custom.js ***!
  \***********************************************/
/**
 * Custom functions for frontend quiz.
 */

const {
  Hook
} = LP;
const $ = window.jQuery || jQuery;
Hook.addFilter('question-blocks', function (blocks) {
  return blocks; ///[ 'answer-options', 'title', 'content', 'hint', 'explanation'];
});
Hook.addAction('before-start-quiz', function () {});
Hook.addAction('quiz-started', function (results, id) {
  $(`.course-item-${id}`).removeClass('status-completed failed passed').addClass('has-status status-started');
  window.onbeforeunload = function () {
    return 'Warning!';
  };
});
Hook.addAction('quiz-submitted', function (response, id) {
  $(`.course-item-${id}`).removeClass('status-started passed failed').addClass(`has-status status-completed ${response.results.graduation}`);
  window.onbeforeunload = null;
});
/******/ })()
;
//# sourceMappingURL=custom.js.map
```
