From 5ad79cd4e1db0504f600d1fc18be00a498922d16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Tr=C3=A4nklein?= Date: Thu, 24 Oct 2024 14:42:32 +0200 Subject: [PATCH] feat: wrap init function in function_exists call --- visual-regression-tests.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/visual-regression-tests.php b/visual-regression-tests.php index 42084b6..f6140c0 100644 --- a/visual-regression-tests.php +++ b/visual-regression-tests.php @@ -33,13 +33,15 @@ // Custom autoloader. require plugin_dir_path( VRTS_PLUGIN_FILE ) . 'includes/autoload.php'; -/** - * Main function responsible for accessing plugin functionalities. - * - * @return Plugin Class instance. - */ -function vrts() { - return Plugin::get_instance(); +if ( ! function_exists( 'vrts' ) ) { + /** + * Main function responsible for accessing plugin functionalities. + * + * @return Plugin Class instance. + */ + function vrts() { + return Plugin::get_instance(); + } } /**