NewFormTemplates.php 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. <?php if ( ! defined( 'ABSPATH' ) ) exit;
  2. /**
  3. 'slug_name' => array(
  4. //Same as slug name/
  5. 'id' => 'slug_name',
  6. 'title' => 'nicename',
  7. 'template-desc' => '',
  8. ),
  9. */
  10. $templates = array(
  11. /**
  12. * Regular old form templates
  13. */
  14. 'formtemplate-contactform' => array(
  15. 'id' => 'formtemplate-contactform',
  16. 'title' => __( 'Contact Us', 'ninja-forms' ),
  17. 'template-desc' => __( 'Allow your users to contact you with this simple contact form. You can add and remove fields as needed.', 'ninja-forms' ),
  18. ),
  19. 'formtemplate-quoterequest' => array(
  20. 'id' => 'formtemplate-quoterequest',
  21. 'title' => __( 'Quote Request', 'ninja-forms' ),
  22. 'template-desc' => __( 'Manage quote requests from your website easily with this template. You can add and remove fields as needed.', 'ninja-forms' ),
  23. ),
  24. 'formtemplate-eventregistration' => array(
  25. 'id' => 'formtemplate-eventregistration',
  26. 'title' => __( 'Event Registration', 'ninja-forms' ),
  27. 'template-desc' => __( 'Allow user to register for your next event this easy to complete form. You can add and remove fields as needed.', 'ninja-forms' ),
  28. ),
  29. 'formtemplate-enquiry' => array(
  30. 'id' => 'formtemplate-enquiry',
  31. 'title' => __( 'General Enquiry', 'ninja-forms' ),
  32. 'template-desc' => __( 'Collect user enquiries with this simple, generic form. You can add and remove fields as needed.', 'ninja-forms' ),
  33. ),
  34. 'formtemplate-feedback' => array(
  35. 'id' => 'formtemplate-feedback',
  36. 'title' => __( 'Collect feedback', 'ninja-forms' ),
  37. 'template-desc' => __( 'Collect feedback for an event, blog post, or anything else. You can add and remove fields as needed.', 'ninja-forms' ),
  38. ),
  39. 'formtemplate-questionnaire' => array(
  40. 'id' => 'formtemplate-questionnaire',
  41. 'title' => __( 'Questionnaire', 'ninja-forms' ),
  42. 'template-desc' => __( 'Collect information about your users. You can add and remove fields as needed.', 'ninja-forms' ),
  43. ),
  44. 'formtemplate-jobapplication' => array(
  45. 'id' => 'formtemplate-jobapplication',
  46. 'title' => __( 'Job Application', 'ninja-forms' ),
  47. 'template-desc' => __( 'Allow users to apply for a job. You can add and remove fields as needed.', 'ninja-forms' ),
  48. ),
  49. 'formtemplate-deletedata' => array(
  50. 'id' => 'formtemplate-deletedata',
  51. 'title' => __( 'Delete Data Request', 'ninja-forms' ),
  52. 'template-desc' => __( 'Includes action to add users to WordPress\' personal data delete tool, allowing admins to comply with the GDPR and other privacy regulations from the site\'s front end.', 'ninja-forms' ),
  53. ),
  54. 'formtemplate-exportdata' => array(
  55. 'id' => 'formtemplate-exportdata',
  56. 'title' => __( 'Export Data Request', 'ninja-forms' ),
  57. 'template-desc' => __( 'Includes action to add users to WordPress\' personal data export tool, allowing admins to comply with the GDPR and other privacy regulations from the site\'s front end.', 'ninja-forms' ),
  58. ),
  59. );
  60. $ads = array(
  61. /**
  62. * Ads
  63. */
  64. 'mailchimp-signup' => array(
  65. 'id' => 'mailchimp-signup',
  66. 'title' => __( 'MailChimp Signup', 'ninja-forms' ),
  67. 'template-desc' => __( 'Add a user to a list in MailChimp. You can add and remove fields as needed.', 'ninja-forms' ),
  68. 'type' => 'ad',
  69. 'modal-title' => 'Get MailChimp for Ninja Forms',
  70. 'modal-content' => '<div class="modal-template">
  71. <img src="' . Ninja_Forms::$url . 'assets/img/add-ons/mailchimp-for-ninja-forms.png"/>
  72. <p>In order to use this template, you need MailChimp for Ninja Forms.</p>
  73. <p>The MailChimp extension allows you to quickly create newsletter signup forms for your MailChimp account using the power and flexibility that Ninja Forms provides.</p>
  74. <div class="actions">
  75. <a target="_blank" href="https://ninjaforms.com/extensions/mail-chimp/?utm_medium=plugin&amp;utm_source=dashboard&amp;utm_campaign=New+Form+Templates&utm_content=MailChimp" title="MailChimp" class="primary nf-button">Learn More</a>
  76. </div>
  77. </div>',
  78. ),
  79. 'stripe-payment' => array(
  80. 'id' => 'stripe-payment',
  81. 'title' => __( 'Stripe Payment', 'ninja-forms' ),
  82. 'template-desc' => __( 'Collect a payment using Stripe. You can add and remove fields as needed.', 'ninja-forms' ),
  83. 'type' => 'ad',
  84. 'modal-title' => 'Get Stripe for Ninja Forms',
  85. 'modal-content' => '<div class="modal-template">
  86. <div class="video-wrapper"><iframe src="https://www.youtube.com/embed/WdFmgAffA50" allowfullscreen="" name="fitvid0" frameborder="0"></iframe></div>
  87. <p>In order to use this template, you need Stripe for Ninja Forms.</p>
  88. <div class="actions">
  89. <a target="_blank" href="https://ninjaforms.com/extensions/stripe/?utm_medium=plugin&utm_source=dashboard&utm_campaign=New+Form+Templates&utm_content=Stripe" title="Stripe" class="primary nf-button">Learn More</a>
  90. </div>
  91. </div>',
  92. ),
  93. 'file-upload' => array(
  94. 'id' => 'file-upload',
  95. 'title' => __( 'File Upload', 'ninja-forms' ),
  96. 'template-desc' => __( 'Allow users to upload files with their forms. You can add and remove fields as needed.', 'ninja-forms' ),
  97. 'type' => 'ad',
  98. 'modal-title' => 'Get File Uploads for Ninja Forms',
  99. 'modal-content' => '<div class="modal-template">
  100. <div class="video-wrapper"><iframe src="https://www.youtube.com/embed/Tl91cuFsnvM" allowfullscreen="" name="fitvid0" frameborder="0"></iframe></div>
  101. <p>In order to use this template, you need File Uploads for Ninja Forms.</p>
  102. <div class="actions">
  103. <a target="_blank" href="https://ninjaforms.com/extensions/stripe/?utm_medium=plugin&utm_source=dashboard&utm_campaign=New+Form+Templates&utm_content=File+Uploads" title="File Uploads" class="primary nf-button">Learn More</a>
  104. </div>
  105. </div>',
  106. ),
  107. 'paypal-payment' => array(
  108. 'id' => 'paypal-payment',
  109. 'title' => __( 'PayPal Payment', 'ninja-forms' ),
  110. 'template-desc' => __( 'Collect a payment using PayPal Express. You can add and remove fields as needed.', 'ninja-forms' ),
  111. 'type' => 'ad',
  112. 'modal-title' => 'Get PayPal Express for Ninja Forms',
  113. 'modal-content' => '<div class="modal-template">
  114. <img src="' . Ninja_Forms::$url . 'assets/img/add-ons/paypal-express.png"/>
  115. <p>In order to use this template, you need PayPal Express for Ninja Forms.</p>
  116. <p>PayPal Express allows you to accept payments using Ninja Forms. It leverages the powerful processing engine that runs each Ninja Form to get a total, perform a checkout, and send your users to PayPal to complete their transaction.</p>
  117. <div class="actions">
  118. <a target="_blank" href="https://ninjaforms.com/extensions/paypal-express/?utm_medium=plugin&utm_source=dashboard&utm_campaign=New+Form+Templates&utm_content=PayPal+Express" title="PayPal Express" class="primary nf-button">Learn More</a>
  119. </div>
  120. </div>',
  121. ),
  122. 'create-post' => array(
  123. 'id' => 'create-post',
  124. 'title' => __( 'Create a Post', 'ninja-forms' ),
  125. 'template-desc' => __( 'Allow users to create posts from the front-end using a form, including custom post meta!', 'ninja-forms' ),
  126. 'type' => 'ad',
  127. 'modal-title' => 'Get Front-End Posting for Ninja Forms',
  128. 'modal-content' => '<div class="modal-template">
  129. <img src="' . Ninja_Forms::$url . 'assets/img/add-ons/front-end-posting.png"/>
  130. <p>In order to use this template, you need Front-End Posting for Ninja Forms.</p>
  131. <p>Create posts, pages, or any custom post type from the front-end.</p>
  132. <p>The Ninja Forms Front-End Posting extension gives you the power of the WordPress post editor on any publicly viewable page you choose.</p>
  133. <div class="actions">
  134. <a target="_blank" href="https://ninjaforms.com/extensions/front-end-posting/?utm_medium=plugin&utm_source=dashboard&utm_campaign=New+Form+Templates&utm_content=Frontend+Posting" title="Create Post" class="primary nf-button">Learn More</a>
  135. </div>
  136. </div>',
  137. ),
  138. 'register-user' => array(
  139. 'id' => 'register-user',
  140. 'title' => __( 'Register a User', 'ninja-forms' ),
  141. 'template-desc' => __( 'Register a WordPress User', 'ninja-forms' ),
  142. 'type' => 'ad',
  143. 'modal-title' => 'Get User Management for Ninja Forms',
  144. 'modal-content' => '<div class="modal-template">
  145. <img src="' . Ninja_Forms::$url . 'assets/img/add-ons/user-management.png"/>
  146. <p>In order to use this template, you need User Management for Ninja Forms.</p>
  147. <p>User Management brings you the remarkable flexibility to register new WordPress users and manage existing ones through your Ninja Forms!</p>
  148. <div class="actions">
  149. <a target="_blank" href="https://ninjaforms.com/extensions/user-management/?utm_medium=plugin&utm_source=dashboard&utm_campaign=New+Form+Templates&utm_content=User+Management" title="User Management" class="primary nf-button">Learn More</a>
  150. </div>
  151. </div>',
  152. ),
  153. 'update-profile' => array(
  154. 'id' => 'update-profile',
  155. 'title' => __( 'Edit User Profile', 'ninja-forms' ),
  156. 'template-desc' => __( 'Allow WordPress users to edit their profiles from the front-end, including custom user meta!', 'ninja-forms' ),
  157. 'type' => 'ad',
  158. 'modal-title' => 'Get User Management for Ninja Forms',
  159. 'modal-content' => '<div class="modal-template">
  160. <img src="' . Ninja_Forms::$url . 'assets/img/add-ons/user-management.png"/>
  161. <p>In order to use this template, you need User Management for Ninja Forms.</p>
  162. <p>User Management brings you the remarkable flexibility to register new WordPress users and manage existing ones through your Ninja Forms!</p>
  163. <div class="actions">
  164. <a target="_blank" href="https://ninjaforms.com/extensions/user-management/?utm_medium=plugin&utm_source=dashboard&utm_campaign=New+Form+Templates&utm_content=User+Management" title="User Management" class="primary nf-button">Learn More</a>
  165. </div>
  166. </div>',
  167. ),
  168. );
  169. /**
  170. * If we've disabled marketing using our filter, don't merge in our ads.
  171. */
  172. $disable_marketing = false;
  173. if ( ! apply_filters( 'ninja_forms_disable_marketing', $disable_marketing ) ) {
  174. $templates = array_merge( $templates, $ads );
  175. }
  176. return apply_filters( 'ninja_forms_new_form_templates', $templates );