init(); add_filter( 'rest_pre_dispatch', array( new AFASM_JWT_Plugin(), 'validate_token_rest_pre_dispatch' ), 10, 3 ); } /** * Add actions */ add_action( 'rest_api_init', 'afasm_rest_init' ); /** * Register hooks. */ register_activation_hook( AFASM_PLUGIN_FILE, array( new AFASM_Database_Installer(), 'install' ) ); ( new AFASM_Admin_Options() )->init(); add_action( 'plugins_loaded', array( new AFASM_Language(), 'all_forms_load_textdomain' ) ); add_filter( 'plugin_locale', array( new AFASM_Language(), 'enforce_locale' ), 10, 2 ); ( new AFASM_Notification_Hooks_Plugin() )->loads_hooks();