-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
905edfe
commit 5663d32
Showing
3 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
namespace SternerStuffWordPress\QuadLayers; | ||
|
||
use SternerStuffWordPress\Interfaces\FilterHookSubscriber; | ||
|
||
class DisableQuadLayersPluginNotices implements FilterHookSubscriber { | ||
|
||
public static function get_filters(): array | ||
{ | ||
return [ | ||
'get_user_metadata' => ['disable_quadlayers_notice', 10, 3], | ||
]; | ||
} | ||
|
||
public function disable_quadlayers_notice($value, $object_id, $meta_key) | ||
{ | ||
if(str_contains($meta_key, 'quadlayers') && str_contains($meta_key, '_notice_hidden_')) { | ||
return true; | ||
} | ||
|
||
return $value; | ||
} | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters