Initial commit: Open sourcing all of the Maple Open Technologies code.
This commit is contained in:
commit
755d54a99d
2010 changed files with 448675 additions and 0 deletions
|
|
@ -0,0 +1,41 @@
|
|||
<?php
|
||||
/**
|
||||
* Fired during plugin activation.
|
||||
*
|
||||
* @package MaplePress
|
||||
* @subpackage MaplePress/includes
|
||||
*/
|
||||
|
||||
class MaplePress_Activator {
|
||||
|
||||
/**
|
||||
* Activation tasks.
|
||||
*
|
||||
* Creates default options and flushes rewrite rules.
|
||||
*/
|
||||
public static function activate() {
|
||||
// Set default options.
|
||||
// Allow developers to override API URL via wp-config.php constant
|
||||
$default_api_url = defined( 'MAPLEPRESS_API_URL' ) ? MAPLEPRESS_API_URL : '';
|
||||
|
||||
$default_options = array(
|
||||
'api_url' => $default_api_url, // Empty by default - user must configure
|
||||
'api_key' => '',
|
||||
'site_id' => '',
|
||||
'tenant_id' => '',
|
||||
'domain' => '',
|
||||
'plan_tier' => '',
|
||||
'is_verified' => false,
|
||||
'enabled' => false,
|
||||
'needs_setup' => true, // Flag to show setup notice
|
||||
);
|
||||
|
||||
add_option( 'maplepress_settings', $default_options );
|
||||
|
||||
// Set activation redirect flag
|
||||
set_transient( 'maplepress_activation_redirect', true, 30 );
|
||||
|
||||
// Flush rewrite rules.
|
||||
flush_rewrite_rules();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue