doing_update_output

Actually update the database, with a UI.

Description

doing_update_output( $filepath ); 

Parameters (1)

0. $filepath
String The URL to the overview page.

Usage

  1. if ( !function_exists( 'doing_update_output' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'nextcellent-gallery/admin/upgrade.php'; 
  3.  
  4. // string The URL to the overview page. 
  5. $filepath = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = doing_update_output($filepath); 
  9.  

Defined (1)

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

/admin/upgrade.php  
  1. function doing_update_output( $filepath ) { 
  2. ?> 
  3. <div class="wrap"> 
  4. <h2><?php _e( 'Upgrade NextCellent Gallery', 'nggallery' ); ?></h2> 
  5.  
  6. <p><?php 
  7. try { 
  8. echo __( 'Upgrading database*', 'nggallery' ); 
  9. echo '<span class="dashicons dashicons-yes"></span><br />'; 
  10. } catch ( ErrorException $e ) { 
  11. echo __( "Oh no! Something went wrong while updating the database", 'nggallery' ) . ": " . $e; 
  12. ?></p> 
  13.  
  14. <p class="finished"><?php _e( 'Upgrade complete.', 'nggallery' ); ?></p> 
  15. <br/><a class="finished button button-primary" 
  16. href="<?php echo $filepath; ?>"><?php _e( 'Continue to NextCellent', 'nggallery' ); ?></a> 
  17. </div> 
  18. <?php