| 1 |
<?php |
| 2 |
/** |
| 3 |
* Install |
| 4 |
* |
| 5 |
* @package AutomatorWP\Install |
| 6 |
* @author AutomatorWP <contact@automatorwp.com>, Ruben Garcia <rubengcdev@gmail.com> |
| 7 |
* @since 1.0.0 |
| 8 |
*/ |
| 9 |
// Exit if accessed directly |
| 10 |
if( !defined( 'ABSPATH' ) ) exit; |
| 11 |
|
| 12 |
/** |
| 13 |
* AutomatorWP installation |
| 14 |
* |
| 15 |
* @since 1.0.0 |
| 16 |
*/ |
| 17 |
function automatorwp_install() { |
| 18 |
|
| 19 |
// Setup default AutomatorWP installation date |
| 20 |
$automatorwp_install_date = ( $exists = get_option( 'automatorwp_install_date' ) ) ? $exists : ''; |
| 21 |
|
| 22 |
if ( empty( $automatorwp_install_date ) ) { |
| 23 |
update_option( 'automatorwp_install_date', date( 'Y-m-d H:i:s' ) ); |
| 24 |
} |
| 25 |
|
| 26 |
// Register AutomatorWP custom DB tables |
| 27 |
automatorwp_register_custom_tables(); |
| 28 |
|
| 29 |
// Schedule events |
| 30 |
automatorwp_schedule_events(); |
| 31 |
|
| 32 |
} |
| 33 |
|