'Version' ) )['Version'] ); define( 'ADVANCED_TESTIMONIAL_FILE', __FILE__ ); define( 'ADVANCED_TESTIMONIAL_DIR', plugin_dir_path( __FILE__ ) ); define( 'ADVANCED_TESTIMONIAL_URL', plugin_dir_url( __FILE__ ) ); define( 'ADVANCED_TESTIMONIAL_BASENAME', plugin_basename( __FILE__ ) ); /* * Remote Demo Library manifest URL (GitHub Pages). Treated as a frozen public * API — released sites cache and depend on it. Filterable for dev/staging via * the `advanced_testimonial_demo_library_url` filter. */ if ( ! defined( 'ADVANCED_TESTIMONIAL_DEMO_LIBRARY_URL' ) ) { define( 'ADVANCED_TESTIMONIAL_DEMO_LIBRARY_URL', 'https://devmonowar.github.io/wp-plugin-demo-library/advanced-testimonial/demo-library.json' ); } /* * Autoloader: prefer the Composer-generated PSR-4 autoloader when present, * otherwise fall back to the bundled lightweight PSR-4 loader so the plugin * works even without running `composer install`. */ if ( is_readable( ADVANCED_TESTIMONIAL_DIR . 'vendor/autoload.php' ) ) { require ADVANCED_TESTIMONIAL_DIR . 'vendor/autoload.php'; } else { require ADVANCED_TESTIMONIAL_DIR . 'includes/Loader.php'; Loader::register(); } register_activation_hook( __FILE__, array( Activator::class, 'activate' ) ); register_deactivation_hook( __FILE__, array( Deactivator::class, 'deactivate' ) ); add_action( 'plugins_loaded', static function () { Plugin::instance()->run(); } );