nggallery_upgrade_page
Show the first step to update the database.
Description
nggallery_upgrade_page();
Usage
if ( !function_exists( 'nggallery_upgrade_page' ) ) { require_once ABSPATH . PLUGINDIR . 'nextcellent-gallery/admin/upgrade.php'; } // NOTICE! Understand what this does before running. $result = nggallery_upgrade_page();
Defined (1)
The function is defined in the following location(s).
- /admin/upgrade.php
- function nggallery_upgrade_page() {
- $filepath = admin_url() . 'admin.php?page=' . $_GET['page']; //default upgrade path
- if ( is_network_admin() ) { //unless if it is network administrator...
- $filepath = network_admin_url() . 'admin.php?page=' . $_GET['page'];
- }
- if ( isset($_GET['upgrade']) && $_GET['upgrade'] == 'now') {
- doing_update_output($filepath);
- return;
- }
- ?>
- <div class="wrap">
- <h2><?php _e( 'Upgrade NextCellent Gallery', 'nggallery' ); ?></h2>
- <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>
- <p class="description">
- <span style="margin-right:5px;" class="dashicons dashicons-info"></span>
- <?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' ); ?>
- </p>
- <br/>
- <a class="button button-primary"
- href="<?php echo $filepath; ?>&upgrade=now"><?php _e( 'Start upgrade now', 'nggallery' ); ?></a>
- </div>
- <?php