ninja_forms_ajax_migrate_database

The Ninja Forms ninja forms ajax migrate database function.

Description

ninja_forms_ajax_migrate_database(); 

Usage

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

Defined (1)

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

/lib/NF_Upgrade.php  
  1. function ninja_forms_ajax_migrate_database() { 
  2. if( ! current_user_can( apply_filters( 'ninja_forms_admin_upgrade_migrate_database_capabilities', 'manage_options' ) ) ) return; 
  3. $migrations = new NF_Database_Migrations(); 
  4. $migrations->nuke( true, true ); 
  5. $migrations->migrate(); 
  6. echo json_encode( array( 'migrate' => 'true' ) ); 
  7. wp_die();