-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvisual-regression-tests.php
56 lines (48 loc) · 1.56 KB
/
visual-regression-tests.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
/**
* Plugin Name: VRTs – Visual Regression Tests
* Plugin URI: https://vrts.app/
* Description: Find issues before others do – every time. With automatic screenshots, daily comparisons, and instant tests after WordPress and plugin updates.
* Version: 2.0.2
* Requires at least: 5.0
* Requires PHP: 7.0
* Author: Bleech
* Author URI: https://bleech.de
* Text Domain: visual-regression-tests
* License: GPLv2 or later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/
use Vrts\Core\Plugin;
defined( 'ABSPATH' ) || exit;
if ( ! defined( 'VRTS_PLUGIN_FILE' ) ) {
define( 'VRTS_PLUGIN_FILE', __FILE__ );
}
if ( ! defined( 'VRTS_SERVICE_ENDPOINT' ) ) {
define( 'VRTS_SERVICE_ENDPOINT', getenv( 'VRTS_SERVICE_ENDPOINT' ) ?: 'https://bleech-vrts-app.blee.ch/api/v1/' );
}
// Autoloader via Composer if exists.
if ( file_exists( plugin_dir_path( VRTS_PLUGIN_FILE ) . 'vendor/autoload.php' ) ) {
require plugin_dir_path( VRTS_PLUGIN_FILE ) . 'vendor/autoload.php';
}
// Custom autoloader.
require plugin_dir_path( VRTS_PLUGIN_FILE ) . 'includes/autoload.php';
if ( ! function_exists( 'vrts' ) ) {
/**
* Main function responsible for accessing plugin functionalities.
*
* @return Plugin Class instance.
*/
function vrts() {
return Plugin::get_instance();
}
}
/**
* Plugin Setup.
*
* Load and init theme features.
*/
vrts()->setup( 'vrts', [
'Vrts\\Features\\' => 'includes/features',
'Vrts\\Tables\\' => 'includes/tables',
'Vrts\\Rest_Api\\' => 'includes/rest-api',
]);