From 39b5c1319547faf0a9bcf893c4025483022f6610 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Perona?= Date: Wed, 1 Nov 2023 10:00:23 -0400 Subject: [PATCH 01/12] move admin bar profile to new AdminBar class --- classes/Admin/AdminBar.php | 98 +++++++++++++++++++ classes/Plugin.php | 2 + inc/classes/class-imagify-admin-ajax-post.php | 79 --------------- 3 files changed, 100 insertions(+), 79 deletions(-) create mode 100644 classes/Admin/AdminBar.php diff --git a/classes/Admin/AdminBar.php b/classes/Admin/AdminBar.php new file mode 100644 index 000000000..638db1b58 --- /dev/null +++ b/classes/Admin/AdminBar.php @@ -0,0 +1,98 @@ +current_user_can( 'manage' ) ) { + imagify_die(); + } + + $user = new User(); + $views = Imagify_Views::get_instance(); + $unconsumed_quota = $views->get_quota_percent(); + $message = ''; + + if ( $unconsumed_quota <= 20 ) { + $message = '
'; + $message .= '

' . __( 'Oops, It\'s almost over!', 'imagify' ) . '

'; + /* translators: %s is a line break. */ + $message .= '

' . sprintf( __( 'You have almost used all your credit.%sDon\'t forget to upgrade your subscription to continue optimizing your images.', 'imagify' ), '

' ) . '

'; + $message .= '

' . __( 'View My Subscription', 'imagify' ) . '

'; + $message .= '
'; + } + + if ( 0 === $unconsumed_quota ) { + $message = '
'; + $message .= '

' . __( 'Oops, It\'s Over!', 'imagify' ) . '

'; + $message .= '

' . sprintf( + /* translators: 1 is a data quota, 2 is a date. */ + __( 'You have consumed all your credit for this month. You will have %1$s back on %2$s.', 'imagify' ), + imagify_size_format( $user->quota * pow( 1024, 2 ) ), + date_i18n( get_option( 'date_format' ), strtotime( $user->next_date_update ) ) + ) . '

'; + $message .= '

' . __( 'Upgrade My Subscription', 'imagify' ) . '

'; + $message .= '
'; + } + + // Custom HTML. + $quota_section = '
'; + $quota_section .= '
'; + + if ( 1 === $user->plan_id ) { + $quota_section .= '
' . $views->get_quota_icon() . '
'; + } + + $quota_section .= ''; // .imagify-account + $quota_section .= '
'; // .imagify-abq-row + + if ( 1 === $user->plan_id ) { + $quota_section .= '
'; + $quota_section .= '
'; + /* translators: %s is a data quota. */ + $quota_section .= '

' . sprintf( __( 'You have %s space credit left', 'imagify' ), '' . $unconsumed_quota . '%' ) . '

'; + $quota_section .= '
'; + $quota_section .= '
'; + $quota_section .= '
'; // .imagify-bar-{negative|neutral|positive} + $quota_section .= '
'; // .imagify-space-left + $quota_section .= '
'; // .imagify-abq-row + } + + $quota_section .= '

'; + $quota_section .= ''; // .imagify-account-link + $quota_section .= '

'; // .imagify-abq-row + $quota_section .= '
'; // .imagify-admin-bar-quota + $quota_section .= $message; + + wp_send_json_success( $quota_section ); + } +} diff --git a/classes/Plugin.php b/classes/Plugin.php index 7e9348c7d..eaa0f1b55 100644 --- a/classes/Plugin.php +++ b/classes/Plugin.php @@ -7,6 +7,7 @@ use Imagify\CLI\BulkOptimizeCommand; use Imagify\CLI\GenerateMissingWebpCommand; use Imagify\Notices\Notices; +use Imagify\Admin\AdminBar; /** * Main plugin class. @@ -56,6 +57,7 @@ class_alias( '\\Imagify\\Traits\\InstanceGetterTrait', '\\Imagify\\Traits\\FakeS \Imagify\Job\MediaOptimization::get_instance()->init(); \Imagify\Stats\OptimizedMediaWithoutWebp::get_instance()->init(); Bulk::get_instance()->init(); + AdminBar::get_instance()->init(); if ( is_admin() ) { Notices::get_instance()->init(); diff --git a/inc/classes/class-imagify-admin-ajax-post.php b/inc/classes/class-imagify-admin-ajax-post.php index dfb552fa0..4d5439735 100755 --- a/inc/classes/class-imagify-admin-ajax-post.php +++ b/inc/classes/class-imagify-admin-ajax-post.php @@ -1,7 +1,6 @@ current_user_can( 'manage' ) ) { - imagify_die(); - } - - $user = new User(); - $views = Imagify_Views::get_instance(); - $unconsumed_quota = $views->get_quota_percent(); - $message = ''; - - if ( $unconsumed_quota <= 20 ) { - $message = '
'; - $message .= '

' . __( 'Oops, It\'s almost over!', 'imagify' ) . '

'; - /* translators: %s is a line break. */ - $message .= '

' . sprintf( __( 'You have almost used all your credit.%sDon\'t forget to upgrade your subscription to continue optimizing your images.', 'imagify' ), '

' ) . '

'; - $message .= '

' . __( 'View My Subscription', 'imagify' ) . '

'; - $message .= '
'; - } - - if ( 0 === $unconsumed_quota ) { - $message = '
'; - $message .= '

' . __( 'Oops, It\'s Over!', 'imagify' ) . '

'; - $message .= '

' . sprintf( - /* translators: 1 is a data quota, 2 is a date. */ - __( 'You have consumed all your credit for this month. You will have %1$s back on %2$s.', 'imagify' ), - imagify_size_format( $user->quota * pow( 1024, 2 ) ), - date_i18n( get_option( 'date_format' ), strtotime( $user->next_date_update ) ) - ) . '

'; - $message .= '

' . __( 'Upgrade My Subscription', 'imagify' ) . '

'; - $message .= '
'; - } - - // Custom HTML. - $quota_section = '
'; - $quota_section .= '
'; - - if ( 1 === $user->plan_id ) { - $quota_section .= '
' . $views->get_quota_icon() . '
'; - } - - $quota_section .= ''; // .imagify-account - $quota_section .= '
'; // .imagify-abq-row - - if ( 1 === $user->plan_id ) { - $quota_section .= '
'; - $quota_section .= '
'; - /* translators: %s is a data quota. */ - $quota_section .= '

' . sprintf( __( 'You have %s space credit left', 'imagify' ), '' . $unconsumed_quota . '%' ) . '

'; - $quota_section .= '
'; - $quota_section .= '
'; - $quota_section .= '
'; // .imagify-bar-{negative|neutral|positive} - $quota_section .= '
'; // .imagify-space-left - $quota_section .= '
'; // .imagify-abq-row - } - - $quota_section .= '

'; - $quota_section .= ''; // .imagify-account-link - $quota_section .= '

'; // .imagify-abq-row - $quota_section .= '
'; // .imagify-admin-bar-quota - $quota_section .= $message; - - wp_send_json_success( $quota_section ); - } - /** * Get pricings from API for Onetime and Plans at the same time. * From 01f13a77dab688b0a53c6e3d4d34d694b48cee47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Perona?= Date: Thu, 2 Nov 2023 10:44:27 -0400 Subject: [PATCH 02/12] add check for other plans --- classes/User/User.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/classes/User/User.php b/classes/User/User.php index 9e6813490..a1ac347ad 100755 --- a/classes/User/User.php +++ b/classes/User/User.php @@ -244,6 +244,24 @@ public function is_free() { return 1 === $this->plan_id; } + /** + * Check if the user is a growth account + * + * @return bool + */ + public function is_growth() { + return ( 16 === $this->plan_id || 18 === $this->plan_id ); + } + + /** + * Check if the user is an infinite account + * + * @return bool + */ + public function is_infinite() { + return ( 15 === $this->plan_id || 17 === $this->plan_id ); + } + /** * Check if the user has consumed all his/her quota. * From f98bc98e8056c43f9fa611c5fb143ec2e5bbb0a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Perona?= Date: Thu, 2 Nov 2023 10:44:38 -0400 Subject: [PATCH 03/12] move HTML to view --- classes/Admin/AdminBar.php | 69 ++++++-------------------------- views/admin/admin-bar-status.php | 45 +++++++++++++++++++++ 2 files changed, 57 insertions(+), 57 deletions(-) create mode 100644 views/admin/admin-bar-status.php diff --git a/classes/Admin/AdminBar.php b/classes/Admin/AdminBar.php index 638db1b58..23b856095 100644 --- a/classes/Admin/AdminBar.php +++ b/classes/Admin/AdminBar.php @@ -4,6 +4,7 @@ use Imagify\Traits\InstanceGetterTrait; use Imagify\User\User; +use Imagify_Views; class AdminBar { use InstanceGetterTrait; @@ -34,65 +35,19 @@ public function get_admin_bar_profile_callback() { $user = new User(); $views = Imagify_Views::get_instance(); $unconsumed_quota = $views->get_quota_percent(); - $message = ''; - if ( $unconsumed_quota <= 20 ) { - $message = '
'; - $message .= '

