/wp-content/plugins/the-events-calendar/common/src/admin-views/help-ticketing.php

https://github.com/livinglab/openlab · PHP · 244 lines · 223 code · 17 blank · 4 comment · 4 complexity · 16d6215ba61c8cb659e74f9759e18429 MD5 · raw file

  1. <?php
  2. use \Tribe\Admin\Help_Page;
  3. $faqs = tribe( Tribe__Admin__Help_Page::class )->get_ticketing_faqs();
  4. $extensions = tribe( Tribe__Admin__Help_Page::class )->get_ticketing_extensions();
  5. $ticketing_products = tribe( Tribe__Admin__Help_Page::class )->get_ticketing_products();
  6. ?>
  7. <div id="tribe-ticketing">
  8. <img
  9. class="tribe-events-admin-header__right-image"
  10. src="<?php echo esc_url( tribe_resource_url( 'images/help/help-ticketing-header.png', false, null, $main ) ); ?>"
  11. />
  12. <p class="tribe-events-admin-products-description">
  13. <?php esc_html_e( 'Get help for these products and learn more about products you don\'t have.', 'tribe-common' ); ?>
  14. </p>
  15. <?php // list of products ?>
  16. <div class="tribe-events-admin-products tribe-events-admin-2col-grid">
  17. <?php //requires valid links for all the products
  18. foreach ( $ticketing_products as $slug ) : ?>
  19. <div class="tribe-events-admin-products-card">
  20. <img
  21. class="tribe-events-admin-products-card__icon"
  22. src="<?php echo esc_url( tribe_resource_url( $products[ $slug ]['logo'], false, null, $main ) ); ?>"
  23. alt="<?php esc_attr_e( 'logo icon', 'tribe-common' ); ?>"
  24. />
  25. <div class="tribe-events-admin-products-card__group">
  26. <h4 class="tribe-events-admin-products-card__group-title">
  27. <?php echo esc_html( $products[ $slug ]['title'] ); ?>
  28. </h4>
  29. <div class="tribe-events-admin-products-card__group-description">
  30. <?php echo esc_html( $products[ $slug ]['description-help'] ); ?>
  31. </div>
  32. </div>
  33. <?php
  34. $plugin_path_url = WP_PLUGIN_DIR . '/' . $products[ $slug ]['plugin-dir'] . '/' . $products[ $slug ]['main-file'];
  35. $plugin_exists = file_exists( $plugin_path_url );
  36. // checks if plugin is installed and activated
  37. if ( $products[ $slug ]['is_installed'] ) { ?>
  38. <button class="tribe-events-admin-products-card__button tribe-events-admin-products-card__button--active">
  39. <?php esc_html_e( 'Active', 'tribe-common' ); ?>
  40. </button>
  41. <?php
  42. }
  43. // displays different message for Promoter
  44. elseif ( ! $products[ $slug ]['is_installed'] && 'Promoter' === $products[ $slug ]['title'] ) { ?>
  45. <a href="<?php echo esc_url( Tribe__Settings::instance()->get_url( [ 'tab' => 'licenses', 'post_type' => 'tribe_events' ] ) ); ?>" class="tribe-events-admin-products-card__button">
  46. <?php esc_html_e( 'Add license key', 'tribe-common' ); ?>
  47. </a>
  48. <?php
  49. }
  50. // checks if plugin is installed but not activated
  51. elseif ( ! $products[ $slug ]['is_installed'] && $plugin_exists ) { ?>
  52. <a href="<?php echo esc_url( admin_url( 'plugins.php' ) ); ?>" class="tribe-events-admin-products-card__button">
  53. <?php esc_html_e( 'Activate', 'tribe-common' ); ?>
  54. </a>
  55. <?php
  56. }
  57. // adds a learn more link if plugin is neither activated nor installed
  58. else { ?>
  59. <a href="<?php echo $products[ $slug ]['link'] ?>" target="_blank" rel="noopener noreferrer" class="tribe-events-admin-products-card__button">
  60. <?php esc_html_e( 'Learn More', 'tribe-common' ); ?>
  61. </a>
  62. <?php
  63. }
  64. ?>
  65. </div>
  66. <?php endforeach; ?>
  67. </div>
  68. <div class="tribe-events-admin-section-header">
  69. <h3>
  70. <?php esc_html_e( 'Start Here', 'tribe-common' ); ?>
  71. </h3>
  72. <a href="https://evnt.is/1aq9" target="_blank" rel="noopener noreferrer">
  73. <?php esc_html_e( 'Visit Knowledgebase', 'tribe-common' ); ?>
  74. </a>
  75. </div>
  76. <div class="tribe-events-admin-kb tribe-events-admin-3col-grid">
  77. <div class="tribe-events-admin-kb-card">
  78. <img
  79. class="tribe-events-admin-kb-card__image"
  80. src="<?php echo esc_url( tribe_resource_url( 'images/help/help-start-guide-tickets.png', false, null, $main ) ); ?>"
  81. alt="<?php esc_attr_e( 'book with The Events ticketing logo', 'tribe-common' ); ?>"
  82. />
  83. <h4 class="tribe-events-admin-kb-card__title">
  84. <?php esc_html_e( 'Getting Started Guides', 'tribe-common' ); ?>
  85. </h4>
  86. <ul class="tribe-events-admin-kb-card__links">
  87. <li>
  88. <a href="https://evnt.is/1apn" target="_blank" rel="noopener noreferrer">
  89. <?php esc_html_e( 'Event Tickets', 'tribe-common' ); ?>
  90. </a>
  91. </li>
  92. <li>
  93. <a href="https://evnt.is/1apo" target="_blank" rel="noopener noreferrer">
  94. <?php esc_html_e( 'Calendar & Ticket Shortcodes', 'tribe-common' ); ?>
  95. </a>
  96. </li>
  97. <li>
  98. <a href="https://evnt.is/1app" target="_blank" rel="noopener noreferrer">
  99. <?php esc_html_e( 'Promoter', 'tribe-common' ); ?>
  100. </a>
  101. </li>
  102. </ul>
  103. </div>
  104. <div class="tribe-events-admin-kb-card">
  105. <img
  106. class="tribe-events-admin-kb-card__image"
  107. src="<?php echo esc_url( tribe_resource_url( 'images/help/customizing.png', false, null, $main ) ); ?>"
  108. alt="<?php esc_attr_e( 'book with Event Tickets logo', 'tribe-common' ); ?>"
  109. />
  110. <h4 class="tribe-events-admin-kb-card__title">
  111. <?php esc_html_e( 'Creating Tickets & RSVPs', 'tribe-common' ); ?>
  112. </h4>
  113. <ul class="tribe-events-admin-kb-card__links">
  114. <li>
  115. <a href="https://evnt.is/1apq" target="_blank" rel="noopener noreferrer">
  116. <?php esc_html_e( 'Creating Tickets', 'tribe-common' ); ?>
  117. </a>
  118. </li>
  119. <li>
  120. <a href="https://evnt.is/1apr" target="_blank" rel="noopener noreferrer">
  121. <?php esc_html_e( 'Creating RSVPs', 'tribe-common' ); ?>
  122. </a>
  123. </li>
  124. <li>
  125. <a href="https://evnt.is/1aps" target="_blank" rel="noopener noreferrer">
  126. <?php esc_html_e( 'Configuring Paypal for Tickets', 'tribe-common' ); ?>
  127. </a>
  128. </li>
  129. <li>
  130. <a href="https://evnt.is/1apt" target="_blank" rel="noopener noreferrer">
  131. <?php esc_html_e( 'Shortcodes', 'tribe-common' ); ?>
  132. </a>
  133. <?php esc_html_e( '(Event Tickets Plus)', 'tribe-common' ); ?>
  134. </li>
  135. </ul>
  136. </div>
  137. <div class="tribe-events-admin-kb-card">
  138. <img
  139. class="tribe-events-admin-kb-card__image"
  140. src="<?php echo esc_url( tribe_resource_url( 'images/help/common-issues.png', false, null, $main ) ); ?>"
  141. alt="<?php esc_attr_e( 'book with The Events ticketing logo', 'tribe-common' ); ?>"
  142. />
  143. <h4 class="tribe-events-admin-kb-card__title">
  144. <?php esc_html_e( 'Plugin Maintenance', 'tribe-common' ); ?>
  145. </h4>
  146. <ul class="tribe-events-admin-kb-card__links">
  147. <li>
  148. <a href="https://evnt.is/1apu" target="_blank" rel="noopener noreferrer">
  149. <?php esc_html_e( 'Testing for Conflicts', 'tribe-common' ); ?>
  150. </a>
  151. </li>
  152. <li>
  153. <a href="https://evnt.is/1apv" target="_blank" rel="noopener noreferrer">
  154. <?php esc_html_e( 'Release notes', 'tribe-common' ); ?>
  155. </a>
  156. </li>
  157. <li>
  158. <a href="https://evnt.is/1apw" target="_blank" rel="noopener noreferrer">
  159. <?php esc_html_e( 'Integrations', 'tribe-common' ); ?>
  160. </a>
  161. </li>
  162. <li>
  163. <a href="https://evnt.is/1apx" target="_blank" rel="noopener noreferrer">
  164. <?php esc_html_e( 'Automatic Updates', 'tribe-common' ); ?>
  165. </a>
  166. </li>
  167. </ul>
  168. </div>
  169. </div>
  170. <?php // faq section ?>
  171. <div class="tribe-events-admin-section-header">
  172. <h3>
  173. <?php esc_html_e( 'FAQs', 'tribe-common' ); ?>
  174. </h3>
  175. <a href="https://evnt.is/1av3#faqs" target="_blank" rel="noopener noreferrer">
  176. <?php esc_html_e( 'All FAQs', 'tribe-common' ); ?>
  177. </a>
  178. </div>
  179. <div class="tribe-events-admin-faq tribe-events-admin-4col-grid">
  180. <?php foreach ( $faqs as $faq ) : ?>
  181. <div class="tribe-events-admin-faq-card">
  182. <div class="tribe-events-admin-faq-card__icon">
  183. <img
  184. src="<?php echo esc_url( tribe_resource_url( 'images/icons/faq.png', false, null, $main ) ); ?>"
  185. alt="<?php esc_attr_e( 'lightbulb icon', 'tribe-common' ); ?>"
  186. />
  187. </div>
  188. <div class="tribe-events-admin-faq-card__content">
  189. <div class="tribe-events-admin-faq__question">
  190. <a href="<?php echo esc_url( $faq['link'] ); ?>" target="_blank" rel="noopener noreferrer">
  191. <?php echo esc_html( $faq['question'] ); ?>
  192. </a>
  193. </div>
  194. <div class="tribe-events-admin-faq__answer">
  195. <?php echo esc_html( $faq['answer'] ); ?>
  196. </div>
  197. </div>
  198. </div>
  199. <?php endforeach; ?>
  200. </div>
  201. <?php // extensions section ?>
  202. <div class="tribe-events-admin-section-header">
  203. <h3>
  204. <?php esc_html_e( 'Free extensions', 'tribe-common' ); ?>
  205. </h3>
  206. <a href="https://evnt.is/1aqa" target="_blank" rel="noopener noreferrer">
  207. <?php esc_html_e( 'All Extensions', 'tribe-common' ); ?>
  208. </a>
  209. </div>
  210. <p class="tribe-events-admin-extensions-title">
  211. <?php esc_html_e( 'Small, lightweight WordPress plugins that add new capabilities to our core plugins. Support is not offered for extensions; however they provide enhanced functionality and bonus features.', 'tribe-common' ); ?>
  212. </p>
  213. <div class="tribe-events-admin-extensions tribe-events-admin-4col-grid">
  214. <?php foreach ( $extensions as $extension ) : ?>
  215. <div class="tribe-events-admin-extensions-card">
  216. <h4 class="tribe-events-admin-extensions-card__title">
  217. <a href="<?php echo esc_url( $extension['link'] ); ?>" target="_blank" rel="noopener noreferrer">
  218. <?php echo esc_html( $extension['title'] ); ?>
  219. </a>
  220. </h4>
  221. <div class="tribe-events-admin-extensions-card__description">
  222. <?php echo esc_html( $extension['description'] ); ?>
  223. </div>
  224. </div>
  225. <?php endforeach; ?>
  226. </div>
  227. </div>