De-prioritize vendor/autoload.php

This commit is contained in:
abuyoyo 2023-10-04 02:34:56 +03:00
parent 7cf7b477bc
commit 1321d35bdf

View File

@ -10,10 +10,24 @@
*/
defined( 'ABSPATH' ) || die( 'No soup for you!' );
use WPHelper\PluginCore;
if ( file_exists( __DIR__ . '/vendor/autoload.php' ) )
/**
* Dependencies
* Allow all other auto-loaders to fail before including our own.
*/
if (
! class_exists( 'WPHelper\PluginCore' )
||
! class_exists( 'WPHelper\AdminPage' )
||
! function_exists( 'wph_add_screen_meta_panel' )
)
{
if ( file_exists( __DIR__ . '/vendor/autoload.php' ) ){
require_once __DIR__ . '/vendor/autoload.php';
}
}
use WPHelper\PluginCore;
/**
* Bootstrap plugin and admin page (Tools > Notice Manager)