File manager - Edit - /home/verseaumee/blueversion/wp-content/plugins/hcaptcha-for-forms-and-more/src/php/Divi/Fix.php
Back
<?php /** * Fix class file. * * @package hcaptcha-wp */ namespace HCaptcha\Divi; /** * Class Fix. */ class Fix { /** * Init. */ public function init() { $this->init_hooks(); } /** * Init hooks. */ public function init_hooks() { add_action( 'init', [ $this, 'register_autoload' ], - PHP_INT_MAX ); } /** * Register autoload. * * @return void */ public function register_autoload() { if ( ! defined( 'ET_BUILDER_THEME' ) ) { return; } spl_autoload_register( [ $this, 'prevent_loading_of_wp_test_case' ], true, true ); } /** * Prevent loading of WPTestCase class. * Loading of the WPTestCase causes a fatal error if any plugin has Codeception tests in the vendor. * * @param string $classname Class name. * * @return true|null */ public function prevent_loading_of_wp_test_case( string $classname ) { if ( 'Codeception\TestCase\WPTestCase' === $classname ) { require 'WPTestCaseStub.php'; return true; } return null; } }
| ver. 1.4 |
Github
|
.
| PHP 8.5.7 | Generation time: 0 |
proxy
|
phpinfo
|
Settings