| 1 |
<?php |
| 2 |
|
| 3 |
defined('ABSPATH') || define('ABSPATH', __DIR__ . '/wordpress/'); |
| 4 |
defined('MINUTE_IN_SECONDS') || define('MINUTE_IN_SECONDS', 60); |
| 5 |
defined('HOUR_IN_SECONDS') || define('HOUR_IN_SECONDS', 3600); |
| 6 |
defined('DAY_IN_SECONDS') || define('DAY_IN_SECONDS', 86400); |
| 7 |
|
| 8 |
if (!function_exists('wp_get_image_mime')) { |
| 9 |
function wp_get_image_mime($file) |
| 10 |
{ |
| 11 |
return $GLOBALS['sync_basalam_test_image_mime'] ?? false; |
| 12 |
} |
| 13 |
} |
| 14 |
|
| 15 |
if (!function_exists('wp_check_filetype')) { |
| 16 |
function wp_check_filetype($file) |
| 17 |
{ |
| 18 |
return [ |
| 19 |
'ext' => pathinfo($file, PATHINFO_EXTENSION), |
| 20 |
'type' => $GLOBALS['sync_basalam_test_filetype_mime'] ?? null, |
| 21 |
]; |
| 22 |
} |
| 23 |
} |
| 24 |
|
| 25 |
require_once __DIR__ . '/Support/JobsRunnerWordPressStubs.php'; |
| 26 |
|
| 27 |
require_once dirname(__DIR__) . '/includes/Services/MediaMimeType.php'; |
| 28 |
require_once dirname(__DIR__) . '/includes/Services/MediaUploadService.php'; |
| 29 |
require_once dirname(__DIR__) . '/includes/Services/VendorSyncPolicy.php'; |
| 30 |
require_once dirname(__DIR__) . '/includes/Services/ForceUpdateGate.php'; |
| 31 |
require_once dirname(__DIR__) . '/JobsRunner.php'; |
| 32 |
|