PluginProbe
Elementor Website Builder – more than just a page builder / 3.25.2
Elementor Website Builder – more than just a page builder v3.25.2
4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 4.1.0-beta1 4.1.0-dev1 4.0.7 All 451 releases
← All changes | core/files/manager.php +3 -19 4.1.23.25.2 View file →
@@ -36,14 +36,14 @@
36 36 public function __construct() {
37 37 $this->register_actions();
38 38 }
39 39
40 - public function get( $class_name, $args ) {
41 - $id = $class_name . '-' . wp_json_encode( $args );
40 + public function get( $class, $args ) {
41 + $id = $class . '-' . wp_json_encode( $args );
42 42
43 43 if ( ! isset( $this->files[ $id ] ) ) {
44 44 // Create an instance from dynamic args length.
45 - $reflection_class = new \ReflectionClass( $class_name );
45 + $reflection_class = new \ReflectionClass( $class );
46 46 $this->files[ $id ] = $reflection_class->newInstanceArgs( $args );
47 47 }
48 48
49 49 return $this->files[ $id ];
@@ -192,10 +192,8 @@
192 192
193 193 add_action( 'update_option_siteurl', function () {
194 194 $this->reset_assets_data();
195 195 } );
196 -
197 - add_action( 'rest_api_init', [ $this, 'register_endpoints' ] );
198 196 }
199 197
200 198 /**
201 199 * Reset Assets Data.
@@ -260,20 +258,6 @@
260 258 *
261 259 * @since 3.25.0
262 260 */
263 261 do_action( 'elementor/core/files/after_generate_css' );
264 - }
265 -
266 - public function register_endpoints() {
267 - register_rest_route(
268 - 'elementor/v1',
269 - '/cache',
270 - [
271 - 'methods' => \WP_REST_Server::DELETABLE,
272 - 'callback' => [ $this, 'clear_cache' ],
273 - 'permission_callback' => function() {
274 - return current_user_can( 'manage_options' );
275 - },
276 - ]
277 - );
278 262 }
279 263 }