nf_show_upgrade_notices

DEPRECATED - Display Upgrade Notices.

Description

nf_show_upgrade_notices(); 

Usage

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

Defined (1)

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

/deprecated/includes/admin/upgrades/upgrade-functions.php  
  1. function nf_show_upgrade_notices() { 
  2.  
  3. // Convert notifications 
  4. if ( isset ( $_GET['page'] ) && $_GET['page'] == 'nf-processing' ) 
  5. return; // Don't show notices on the processing page. 
  6.  
  7. $n_conversion_complete = get_option( 'nf_convert_notifications_complete', false ); 
  8.  
  9. if ( ! $n_conversion_complete ) { 
  10. printf( 
  11. '<div class="update-nag"><p>' . __( 'Ninja Forms needs to upgrade your form notifications, click %shere%s to start the upgrade.', 'ninja-forms' ) . '</p></div>',  
  12. '<a href="' . admin_url( 'index.php?page=nf-processing&action=convert_notifications' ) . '">', '</a>' 
  13. ); 
  14.  
  15. $update_email_settings_complete = get_option( 'nf_update_email_settings_complete', false ); 
  16.  
  17. if ( $n_conversion_complete && ! $update_email_settings_complete ) { 
  18. printf( 
  19. '<div class="update-nag"><p>' . __( 'Ninja Forms needs to update your email settings, click %shere%s to start the upgrade.', 'ninja-forms' ) . '</p></div>',  
  20. '<a href="' . admin_url( 'index.php?page=nf-processing&action=update_email_settings' ) . '">', '</a>' 
  21. ); 
  22.  
  23. if ( isset( $_GET['page'] ) && $_GET['page'] == 'nf-upgrades' ) 
  24. return; // Don't show notices on the upgrades page 
  25.  
  26. $step = get_option( 'nf_convert_subs_step' ); 
  27.  
  28. if ( $step != 'complete' ) { 
  29. if ( empty( $step ) ) { 
  30. $step = 1; 
  31. printf( 
  32. '<div class="update-nag"><p>' . __( 'Ninja Forms needs to upgrade the submissions table, click %shere%s to start the upgrade.', 'ninja-forms' ) . '</p></div>',  
  33. '<a href="' . admin_url( 'index.php?page=nf-upgrades&nf-upgrade=upgrade_subs_to_cpt&step=' . $step ) . '">', '</a>' 
  34. ); 
  35.  
  36. $upgrade_notice = get_option( 'nf_upgrade_notice' ); 
  37.  
  38. if ( $upgrade_notice != 'closed' ) { 
  39. printf( 
  40. '<div class="update-nag"><p>' . __( 'Thank you for updating to version 2.7 of Ninja Forms. Please update any Ninja Forms extensions from ', 'ninja-forms' ) . '<a href="http://ninjaforms.com/your-account/purchases/"</a>ninjaforms.com</a>. <a href="%s">Dismiss this notice</a></p></div>',  
  41. esc_url( add_query_arg( array( 'nf_action' => 'dismiss_upgrade_notice' ) ) ) 
  42. ); 
  43.  
  44. if ( defined( 'NINJA_FORMS_UPLOADS_VERSION' ) && version_compare( NINJA_FORMS_UPLOADS_VERSION, '1.3.5' ) == -1 ) { 
  45. echo '<div class="error"><p>' . __( 'Your version of the Ninja Forms File Upload extension isn\'t compatible with version 2.7 of Ninja Forms. It needs to be at least version 1.3.5. Please update this extension at ', 'ninja-forms' ) . '<a href="http://ninjaforms.com/your-account/purchases/"</a>ninjaforms.com</a></p></div>'; 
  46.  
  47. if ( defined( 'NINJA_FORMS_SAVE_PROGRESS_VERSION' ) && version_compare( NINJA_FORMS_SAVE_PROGRESS_VERSION, '1.1.3' ) == -1 ) { 
  48. echo '<div class="error"><p>' . __( 'Your version of the Ninja Forms Save Progress extension isn\'t compatible with version 2.7 of Ninja Forms. It needs to be at least version 1.1.3. Please update this extension at ', 'ninja-forms' ) . '<a href="http://ninjaforms.com/your-account/purchases/"</a>ninjaforms.com</a></p></div>'; 
  49.  
  50. $forms_conversion_complete = get_option( 'nf_convert_forms_complete', false ); 
  51.  
  52. if ( ! $forms_conversion_complete ) { 
  53. $title = urlencode( __( 'Updating Form Database', 'ninja-forms' ) ); 
  54. printf( 
  55. '<div class="update-nag">' . __( 'Ninja Forms needs to upgrade your form settings, click %shere%s to start the upgrade.', 'ninja-forms' ) . '</div>',  
  56. '<a href="' . admin_url( 'index.php?page=nf-processing&action=convert_forms&title=' . $title ) . '">', '</a>' 
  57. ); 
  58.