ninja_forms_three_admin_notice

The Ninja Forms ninja forms three admin notice function.

Description

ninja_forms_three_admin_notice(); 

Usage

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

Defined (1)

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

/deprecated/ninja-forms.php  
  1. function ninja_forms_three_admin_notice() { 
  2.  
  3. $settings = Ninja_Forms()->get_plugin_settings(); 
  4. if( isset( $settings[ 'disable_admin_notices' ] ) && $settings[ 'disable_admin_notices' ] ) return; 
  5.  
  6. $currentScreen = get_current_screen(); 
  7. if( ! in_array( $currentScreen->id, array( 'toplevel_page_ninja-forms' ) ) ) return; 
  8. wp_enqueue_style( 'nf-admin-notices', NINJA_FORMS_URL .'assets/css/admin-notices.css?nf_ver=' . NF_PLUGIN_VERSION ); 
  9.  
  10. if( ! isset( $_GET[ 'nf-rollback' ] ) ) { 
  11. ?> 
  12. <div id="nf-admin-notice-upgrade" class="update-nag nf-admin-notice"> 
  13. <div class="nf-notice-logo"></div> 
  14. <p class="nf-notice-title">Achievement Unlocked</p> 
  15. <p class="nf-notice-body"> 
  16. Cowabunga! You just unlocked Ninja Forms THREE. 
  17. </p> 
  18. <ul class="nf-notice-body nf-red"> 
  19. <li><span class="dashicons dashicons-awards"></span><a href="<?php echo admin_url( 'admin.php?page=ninja-forms-three' ); ?>">Upgrade to THREE</a></li> 
  20. </ul> 
  21. </div> 
  22. <?php 
  23. } else { 
  24. include plugin_dir_path( __FILE__ ) . 'upgrade/tmpl-notice.html.php'; 
  25. $three_link = nf_aff_link( 'https://ninjaforms.com/three/?utm_medium=plugin&utm_source=admin-notice&utm_campaign=Ninja+Forms+THREE&utm_content=Learn+More' ); 
  26. ?> 
  27. <div id="nf-admin-notice-three-is-coming" class="update-nag nf-admin-notice"> 
  28. <div class="nf-notice-logo"></div> 
  29. <p class="nf-notice-title">THREE is coming! </p> 
  30. <p class="nf-notice-body">A major update is coming to Ninja Forms. <a target="_blank" 
  31. href="<?php echo $three_link; ?>">Learn 
  32. more about new features, backwards compatibility, and more Frequently Asked Questions.</a></p> 
  33. </div> 
  34. <?php 
  35. } else { 
  36. ?> 
  37. <div id="nf-admin-notice-upgrade" class="update-nag nf-admin-notice"> 
  38. <div class="nf-notice-logo"></div> 
  39. <p class="nf-notice-title">Rollback Restored</p> 
  40. <p class="nf-notice-body"> 
  41. Your forms have been restored to the state prior to the upgrade. 
  42. </p> 
  43. <ul class="nf-notice-body nf-red"> 
  44. <li><span class="dashicons dashicons-sos"></span><a href="https://ninjaforms.com/contact/?utm_medium=plugin&utm_source=admin-notice&utm_campaign=Ninja+Forms+Rollback&utm_content=Ninja+Forms+Support" target="_blank">Contact Support</a></li> 
  45. </ul> 
  46. </div> 
  47. <?php