ninja_forms_register_general_settings_metabox

The Ninja Forms ninja forms register general settings metabox function.

Description

ninja_forms_register_general_settings_metabox(); 

Usage

  1. if ( !function_exists( 'ninja_forms_register_general_settings_metabox' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'ninja-forms/deprecated/includes/admin/pages/ninja-forms-settings/tabs/general-settings/general-settings.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = ninja_forms_register_general_settings_metabox(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/deprecated/includes/admin/pages/ninja-forms-settings/tabs/general-settings/general-settings.php  
  1. function ninja_forms_register_general_settings_metabox() { 
  2.  
  3. $plugin_settings = nf_get_settings(); 
  4. if ( isset ( $plugin_settings['version'] ) ) { 
  5. $current_version = $plugin_settings['version']; 
  6. } else { 
  7. $current_version = NF_PLUGIN_VERSION
  8.  
  9. $args = array( 
  10. 'page' => 'ninja-forms-settings',  
  11. 'tab' => 'general_settings',  
  12. 'slug' => 'general_settings',  
  13. 'title' => __( 'General Settings', 'ninja-forms' ),  
  14. 'settings' => array( 
  15. array( 
  16. 'name' => 'version',  
  17. 'type' => 'desc',  
  18. 'label' => __( 'Version', 'ninja-forms' ),  
  19. 'desc' => $current_version,  
  20. ),  
  21. array( 
  22. 'name' => 'date_format',  
  23. 'type' => 'text',  
  24. 'label' => __( 'Date Format', 'ninja-forms' ),  
  25. 'desc' => 'e.g. m/d/Y, d/m/Y - ' . sprintf( __( 'Tries to follow the %sPHP date() function%s specifications, but not every format is supported.', 'ninja-forms' ), '<a href="http://www.php.net/manual/en/function.date.php" target="_blank">', '</a>' ),  
  26. ),  
  27. array( 
  28. 'name' => 'currency_symbol',  
  29. 'type' => 'text',  
  30. 'label' => __( 'Currency Symbol', 'ninja-forms' ),  
  31. 'desc' => 'e.g. $, £, €',  
  32. ),  
  33. ),  
  34. ); 
  35.  
  36. $args = array( 
  37. 'page' => 'ninja-forms-settings',  
  38. 'tab' => 'general_settings',  
  39. 'slug' => 'recaptcha_settings',  
  40. 'title' => __( 'reCAPTCHA Settings', 'ninja-forms' ),  
  41. 'settings' => array( 
  42. array( 
  43. 'name' => 'recaptcha_site_key',  
  44. 'type' => 'text',  
  45. 'label' => __( 'reCAPTCHA Site Key', 'ninja-forms' ),  
  46. 'desc' => sprintf( __( 'Get a site key for your domain by registering %shere%s', 'ninja-forms' ), '<a href="https://www.google.com/recaptcha/intro/index.html" target="_blank">', '</a>' ) 
  47. ),  
  48. array( 
  49. 'name' => 'recaptcha_secret_key',  
  50. 'type' => 'text',  
  51. 'label' => __( 'reCAPTCHA Secret Key', 'ninja-forms' ),  
  52. 'desc' => '',  
  53. ),  
  54. array( 
  55. 'name' => 'recaptcha_lang',  
  56. 'type' => 'text',  
  57. 'label' => __( 'reCAPTCHA Language', 'ninja-forms' ),  
  58. 'desc' => 'e.g. en, da - ' . sprintf( __( 'Language used by reCAPTCHA. To get the code for your language click %shere%s', 'ninja-forms' ), '<a href="https://developers.google.com/recaptcha/docs/language" target="_blank">', '</a>' ) 
  59. ),  
  60. ),  
  61. 'state' => 'closed',  
  62. ); 
  63. $args['settings'] = apply_filters( 'nf_general_settings_recaptcha', $args['settings'] ); 
  64.  
  65.  
  66. $args = array( 
  67. 'page' => 'ninja-forms-settings',  
  68. 'tab' => 'general_settings',  
  69. 'slug' => 'advanced_settings',  
  70. 'title' => __( 'Advanced Settings', 'ninja-forms' ),  
  71. 'settings' => array( 
  72. array( 
  73. 'name' => 'delete_on_uninstall',  
  74. 'type' => 'checkbox',  
  75. 'label' => __( 'Remove ALL Ninja Forms data upon uninstall?', 'ninja-forms' ),  
  76. 'desc' => sprintf( __( 'If this box is checked, ALL Ninja Forms data will be removed from the database upon deletion. %sAll form and submission data will be unrecoverable.%s', 'ninja-forms' ), '<span class="nf-nuke-warning">', '</span>' ),  
  77. ),  
  78. array( 
  79. 'name' => 'delete_prompt',  
  80. 'type' => '',  
  81. 'display_function' => 'nf_delete_on_uninstall_prompt',  
  82. ),  
  83. array( 
  84. 'name' => 'disable_admin_notices',  
  85. 'type' => 'checkbox',  
  86. 'label' => __( 'Disable Admin Notices', 'ninja-forms' ),  
  87. 'desc' => __( 'Never see an admin notice on the dashboard from Ninja Forms. Uncheck to see them again.', 'ninja-forms' ),  
  88. ),  
  89. ),  
  90. 'state' => 'closed',  
  91. ); 
  92. $args['settings'] = apply_filters( 'nf_general_settings_advanced', $args['settings'] ); 
  93.  
  94.