diff --git a/README.md b/README.md index 3afd066..0fa3e28 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ class View { } public function display_page() { - $plugin_family = $this->plugin_family->get_filtered_plugins( 'imagify-plugin/imagify' ); + $plugin_family = $this->plugin_family->get_filtered_plugins( 'imagify/imagify' ); $data = [ 'plugin_family' => $plugin_family['uncategorized'], diff --git a/src/Controller/PluginFamily.php b/src/Controller/PluginFamily.php index 26aad5b..eb08d67 100644 --- a/src/Controller/PluginFamily.php +++ b/src/Controller/PluginFamily.php @@ -35,7 +35,7 @@ public static function get_post_install_event(): array { $allowed_plugin = [ 'uk-cookie-consent', 'backwpup', - 'imagify-plugin', + 'imagify', 'seo-by-rank-math', 'wp-rocket', ]; diff --git a/src/Model/PluginFamily.php b/src/Model/PluginFamily.php index b3e616d..ef75280 100644 --- a/src/Model/PluginFamily.php +++ b/src/Model/PluginFamily.php @@ -13,7 +13,7 @@ class PluginFamily { * @var array */ protected $wp_rocket_referrer = [ - 'imagify-plugin' => 'imagify', + 'imagify' => 'imagify', 'seo-by-rank-math' => '', 'backwpup' => '', 'uk-cookie-consent' => '', @@ -92,7 +92,7 @@ public function filter_plugins_by_activation( array $plugins, string $main_plugi 'plugin_to_install' => rawurlencode( $plugin ), ]; - if ( 'imagify-plugin' === $plugin_slug ) { + if ( 'imagify' === $plugin_slug ) { $args = [ 'action' => 'install_imagify_from_partner_' . $main_plugin_slug, '_wpnonce' => wp_create_nonce( 'install_imagify_from_partner' ), diff --git a/src/Model/wp_media_plugins.php b/src/Model/wp_media_plugins.php index 0432334..e1a1e29 100644 --- a/src/Model/wp_media_plugins.php +++ b/src/Model/wp_media_plugins.php @@ -7,7 +7,7 @@ 'optimize_performance' => [ 'title' => 'Optimize Performance', 'plugins' => [ - 'wp-rocket/wp-rocket' => [ + 'wp-rocket/wp-rocket' => [ 'logo' => [ 'file' => 'logo-wp-rocket.svg', 'width' => '50%', @@ -16,7 +16,7 @@ 'desc' => 'WP Rocket is the easiest way to make your WordPress website faster and boost your Google PageSpeed score. Get more traffic, better engagement, and higher conversions effortlessly.', 'link' => '', ], - 'imagify-plugin/imagify' => [ + 'imagify/imagify' => [ 'logo' => [ 'file' => 'logo-imagify.svg', 'width' => '50%', diff --git a/tests/Fixtures/src/Model/PluginFamily/filterPluginsByActivation.php b/tests/Fixtures/src/Model/PluginFamily/filterPluginsByActivation.php index f37df58..14ca685 100644 --- a/tests/Fixtures/src/Model/PluginFamily/filterPluginsByActivation.php +++ b/tests/Fixtures/src/Model/PluginFamily/filterPluginsByActivation.php @@ -13,7 +13,7 @@ 'desc' => 'WP Rocket is the easiest way to make your WordPress website faster and boost your Google PageSpeed score. Get more traffic, better engagement, and higher conversions effortlessly.', 'link' => 'https://wp-rocket.me/?utm_source=imagify-coupon&utm_medium=plugin&utm_campaign=imagify', ], - 'imagify-plugin/imagify' => [ + 'imagify/imagify' => [ 'logo' => [ 'file' => 'logo-imagify.svg', 'width' => '50%', @@ -116,7 +116,7 @@ 'optimize_performance' => [ 'title' => 'Optimize Performance', 'plugins' => [ - 'imagify-plugin/imagify' => [ + 'imagify/imagify' => [ 'logo' => [ 'file' => 'logo-imagify.svg', 'width' => '50%', @@ -202,7 +202,7 @@ 'url' => 'http://example.org/wp-admin/admin-post.php?action=plugin_family_install_wp-rocket&_wpnonce=9a68f00b8d&plugin_to_install=wp-rocket%2Fwp-rocket' ], ], - 'imagify-plugin/imagify' => [ + 'imagify/imagify' => [ 'logo' => [ 'file' => 'logo-imagify.svg', 'width' => '50%', @@ -257,7 +257,7 @@ 'url' => 'https://wp-rocket.me/?utm_source=-coupon&utm_medium=plugin&utm_campaign=' ], ], - 'imagify-plugin/imagify' => [ + 'imagify/imagify' => [ 'logo' => [ 'file' => 'logo-imagify.svg', 'width' => '50%', @@ -312,14 +312,14 @@ 'plugins' => $plugins, 'main_plugin' => 'wp-rocket/wp-rocket', 'order' => 'categorized', - 'active_plugin' => 'imagify-plugin/imagify.php', + 'active_plugin' => 'imagify/imagify.php', ], 'expected' => $expectedActivePluginAsTheLastElement, ], 'testShouldReturnCategoryWithActivePluginAsTheLastElement' => [ 'config' => [ 'plugins' => $plugins, - 'main_plugin' => 'imagify-plugin/imagify', + 'main_plugin' => 'imagify/imagify', 'order' => 'uncategorized', 'active_plugin' => 'seo-by-rank-math/rank-math.php', ],