Edit File by line
/home/zeestwma/richards.../wp-conte.../plugins/elemento.../modules/atomic-w.../utils
File: memo.php
<?php
[0] Fix | Delete
[1] Fix | Delete
namespace Elementor\Modules\AtomicWidgets\Utils;
[2] Fix | Delete
[3] Fix | Delete
if ( ! defined( 'ABSPATH' ) ) {
[4] Fix | Delete
exit; // Exit if accessed directly.
[5] Fix | Delete
}
[6] Fix | Delete
[7] Fix | Delete
class Memo {
[8] Fix | Delete
private array $cache = [];
[9] Fix | Delete
[10] Fix | Delete
public function memoize( string $key, callable $callback ) {
[11] Fix | Delete
return function() use ( $key, $callback ) {
[12] Fix | Delete
if ( array_key_exists( $key, $this->cache ) ) {
[13] Fix | Delete
return $this->cache[ $key ];
[14] Fix | Delete
}
[15] Fix | Delete
[16] Fix | Delete
$this->cache[ $key ] = call_user_func( $callback );
[17] Fix | Delete
return $this->cache[ $key ];
[18] Fix | Delete
};
[19] Fix | Delete
}
[20] Fix | Delete
}
[21] Fix | Delete
[22] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function