' . __( 'Oops, It\'s almost over!', 'imagify' ) . '

'; - /* translators: %s is a line break. */ - $message .= '

' . sprintf( __( 'You have almost used all your credit.%sDon\'t forget to upgrade your subscription to continue optimizing your images.', 'imagify' ), '

' ) . '

'; - $message .= '

' . __( 'View My Subscription', 'imagify' ) . '

'; - $message .= '
'; - } - - if ( 0 === $unconsumed_quota ) { - $message = '
'; - $message .= '

' . __( 'Oops, It\'s Over!', 'imagify' ) . '

'; - $message .= '

' . sprintf( - /* translators: 1 is a data quota, 2 is a date. */ - __( 'You have consumed all your credit for this month. You will have %1$s back on %2$s.', 'imagify' ), - imagify_size_format( $user->quota * pow( 1024, 2 ) ), - date_i18n( get_option( 'date_format' ), strtotime( $user->next_date_update ) ) - ) . '

'; - $message .= '

' . __( 'Upgrade My Subscription', 'imagify' ) . '

'; - $message .= '
'; - } - - // Custom HTML. - $quota_section = '
'; - $quota_section .= '
'; - - if ( 1 === $user->plan_id ) { - $quota_section .= '
' . $views->get_quota_icon() . '
'; - } - - $quota_section .= ''; // .imagify-account - $quota_section .= '
'; // .imagify-abq-row - - if ( 1 === $user->plan_id ) { - $quota_section .= '
'; - $quota_section .= '
'; - /* translators: %s is a data quota. */ - $quota_section .= '

' . sprintf( __( 'You have %s space credit left', 'imagify' ), '' . $unconsumed_quota . '%' ) . '

'; - $quota_section .= '
'; - $quota_section .= '
'; - $quota_section .= '
'; // .imagify-bar-{negative|neutral|positive} - $quota_section .= '
'; // .imagify-space-left - $quota_section .= '
'; // .imagify-abq-row - } + $data = [ + 'quota_icon' => $views->get_quota_icon(), + 'quota_class' => $views->get_quota_class(), + 'plan_label' => $user->plan_label, + 'plan_with_quota' => $user->is_free() || $user->is_growth(), + 'unconsumed_quota' => $unconsumed_quota, + 'user_quota' => $user->quota, + 'next_update' => $user->next_date_update, + ]; - $quota_section .= '

'; - $quota_section .= ''; // .imagify-account-link - $quota_section .= '

'; // .imagify-abq-row - $quota_section .= '
'; // .imagify-admin-bar-quota - $quota_section .= $message; + $template = $views->get_template( 'admin/admin-bar-status', $data ); - wp_send_json_success( $quota_section ); + wp_send_json_success( $template ); } } diff --git a/views/admin/admin-bar-status.php b/views/admin/admin-bar-status.php new file mode 100644 index 000000000..e3a1944ca --- /dev/null +++ b/views/admin/admin-bar-status.php @@ -0,0 +1,45 @@ + + +
+
+ +
+ + +
+ +
+
+

' . $data['unconsumed_quota'] . '%' ); ?>

+
+
+
+
+
+ + +
+

+


' ); ?>

+

+
+ +
'; +

+

%1$s back on %2$s.', 'imagify' ), + imagify_size_format( $data['user_quota'] * pow( 1024, 2 ) ), + date_i18n( get_option( 'date_format' ), strtotime( $data['next_date_update'] ) ) + ); ?>

+

