From c01a2357bca42b448be18aaaf86bff69cb16c47c Mon Sep 17 00:00:00 2001 From: Khadreal Date: Tue, 17 Dec 2024 13:11:51 +0100 Subject: [PATCH] Add gravity styles and scripts compatibility, fixed lint errors #919 --- inc/3rd-party/3rd-party.php | 1 + inc/3rd-party/gravity-forms.php | 48 +++++++++++++++++++++++++++++ inc/classes/class-imagify-views.php | 6 ++-- 3 files changed, 52 insertions(+), 3 deletions(-) create mode 100644 inc/3rd-party/gravity-forms.php diff --git a/inc/3rd-party/3rd-party.php b/inc/3rd-party/3rd-party.php index 35ca142a2..9bfb10ee1 100755 --- a/inc/3rd-party/3rd-party.php +++ b/inc/3rd-party/3rd-party.php @@ -16,6 +16,7 @@ require IMAGIFY_PATH . 'inc/3rd-party/wp-rocket/wp-rocket.php'; require IMAGIFY_PATH . 'inc/3rd-party/yoast-seo.php'; require IMAGIFY_PATH . 'inc/3rd-party/WooCommerce/class-woocommerce.php'; +require IMAGIFY_PATH . 'inc/3rd-party/gravity-forms.php'; /** * Hosting. diff --git a/inc/3rd-party/gravity-forms.php b/inc/3rd-party/gravity-forms.php new file mode 100644 index 000000000..e24570991 --- /dev/null +++ b/inc/3rd-party/gravity-forms.php @@ -0,0 +1,48 @@ +get_percent_unconsumed_quota(); @@ -674,7 +674,7 @@ private function get_user_info(): bool { public function maybe_print_modal_payment() { if ( $this->get_user_info() ) { global $wp_admin_bar; - $this->admin_menu_is_present = $wp_admin_bar && $wp_admin_bar->get_node( 'imagify' ); + $this->admin_menu_is_present = $wp_admin_bar && $wp_admin_bar->get_node( 'imagify' ); return; } @@ -687,7 +687,7 @@ public function maybe_print_modal_payment() { * * @return void */ - public function print_modal_payment( ) { + public function print_modal_payment() { if ( is_admin_bar_showing() && $this->admin_menu_is_present ) { $this->print_template( 'modal-payment',