Skip to content

Commit

Permalink
updated LinkPrefetchController with more fix
Browse files Browse the repository at this point in the history
  • Loading branch information
geckod22 committed Nov 18, 2024
1 parent 24dff12 commit ecbdb47
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions includes/RestApi/LinkPrefetchController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace NewfoldLabs\WP\Module\Performance\RestApi;

use NewfoldLabs\WP\Module\ECommerce\Permissions;
use NewfoldLabs\WP\ModuleLoader\Container;
use NewfoldLabs\WP\Module\Performance\LinkPrefetch;

/**
* Class LinkPrefetchController
Expand All @@ -25,22 +25,6 @@ class LinkPrefetchController {
*/
protected $rest_base = '/link-prefetch';

/**
* Container loaded from the brand plugin.
*
* @var Container
*/
protected $container;

/**
* Constructor
*
* @param Container $container the container.
*/
public function __construct( Container $container ) {
$this->container = $container;
}

/**
* Registers rest routes for PluginsController class.
*
Expand Down Expand Up @@ -79,7 +63,7 @@ public function register_routes() {
public function get_settings() {
return new \WP_REST_Response(
array(
'settings' => get_option( 'nfd_linkPrefetch', $this->container->get( 'linkPrefetch' )->getDefaultSettings() ),
'settings' => get_option( 'nfd_linkPrefetch', LinkPrefetch::getDefaultSettings() ),
),
200
);
Expand Down

0 comments on commit ecbdb47

Please sign in to comment.