+
+ +
From 98f8bd65b663b4a1ed20af060cfa2f79cf599d46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Perona?= Date: Mon, 6 Nov 2023 16:47:44 -0500 Subject: [PATCH 04/12] update template with new content --- views/admin/admin-bar-status.php | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/views/admin/admin-bar-status.php b/views/admin/admin-bar-status.php index e3a1944ca..0d3bad9ee 100644 --- a/views/admin/admin-bar-status.php +++ b/views/admin/admin-bar-status.php @@ -22,24 +22,14 @@ - -
+
+

-


' ); ?>

-

-
- -
'; +

-

%1$s back on %2$s.', 'imagify' ), - imagify_size_format( $data['user_quota'] * pow( 1024, 2 ) ), - date_i18n( get_option( 'date_format' ), strtotime( $data['next_date_update'] ) ) - ); ?>

-

+ +

+

+
-
From 18bec8a55cda9bf4b61bef704905cc174268d31b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Perona?= Date: Mon, 6 Nov 2023 16:47:54 -0500 Subject: [PATCH 05/12] add new notice removal --- classes/Notices/Notices.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/classes/Notices/Notices.php b/classes/Notices/Notices.php index 79eeaf28b..c795baadc 100644 --- a/classes/Notices/Notices.php +++ b/classes/Notices/Notices.php @@ -77,6 +77,7 @@ class Notices { 'wp-rocket', 'bulk-optimization-complete', 'bulk-optimization-running', + 'upsell-admin-bar', ]; /** @@ -273,6 +274,7 @@ public function renew_almost_over_quota_notice() { // Renew the notice for all users. foreach ( $results as $result ) { self::renew_notice( 'almost-over-quota', $result->user_id ); + self::renew_notice( 'upsell-admin-bar', $result->user_id ); } } From e856e261d23cf36b0bc42e33f02b417b7b60276c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Perona?= Date: Mon, 6 Nov 2023 16:48:07 -0500 Subject: [PATCH 06/12] update view content --- classes/Admin/AdminBar.php | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/classes/Admin/AdminBar.php b/classes/Admin/AdminBar.php index 23b856095..9d4ae2a56 100644 --- a/classes/Admin/AdminBar.php +++ b/classes/Admin/AdminBar.php @@ -35,6 +35,28 @@ public function get_admin_bar_profile_callback() { $user = new User(); $views = Imagify_Views::get_instance(); $unconsumed_quota = $views->get_quota_percent(); + $text = ''; + $button_text = ''; + $upgrade_link = ''; + + if ( $user->is_free() ) { + $text = esc_html__( 'Upgrade your plan now for more!', 'rocket' ) . '
' . + esc_html__( 'From $4.99/month only, keep going with image optimization!', 'rocket' ); + $button_text = esc_html__( 'Upgrade My Plan', 'rocket' ); + $upgrade_link = IMAGIFY_APP_DOMAIN . '/subscription/?utm_source=plugin&utm_medium=notification'; + } elseif ( $user->is_growth() ) { + $text = esc_html__( 'Switch to Infinite plan for unlimited optimization:', 'rocket' ) . '
'; + + if ( $user->is_monthly ) { + $text .= esc_html__( 'For $9.99/month, optimize as many images as you like!', 'rocket' ); + $upgrade_link = IMAGIFY_APP_DOMAIN . '/subscription/plan_switch/?label=infinite&payment_plan=1&utm_source=plugin&utm_medium=notification '; + } else { + $text .= esc_html__( 'For $99.9/year, optimize as many images as you like!', 'rocket' ); + $upgrade_link = IMAGIFY_APP_DOMAIN . '/subscription/plan_switch/?label=infinite&payment_plan=2&utm_source=plugin&utm_medium=notification '; + } + + $button_text = esc_html__( 'Switch To Infinite Plan', 'rocket' ); + } $data = [ 'quota_icon' => $views->get_quota_icon(), @@ -44,6 +66,9 @@ public function get_admin_bar_profile_callback() { 'unconsumed_quota' => $unconsumed_quota, 'user_quota' => $user->quota, 'next_update' => $user->next_date_update, + 'text' => $text, + 'button_text' => $button_text, + 'upgrade_link' => $upgrade_link, ]; $template = $views->get_template( 'admin/admin-bar-status', $data ); From 181ab02be810ce57a130ea44451dfb2045bbfd99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Perona?= Date: Mon, 6 Nov 2023 16:48:21 -0500 Subject: [PATCH 07/12] update for upsell in admin bar --- assets/css/admin.css | 33 +++++++++++++++++++++++++++++++++ assets/js/notices.js | 2 +- 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/assets/css/admin.css b/assets/css/admin.css index 29897c0e0..5e7a1f112 100755 --- a/assets/css/admin.css +++ b/assets/css/admin.css @@ -1543,3 +1543,36 @@ ul.imagify-datas-details.imagify-datas-details { padding-right: 0em; } } + +.imagify-upsell-admin-bar { + position:relative !important; + background: #c51161; + margin-top: 10px !important; + padding: 20px !important; +} + +.imagify-upsell-admin-bar p { + color: #fff; +} + +.imagify-upsell-admin-bar-button { + display: block !important; + border: 1px solid #fff !important; + border-radius: 5px !important; + color: #fff !important; + font-weight: bold !important; + padding: 5px 10px !important; + text-align: center; + text-decoration: none; + height: auto !important; + margin-top: 10px !important; +} + +.imagify-upsell-dismiss::before { + position: absolute; + top: 5px; + right: 5px; + content: "\2715"; + color: #fff; + font-size: 1em; +} diff --git a/assets/js/notices.js b/assets/js/notices.js index 6ca397b9b..2ebc86221 100755 --- a/assets/js/notices.js +++ b/assets/js/notices.js @@ -6,7 +6,7 @@ */ $( '.imagify-notice-dismiss' ).on( 'click.imagify', function( e ) { var $this = $( this ), - $parent = $this.parents( '.imagify-welcome, .imagify-notice, .imagify-rkt-notice' ), + $parent = $this.parents( '.imagify-welcome, .imagify-notice, .imagify-rkt-notice, .imagify-upsell-admin-bar' ), href = $this.attr( 'href' ); e.preventDefault(); From a36f696a6e796aeb0362457efdd1de5b9309c482 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Perona?= Date: Mon, 6 Nov 2023 17:02:50 -0500 Subject: [PATCH 08/12] move CSS to admin bar --- assets/css/admin-bar.css | 37 +++++++++++++++++++++++++++++++++++++ assets/css/admin.css | 33 --------------------------------- 2 files changed, 37 insertions(+), 33 deletions(-) diff --git a/assets/css/admin-bar.css b/assets/css/admin-bar.css index 67529f32e..92936f18a 100755 --- a/assets/css/admin-bar.css +++ b/assets/css/admin-bar.css @@ -160,3 +160,40 @@ color: #FFF; text-shadow: 0 0 2px rgba(0, 0, 0, 0.2); } + + +#wp-admin-bar-imagify-profile .imagify-upsell-admin-bar { + position:relative ; + background: #c51161; + margin: 10px -13px -10px -13px; + padding: 20px; +} + +#wp-admin-bar-imagify-profile .imagify-upsell-admin-bar p { + color: #fff; +} + +#wp-admin-bar-imagify-profile a.imagify-upsell-admin-bar-button { + display: block; + height: auto !important; + border: 1px solid #fff; + border-radius: 5px; + color: #fff !important; + padding: 5px 10px !important; + text-align: center; + text-decoration: none; + margin-top: 10px; +} + +#wpadminbar #wp-admin-bar-imagify-profile a.imagify-upsell-dismiss { + display: inline !important; + height: auto !important; +} + +#wpadminbar #wp-admin-bar-imagify-profile .imagify-upsell-dismiss::before { + position: absolute; + top: 5px; + right: 10px; + content: "\2715"; + color: #fff; +} diff --git a/assets/css/admin.css b/assets/css/admin.css index 5e7a1f112..29897c0e0 100755 --- a/assets/css/admin.css +++ b/assets/css/admin.css @@ -1543,36 +1543,3 @@ ul.imagify-datas-details.imagify-datas-details { padding-right: 0em; } } - -.imagify-upsell-admin-bar { - position:relative !important; - background: #c51161; - margin-top: 10px !important; - padding: 20px !important; -} - -.imagify-upsell-admin-bar p { - color: #fff; -} - -.imagify-upsell-admin-bar-button { - display: block !important; - border: 1px solid #fff !important; - border-radius: 5px !important; - color: #fff !important; - font-weight: bold !important; - padding: 5px 10px !important; - text-align: center; - text-decoration: none; - height: auto !important; - margin-top: 10px !important; -} - -.imagify-upsell-dismiss::before { - position: absolute; - top: 5px; - right: 5px; - content: "\2715"; - color: #fff; - font-size: 1em; -} From 36b8144d425a4a6a803457a4c31920a4eb5f2cfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Perona?= Date: Tue, 7 Nov 2023 08:28:00 -0500 Subject: [PATCH 09/12] fix PHPCS --- classes/Admin/AdminBar.php | 5 ++++- views/admin/admin-bar-status.php | 8 +++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/classes/Admin/AdminBar.php b/classes/Admin/AdminBar.php index 9d4ae2a56..93ae75a82 100644 --- a/classes/Admin/AdminBar.php +++ b/classes/Admin/AdminBar.php @@ -6,6 +6,9 @@ use Imagify\User\User; use Imagify_Views; +/** + * Admin bar handler + */ class AdminBar { use InstanceGetterTrait; @@ -45,7 +48,7 @@ public function get_admin_bar_profile_callback() { $button_text = esc_html__( 'Upgrade My Plan', 'rocket' ); $upgrade_link = IMAGIFY_APP_DOMAIN . '/subscription/?utm_source=plugin&utm_medium=notification'; } elseif ( $user->is_growth() ) { - $text = esc_html__( 'Switch to Infinite plan for unlimited optimization:', 'rocket' ) . '
'; + $text = esc_html__( 'Switch to Infinite plan for unlimited optimization:', 'rocket' ) . '
'; if ( $user->is_monthly ) { $text .= esc_html__( 'For $9.99/month, optimize as many images as you like!', 'rocket' ); diff --git a/views/admin/admin-bar-status.php b/views/admin/admin-bar-status.php index 0d3bad9ee..625f149db 100644 --- a/views/admin/admin-bar-status.php +++ b/views/admin/admin-bar-status.php @@ -4,7 +4,7 @@
- +
- +
-

' . $data['unconsumed_quota'] . '%' ); ?>

+

' . $data['unconsumed_quota'] . '%' ); ?>

From 8ddf2a2d605abc038588116d1c689f1aa98dbb2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Perona?= Date: Tue, 7 Nov 2023 08:29:33 -0500 Subject: [PATCH 10/12] fix PHPCS --- views/admin/admin-bar-status.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/views/admin/admin-bar-status.php b/views/admin/admin-bar-status.php index 625f149db..a21102310 100644 --- a/views/admin/admin-bar-status.php +++ b/views/admin/admin-bar-status.php @@ -15,9 +15,11 @@
-

' . $data['unconsumed_quota'] . '%' ); ?>

+ __( 'You have %s space credit left', 'imagify' ), '' . $data['unconsumed_quota'] . '%' ); + ?>

From 7b51656d42f35dbdbb8b1a8bf2267508cfafc205 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Perona?= Date: Tue, 7 Nov 2023 08:39:52 -0500 Subject: [PATCH 11/12] fix phpcs --- views/admin/admin-bar-status.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/admin/admin-bar-status.php b/views/admin/admin-bar-status.php index a21102310..c2a5d90a9 100644 --- a/views/admin/admin-bar-status.php +++ b/views/admin/admin-bar-status.php @@ -19,7 +19,7 @@ printf( // translators: %s = percentage. __( 'You have %s space credit left', 'imagify' ), '' . $data['unconsumed_quota'] . '%' ); - ?>

+ ?>

From 134b1a70e301c2fe599ce7667f9fcf1e39619076 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Perona?= Date: Thu, 9 Nov 2023 09:12:14 -0500 Subject: [PATCH 12/12] add missing condition --- views/admin/admin-bar-status.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/views/admin/admin-bar-status.php b/views/admin/admin-bar-status.php index c2a5d90a9..d59aff71c 100644 --- a/views/admin/admin-bar-status.php +++ b/views/admin/admin-bar-status.php @@ -26,6 +26,7 @@
+

@@ -36,4 +37,5 @@

+