PluginProbe
Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF / trunk
Imagify Image Optimization: Optimize Images | Compress & Convert to WebP/AVIF vtrunk
2.3.4 2.3.3 2.3.2 2.3.1 2.3.0 2.2.9 2.2.8 trunk 1.10 1.3.3 1.3.4 1.3.5 1.3.5.1 1.3.5.2 1.3.6 1.3.6.1 1.4 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.5 All 103 releases
← All changes | classes/Abilities/GetAccount.php +0 -16 2.3.0 → trunk View file →
@@ -2,10 +2,8 @@
2 2 declare(strict_types=1);
3 3
4 4 namespace Imagify\Abilities;
5 5
6 -use Imagify\User\User;
7 -
8 6 /**
9 7 * MCP ability: returns the current Imagify account status and quota data.
10 8 *
11 9 * Registers itself with the WP Abilities API under the slug
@@ -88,22 +86,8 @@
88 86 * @return bool True when the current user has the Imagify `manage` capability.
89 87 */
90 88 protected function has_permission(): bool {
91 89 return imagify_get_context( 'wp' )->current_user_can( 'manage' );
92 - }
93 -
94 - /**
95 - * Fetch the initialized User instance.
96 - *
97 - * Extracted into a protected method so that unit tests can override
98 - * this call without needing to bootstrap the full Imagify API layer.
99 - *
100 - * @return User
101 - */
102 - protected function fetch_user(): User {
103 - $user = new User();
104 - $user->init_user();
105 - return $user;
106 90 }
107 91
108 92 /**
109 93 * Execute the ability: return the current Imagify account status.