Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closes #939: Handle image stats through background processing #943

7 changes: 7 additions & 0 deletions classes/Admin/ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use Imagify\Dependencies\League\Container\ServiceProvider\AbstractServiceProvider;
use Imagify\Dependencies\WPMedia\PluginFamily\Controller\PluginFamily;
use Imagify\User\User;
use Imagify\Admin\Stats\{ Controller as AdminStatsController, Subscriber as AdminStatsSubscriber };

/**
* Service provider for Admin.
Expand All @@ -21,6 +22,7 @@ class ServiceProvider extends AbstractServiceProvider {
AdminSubscriber::class,
PluginFamily::class,
PluginFamilySubscriber::class,
AdminStatsController::class,
];

/**
Expand All @@ -32,6 +34,7 @@ class ServiceProvider extends AbstractServiceProvider {
AdminBar::class,
AdminSubscriber::class,
PluginFamilySubscriber::class,
AdminStatsSubscriber::class,
];

/**
Expand Down Expand Up @@ -59,6 +62,10 @@ public function register(): void {
$this->getContainer()->add( PluginFamily::class );
$this->getContainer()->addShared( PluginFamilySubscriber::class )
->addArgument( PluginFamily::class );

$this->getContainer()->add( AdminStatsController::class );
$this->getContainer()->addShared( AdminStatsSubscriber::class )
->addArgument( AdminStatsController::class );
}

/**
Expand Down
Loading
Loading