load_plugin(); } private function load_plugin(): void { if ( ! defined( 'ABPRF_PLUGIN_FILE' ) ) { define( 'ABPRF_PLUGIN_FILE', __FILE__ ); } if ( ! defined( 'ABPRF_VERSION' ) ) { define( 'ABPRF_VERSION', '1.1.0'); } if ( ! defined( 'ABPRF_DIR' ) ) { define( 'ABPRF_DIR', plugin_dir_path( __FILE__ ) ); } if ( ! defined( 'ABPRF_URL' ) ) { define( 'ABPRF_URL', plugin_dir_url( __FILE__ ) ); } if ( ! defined( 'ABPRF_BASE' ) ) { define( 'ABPRF_BASE', basename( __FILE__ ) ); } if ( ! defined( 'ABPRF_BLANK_IMG_URL' ) ) { define( 'ABPRF_BLANK_IMG_URL', ABPRF_URL . 'assets/images/blank_image.png' ); } require_once ABPRF_DIR . 'includes/abprf_dependencies.php'; if ( ! defined( 'ABPRF_WC' ) ) { define( 'ABPRF_WC', ABPRF_Function::check_wc() ); } if ( ! defined( 'ABPRF_Configuration' ) ) { define( 'ABPRF_Configuration', ABPRF_Function::get_option( 'abprf_configuration' ) ); } if ( ! defined( 'ABPRF_Dates' ) ) { define( 'ABPRF_Dates', ABPRF_Function::get_option( 'abprf_dates' ) ); } if ( ! defined( 'ABPRF_Category' ) ) { define( 'ABPRF_Category', ABPRF_Function::get_option( 'abprf_category' ) ); } if ( ! defined( 'ABPRF_Features' ) ) { define( 'ABPRF_Features', ABPRF_Function::get_option( 'abprf_feature' ) ); } if ( ! defined( 'ABPRF_Locations' ) ) { define( 'ABPRF_Locations', ABPRF_Function::get_option( 'abprf_location' ) ); } if ( ! defined( 'ABPRF_Brands' ) ) { define( 'ABPRF_Brands', ABPRF_Function::get_option( 'abprf_brand' ) ); } if ( ! defined( 'ABPRF_Min_Price' ) ) { define( 'ABPRF_Min_Price', ABPRF_Function::get_option( 'abprf_min_price' ) ); } if ( ! defined( 'ABPRF_On_Off' ) ) { define( 'ABPRF_On_Off', ABPRF_Function::get_option( 'abprf_on_off' ) ); } if ( ! defined( 'ABPRF_JS_Date_Format' ) ) { define( 'ABPRF_JS_Date_Format', ABPRF_Function::date_format_js() ); } if ( ! defined( 'ABPRF_Time_Format' ) ) { define( 'ABPRF_Time_Format', ABPRF_Dates['time_format'] ?? get_option( 'time_format' ) ); } } } new ABPRF_Rental_Forge(); register_activation_hook( __FILE__, function () { if ( class_exists( 'ABPRF_Dependencies' ) ) { ABPRF_Dependencies::activation(); } } ); register_deactivation_hook( __FILE__, function () { if ( class_exists( 'ABPRF_Dependencies' ) ) { ABPRF_Dependencies::deactivate(); } } ); }