benediktg
Forum Replies Created
-
Forum: Plugins
In reply to: [NSFW] [WP Remote Users Sync] ERROR – document.close(); – Error in SafariI have found the solution for this problem!
When you are using document.open(), document.write() and document.close() you can rewrite a hole site, when it is loaded at the wrong time and exactly this happened here.
Therefore I searched the repo of the plugin and found the file where they are using the document.close() you can find it here: https://github.com/froger-me/wp-remote-users-sync/blob/master/inc/templates/redirect-processing-script.php
SOLUTION:
In case you want to solve this problem. Go to the plugin file on your server, in the file “redirect-processing-script.php” and just comment out the two linesdocument.open();
document.write(‘<?php echo $output; // @codingStandardsIgnoreLine ?>’);It is important to let the “document.close();” persistent, because otherwise your site will be visible, but interaction is disabled.
Many thanks to me, finding this out within 2 month of work
<?php
// Get the course instance.
$course = learn_press_get_course( $course_id );// Get the curriculum of the course.
$curriculum = $course->get_curriculum();// Iterate over the curriculum sections.
foreach ( $curriculum as $section ) {
// Get the lessons associated with the section.
$lessons = $section->get_items();// Iterate over each lesson.
foreach ( $lessons as $lesson ) {
// Now you can work with each lesson, for example:// Get the lesson ID.
$lesson_id = $lesson->get_id();
}
}?>
Props to him: https://stackoverflow.com/a/60958273/14099802