File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3434/**
3535 * Manual loaded file: the autoloader.
3636 */
37- if (file_exists (__DIR__ . '/vendor/autoload.php ' )) {
38- require_once __DIR__ . '/vendor/autoload.php ' ;
39- } else {
40- require_once __DIR__ . '/autoloader.php ' ;
41- $ autoloader = new Autoloader ();
37+ if (!class_exists (\OWC \PDC \FAQ \Foundation \Plugin::class)) {
38+ if (file_exists (__DIR__ . '/vendor/autoload.php ' )) {
39+ require_once __DIR__ . '/vendor/autoload.php ' ;
40+ } else {
41+ require_once __DIR__ . '/autoloader.php ' ;
42+ $ autoloader = new Autoloader ();
43+ }
4244}
4345
4446/**
5254 if (! class_exists ('OWC\PDC\Base\Foundation\Plugin ' )) {
5355 add_action ('admin_notices ' , function () {
5456 $ list = '<p> ' . __ (
55- 'The following plugins are required to use the PDC FAQ: ' ,
56- 'pdc-faq '
57- ) . '</p><ol><li>OpenPDC Base (version >= 3.0.0)</li></ol> ' ;
57+ 'The following plugins are required to use the PDC FAQ: ' ,
58+ 'pdc-faq '
59+ ) . '</p><ol><li>OpenPDC Base (version >= 3.0.0)</li></ol> ' ;
5860
5961 printf ('<div class="notice notice-error"><p>%s</p></div> ' , $ list );
6062 });
6466 return ;
6567 }
6668
67- add_action ('after_setup_theme ' , function () {
68- (new Plugin (__DIR__ ))->boot ();
69- });
69+ add_action ('after_setup_theme ' , function () {
70+ (new Plugin (__DIR__ ))->boot ();
71+ });
7072}, 10 );
7173
7274
You can’t perform that action at this time.
0 commit comments