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( 'init', static function () { load_plugin_textdomain( 'ad-fuz', false, dirname( plugin_basename( ADFUZ_PLUGIN ) ) . '/languages' ); } ); 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_activation_hook( ADFUZ_PLUGIN, [ \AdFuz\Controllers\Core\Lifecycle::class, 'activate' ] ); register_deactivation_hook( ADFUZ_PLUGIN, [ \AdFuz\Controllers\Core\Lifecycle::class, 'deactivate' ] ); }