gde_activate
Activate the plugin.
Description
gde_activate( $network_wide );
Parameters (1)
- 0. $network_wide
- The network wide.
Usage
if ( !function_exists( 'gde_activate' ) ) { require_once '/gviewer.php'; } // The network wide. $network_wide = null; // NOTICE! Understand what this does before running. $result = gde_activate($network_wide);
Defined (1)
The function is defined in the following location(s).
- /gviewer.php
- function gde_activate( $network_wide ) {
- // check for sufficient php version (minimum supports json_encode)
- if ( ! ( phpversion() >= '5.2.0' ) ) {
- wp_die( 'Your server is running PHP version ' . phpversion() . ' but this plugin requires at least 5.2.0' );
- }
- // set db schema version for this release - global not available here
- $gde_db_ver = "1.2";
- // check for network-wide activation (currently not supported)
- if ( $network_wide ) {
- wp_die("Network activation is not supported at this time. Please activate individually until an update is available.");
- }
- require_once( plugin_dir_path( __FILE__ ) . 'libs/lib-setup.php' );
- // create/update profile db, if necessary
- if ( gde_db_tables( $gde_db_ver ) ) {
- gde_setup();
- } else {
- gde_dx_log("Table creation failed; setup halted");
- wp_die( __("Setup wasn't able to create the required database tables.", 'google-document-embedder') );
- }
- }