Skip to content

Commit

Permalink
Update Install font notice display, codebase cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
jestonihpi committed Feb 24, 2023
1 parent 89c576e commit e64df1b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Controller/Controller_Actions.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,9 @@ public function route_notices() {
/* Prevent actions being displayed on our welcome pages */
$register_routes = false;
$is_gfpdf_page = \GPDFAPI::get_misc_class()->is_gfpdf_page();
$is_gf_page = \GFForms::is_gravity_page();

if ( ! wp_doing_ajax() && is_admin() && ( $pagenow === 'plugins.php' || $is_gfpdf_page || \GFForms::is_gravity_page() ) ) {
if ( ! wp_doing_ajax() && is_admin() && ( $pagenow === 'plugins.php' || $is_gfpdf_page || $is_gf_page ) ) {
$register_routes = true;
}

Expand Down Expand Up @@ -188,7 +189,7 @@ public function route_notices() {
} else {
/* Add Install Core font message GFCommon if it doesn't. Remove the font styling to match with the generic add-on error message. */
if ( ! empty( \GFCommon::$errors ) ) {
$message = '<br>' . preg_replace( '/(<[^>]+) style=".*?"/i', '$1', $message );
$message = sprintf( "<div>%s</div>", $message );
}
\GFCommon::add_error_message( $message );

Expand Down

0 comments on commit e64df1b

Please sign in to comment.