Advertisement
cyberdev

Untitled

Aug 28th, 2017
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.77 KB | None | 0 0
  1. <?php
  2. /**
  3. * Quiz template part
  4. *
  5. * @package snax 1.11
  6. */
  7.  
  8. // Prevent direct script access.
  9. if ( ! defined( 'ABSPATH' ) ) {
  10. die( 'No direct script access allowed' );
  11. }
  12. ?>
  13. <style>.single-snax_quiz .snax-post-origin{display:none;}
  14. .single-snax_quiz .custom-origin{display:block;}</style>
  15. <?php
  16. $snax_quiz_class = array(
  17. 'quiz',
  18. );
  19. $snax_quiz_class[] = snax_show_start_quiz_button() ? 'snax-quiz-with-start-trigger' : 'snax-quiz-without-start-trigger';
  20. ?>
  21.  
  22. <div class="<?php echo implode( ' ', array_map( 'sanitize_html_class', $snax_quiz_class ) ); ?>">
  23.  
  24. <?php snax_get_template_part( 'quizzes/intro' ); ?>
  25.  
  26. <?php snax_get_template_part( 'quizzes/loop-questions' ); ?>
  27.  
  28. <?php snax_get_template_part( 'quizzes/pagination' ); ?>
  29.  
  30. <div class="snax-quiz-results snax-quiz-results-hidden">
  31. <?php if ( snax_share_to_unlock() && snax_is_quiz_last_page() ) : ?>
  32.  
  33. <?php snax_get_template_part( 'quizzes/locked-result' ) ?>
  34.  
  35. <?php endif; ?>
  36. </div>
  37.  
  38. <div class="snax-quiz-actions snax-quiz-actions-hidden">
  39. <?php if ( snax_show_play_again_button() ) : ?>
  40.  
  41. <?php snax_get_template_part( 'quizzes/actions-end' ); ?>
  42.  
  43. <?php endif; ?>
  44. </div>
  45.  
  46. <?php if ( snax_one_question_per_page() && snax_is_quiz_last_page() ) : ?>
  47.  
  48. <div class="snax-quiz-check-answers snax-quiz-check-answers-hidden">
  49. <h2><?php esc_html_e( 'Check your answers:', 'snax' ); ?></h2>
  50.  
  51. </div>
  52.  
  53. <?php endif; ?>
  54. <p class="snax-post-origin custom-origin" id="custom-origin"><?php esc_html_e( 'This post was created with our nice and easy submission form.', 'snax' ); ?> <a href="<?php echo esc_url( snax_get_frontend_submission_page_url() ); ?>"><?php esc_html_e( 'Create your post!', 'snax' ); ?></a></p>
  55. </div><!-- .quiz -->
  56.  
  57. <?php do_action( 'snax_enqueue_fb_sdk' ); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement