mirror of
https://gh.wpcy.net/https://github.com/YahnisElsts/plugin-update-checker.git
synced 2026-04-30 03:32:19 +08:00
See #300. Apparently, when using the `files` autoloading mechanism, Composer will only include the files for one version of the library (i.e. the first one loaded). Let's see if we can fix that by switching to a `psr-0` autoloader. This requires a bunch of changes to the standalone autoloader and the factory registration process.
9 lines
284 B
PHP
9 lines
284 B
PHP
<?php
|
|
if ( !class_exists('Parsedown', false) ) {
|
|
//Load the Parsedown version that's compatible with the current PHP version.
|
|
if ( version_compare(PHP_VERSION, '5.3.0', '>=') ) {
|
|
require __DIR__ . '/ParsedownModern.php';
|
|
} else {
|
|
require __DIR__ . '/ParsedownLegacy.php';
|
|
}
|
|
}
|