validate() ) { return false; } do_action( 'adfuz/vendor/autoload:before' ); require_once ADFUZ_PLUGIN_DIR . '/vendor/autoload.php'; do_action( 'adfuz/vendor/autoload:after' ); if ( ! function_exists( 'AdFuz' ) ) { /** * The below class will trigger the __construct to load the hooks. * * @return mixed */ function AdFuz() { $adfuz = (object) array( 'core' => array( 'hook' => array( 'action' => \AdFuz\Hooks\Action\Action::get_instance(), 'filter' => \AdFuz\Hooks\Filter\Filter::get_instance(), ), 'database' => array( 'install' => \AdFuz\Database\Install::get_instance(), ), 'debug' => array( 'type' => 'test', // test, live. ), ), 'frontend' => array( 'shortcode' => \AdFuz\Hooks\Action\Shortcode::get_instance(), ), 'request' => new \AdFuz\Requests\Request(), ); return apply_filters( 'adfuz/core', $adfuz ); } } add_action( 'plugins_loaded', function () { global $AdFuz; do_action( 'adfuz/function/core:before' ); $AdFuz = AdFuz(); do_action( 'adfuz/function/core:after' ); }, 10 ); if ( defined( 'ADFUZ_PLUGIN' ) ) { register_deactivation_hook( ADFUZ_PLUGIN, function () { /** * Audit Log. */ $adfuz_prune_audit_logs_timestamp = wp_next_scheduled( 'adfuz_prune_audit_logs' ); if ( $adfuz_prune_audit_logs_timestamp ) { wp_unschedule_event( $adfuz_prune_audit_logs_timestamp, 'adfuz_prune_audit_logs' ); } /** * Campaign Expired. * * @version 1.0.9 */ $adfuz_check_expired_campaigns_timestamp = wp_next_scheduled( 'adfuz_check_expired_campaigns' ); if ( $adfuz_check_expired_campaigns_timestamp ) { wp_unschedule_event( $adfuz_check_expired_campaigns_timestamp, 'adfuz_check_expired_campaigns' ); } // Clean up notification data. delete_option( 'adfuz_expired_campaigns_notification' ); /** * Delete Sample Home page if any. * * @version: 1.0.18 */ \AdFuz\Database\HomePageSeeder::cleanup_adfuz_demo(); } ); /** * Activation Hook * * @version 1.0.19 */ register_activation_hook( ADFUZ_PLUGIN, function () { \AdFuz\Controllers\PlayGroundController::maybeRunInstall(); } ); }