gde_activate

Activate the plugin.

Description

gde_activate( $network_wide ); 

Parameters (1)

0. $network_wide
The network wide.

Usage

  1. if ( !function_exists( 'gde_activate' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'google-doc-embedder/gviewer.php'; 
  3.  
  4. // The network wide. 
  5. $network_wide = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = gde_activate($network_wide); 
  9.  

Defined (1)

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

/gviewer.php  
  1. function gde_activate( $network_wide ) { 
  2. // check for sufficient php version (minimum supports json_encode) 
  3. if ( ! ( phpversion() >= '5.2.0' ) ) { 
  4. wp_die( 'Your server is running PHP version ' . phpversion() . ' but this plugin requires at least 5.2.0' ); 
  5.  
  6. // set db schema version for this release - global not available here 
  7. $gde_db_ver = "1.2"; 
  8.  
  9. // check for network-wide activation (currently not supported) 
  10. if ( $network_wide ) { 
  11. wp_die("Network activation is not supported at this time. Please activate individually until an update is available."); 
  12.  
  13. require_once( plugin_dir_path( __FILE__ ) . 'libs/lib-setup.php' ); 
  14.  
  15. // create/update profile db, if necessary 
  16. if ( gde_db_tables( $gde_db_ver ) ) { 
  17. gde_setup(); 
  18. } else { 
  19. gde_dx_log("Table creation failed; setup halted"); 
  20. wp_die( __("Setup wasn't able to create the required database tables.", 'google-document-embedder') );