nggallery_upgrade_page

Show the first step to update the database.

Description

nggallery_upgrade_page(); 

Usage

  1. if ( !function_exists( 'nggallery_upgrade_page' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'nextcellent-gallery/admin/upgrade.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = nggallery_upgrade_page(); 
  7.  

Defined (1)

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

/admin/upgrade.php  
  1. function nggallery_upgrade_page() { 
  2.  
  3. $filepath = admin_url() . 'admin.php?page=' . $_GET['page']; //default upgrade path 
  4. if ( is_network_admin() ) { //unless if it is network administrator... 
  5. $filepath = network_admin_url() . 'admin.php?page=' . $_GET['page']; 
  6.  
  7. if ( isset($_GET['upgrade']) && $_GET['upgrade'] == 'now') { 
  8. doing_update_output($filepath); 
  9. return; 
  10. ?> 
  11. <div class="wrap"> 
  12. <h2><?php _e( 'Upgrade NextCellent Gallery', 'nggallery' ); ?></h2> 
  13.  
  14. <p><?php _e( 'You\'re upgrading from an older version. To enable the newest features, we sometimes need to do a database upgrade.', 'nggallery' ); ?></p> 
  15.  
  16. <p class="description"> 
  17. <span style="margin-right:5px;" class="dashicons dashicons-info"></span> 
  18. <?php _e( 'Normally you should be able to downgrade without any problems, but if you really want to play safe, you should make a backup of your database.', 'nggallery' ); ?> 
  19. </p> 
  20. <br/> 
  21. <a class="button button-primary" 
  22. href="<?php echo $filepath; ?>&upgrade=now"><?php _e( 'Start upgrade now', 'nggallery' ); ?></a> 
  23. </div> 
  24. <?php