PluginSettingsAdvanced.php 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. <?php if ( ! defined( 'ABSPATH' ) ) exit;
  2. return apply_filters( 'ninja_forms_plugin_settings_advanced', array(
  3. /*
  4. |--------------------------------------------------------------------------
  5. | Delete on Uninstall
  6. |--------------------------------------------------------------------------
  7. */
  8. 'delete_on_uninstall' => array(
  9. 'id' => 'delete_on_uninstall',
  10. 'type' => 'html',
  11. 'html' => '<button type="button" id="delete_on_uninstall" href="" class="button">' .
  12. __( 'Delete All Data', 'ninja-forms' ) . '</button>',
  13. 'label' => __( 'Remove ALL Ninja Forms data upon uninstall?', 'ninja-forms' ),
  14. 'desc' => sprintf( __( 'If this button is checked, ALL Ninja Forms data will be removed from the database and the Ninja Forms plug-in will be deactivated. %sAll form and submission data will be unrecoverable.%s', 'ninja-forms' ), '<span class="nf-nuke-warning">', '</span>' ),
  15. ),
  16. /*
  17. |--------------------------------------------------------------------------
  18. | Delete Prompt for Delete on Uninstall
  19. |--------------------------------------------------------------------------
  20. */
  21. 'delete_prompt' => array(
  22. 'id' => 'delete_prompt',
  23. 'type' => 'prompt',
  24. 'desc' => __( 'This setting will COMPLETELY remove anything Ninja Forms related upon plugin deletion. This includes SUBMISSIONS and FORMS. It cannot be undone.', 'ninja-forms' ),
  25. ),
  26. /*
  27. |--------------------------------------------------------------------------
  28. | Disable Admin Notices
  29. |--------------------------------------------------------------------------
  30. */
  31. 'disable_admin_notices' => array(
  32. 'id' => 'disable_admin_notices',
  33. 'type' => 'checkbox',
  34. 'label' => __( 'Disable Admin Notices', 'ninja-forms' ),
  35. 'desc' => __( 'Never see an admin notice on the dashboard from Ninja Forms. Uncheck to see them again.', 'ninja-forms' ),
  36. ),
  37. /*
  38. |--------------------------------------------------------------------------
  39. | Tracking Opt-in
  40. |--------------------------------------------------------------------------
  41. */
  42. 'allow_tracking' => array(
  43. 'id' => 'allow_tracking',
  44. 'type' => 'html',
  45. 'html' => '<span id="nfTelOptin" class="button hidden">' . __( 'Opt-in', 'ninja-forms' ) . '</span><span id="nfTelOptout" class="button hidden">' . __( 'Opt-out', 'ninja-forms' ) . '</span><span id="nfTelSpinner" class="nf-loading-spinner" style="display:none;"></span>',
  46. 'label' => __( 'Allow Telemetry', 'ninja-forms' ),
  47. 'desc' => __( 'Opt-in to allow Ninja Forms to collect anonymous usage statistics from your site, such as PHP version, installed plugins, and other non-personally idetifiable informations.', 'ninja-forms' ),
  48. ),
  49. // 'allow_tracking' => array(
  50. // 'id' => 'allow_tracking',
  51. // 'type' => 'checkbox',
  52. // 'label' => __( 'Allow Tracking', 'ninja-forms' ),
  53. // 'desc' => __( 'If you opt-in, some data about your installation of Ninja Forms will be sent to NinjaForms.com (this does NOT include your submissions).', 'ninja-forms' )
  54. // ),
  55. /*
  56. |--------------------------------------------------------------------------
  57. | Opinionated Styles
  58. |--------------------------------------------------------------------------
  59. */
  60. 'opinionated_styles' => array(
  61. 'id' => 'opinionated_styles',
  62. 'type' => 'select',
  63. 'label' => __( 'Opinionated Styles', 'ninja-forms' ),
  64. 'options' => array(
  65. array(
  66. 'label' => __( 'None', 'ninja-forms' ),
  67. 'value' => '',
  68. ),
  69. array(
  70. 'label' => __( 'Light', 'ninja-forms' ),
  71. 'value' => 'light',
  72. ),
  73. array(
  74. 'label' => __( 'Dark', 'ninja-forms' ),
  75. 'value' => 'dark',
  76. ),
  77. ),
  78. 'desc' => __( 'Use default Ninja Forms styling conventions.', 'ninja-forms' ),
  79. 'value' => ''
  80. ),
  81. /*
  82. |--------------------------------------------------------------------------
  83. | Rollback to v2.9.x
  84. |--------------------------------------------------------------------------
  85. */
  86. 'downgrade' => array(
  87. 'id' => 'downgrade',
  88. 'type' => 'html',
  89. 'html' => '<div id="nfDowngrade" class="button">' . __( 'Downgrade', 'ninja-forms' ) . '</div>',
  90. 'label' => __( 'Downgrade to v2.9.x', 'ninja-forms' ),
  91. 'desc' => __( 'Downgrade to the most recent 2.9.x release.', 'ninja-forms' ) . '<br /><div style="color: red">' . __( 'IMPORTANT: All 3.0 data will be removed.', 'ninja-forms' ) . '<br />' . __( 'Please export any forms or submissions you do not want to be lost during this process.', 'ninja-forms' ) . '</div>',
  92. ),
  93. 'trash_expired_submissions' => array(
  94. 'id' => 'trash_expired_submissions',
  95. 'type' => 'html',
  96. 'html' => '<div id="nfTrashExpiredSubmissions" class="button">' . __( 'Move To Trash', 'ninja-forms' ) . '</div>',
  97. 'label' => __( 'Trash Expired Submissions', 'ninja-forms' ),
  98. 'desc' => __( 'This setting maybe helpful if your WordPress installation is not moving expired submissions to the trash properly.', 'ninja-forms' ),
  99. ),
  100. ));