Edit File by line
/home/zeestwma/richards.../wp-conte.../plugins/elemento.../modules/dev-tool...
File: module.php
<?php
[0] Fix | Delete
namespace Elementor\Modules\DevTools;
[1] Fix | Delete
[2] Fix | Delete
use Elementor\Core\Base\App;
[3] Fix | Delete
[4] Fix | Delete
if ( ! defined( 'ABSPATH' ) ) {
[5] Fix | Delete
exit; // Exit if accessed directly.
[6] Fix | Delete
}
[7] Fix | Delete
[8] Fix | Delete
/**
[9] Fix | Delete
* Fix issue with 'Potentially polymorphic call. The code may be inoperable depending on the actual class instance passed as the argument.'.
[10] Fix | Delete
* Its tells to the editor that instance() return right module. instead of base module.
[11] Fix | Delete
*
[12] Fix | Delete
* @method Module instance()
[13] Fix | Delete
*/
[14] Fix | Delete
class Module extends App {
[15] Fix | Delete
/**
[16] Fix | Delete
* @var Deprecation
[17] Fix | Delete
*/
[18] Fix | Delete
public $deprecation;
[19] Fix | Delete
[20] Fix | Delete
public function __construct() {
[21] Fix | Delete
$this->deprecation = new Deprecation( ELEMENTOR_VERSION );
[22] Fix | Delete
[23] Fix | Delete
add_action( 'elementor/editor/before_enqueue_scripts', [ $this, 'register_scripts' ] );
[24] Fix | Delete
add_action( 'admin_enqueue_scripts', [ $this, 'register_scripts' ] );
[25] Fix | Delete
add_action( 'wp_enqueue_scripts', [ $this, 'register_scripts' ] );
[26] Fix | Delete
add_action( 'elementor/frontend/after_register_scripts', [ $this, 'register_scripts' ] );
[27] Fix | Delete
add_action( 'elementor/common/after_register_scripts', [ $this, 'register_scripts' ] );
[28] Fix | Delete
}
[29] Fix | Delete
[30] Fix | Delete
public function get_name() {
[31] Fix | Delete
return 'dev-tools';
[32] Fix | Delete
}
[33] Fix | Delete
[34] Fix | Delete
public function register_scripts() {
[35] Fix | Delete
wp_register_script(
[36] Fix | Delete
'elementor-dev-tools',
[37] Fix | Delete
$this->get_js_assets_url( 'dev-tools' ),
[38] Fix | Delete
[],
[39] Fix | Delete
ELEMENTOR_VERSION,
[40] Fix | Delete
true
[41] Fix | Delete
);
[42] Fix | Delete
[43] Fix | Delete
$this->print_config( 'elementor-dev-tools' );
[44] Fix | Delete
}
[45] Fix | Delete
[46] Fix | Delete
protected function get_init_settings() {
[47] Fix | Delete
return [
[48] Fix | Delete
'isDebug' => ( defined( 'WP_DEBUG' ) && WP_DEBUG ),
[49] Fix | Delete
'urls' => [
[50] Fix | Delete
'assets' => ELEMENTOR_ASSETS_URL,
[51] Fix | Delete
],
[52] Fix | Delete
'deprecation' => $this->deprecation->get_settings(),
[53] Fix | Delete
];
[54] Fix | Delete
}
[55] Fix | Delete
}
[56] Fix | Delete
[57] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function