Skip to content

Commit

Permalink
Hide GF update message w/ CSS
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanclevenger91 authored Sep 20, 2024
1 parent 565f6e7 commit 2fa8595
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/GravityForms/HideUpdateMessages.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,21 @@

namespace SternerStuffWordPress\GravityForms;

use SternerStuffWordPress\Interfaces\FilterHookSubscriber;
use SternerStuffWordPress\Interfaces\ActionHookSubscriber;

/**
* Hide Gravity Forms update messages
*/
class HideUpdateMessages implements FilterHookSubscriber {
class HideUpdateMessages implements ActionHookSubscriber {

public static function get_filters() {
public static function get_actions() {
return [
'option_gf_env_hide_background_updates' => '__return_true',
'option_gf_env_hide_update_message' => '__return_true',
'admin_print_styles' => 'admin_print_styles',
];
}
}

public function admin_print_styles()
{
echo '<style>#gf_dashboard_message { display: none; }</style>';
}
}

0 comments on commit 2fa8595

Please sign in to comment.