gocodebox / gocodebox/lifterlms
Admin Notices should be able to be dismissed forever
- Dominant language
- PHP
- Stars
- 212
- Forks
- 140
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 19
Description
Currently, the `LLMS_Admin_Notices::add_notice()` will redisplay any dismissed notice 7 days after it was dismissed. This default value of 7 days can be overridden with a custom value.
When we wish for something to be permanently dismissed, we add a large value (730 days or 2 years) to make it seem like it's dismissed forever, but this isn't actually what happens.
See related issue #1278
Ideally the `add_notice()` method should have an option to "dismiss_forever". When a notice is dismissed forever we should record that it has been permantently dismissed the `add_notice()` method should prevent the addition of the notice.
Contributor guide
Research direction
Start at LLMS_Admin_Notices::add_notice() and inspect how dismissal durations and dismissed notices are stored. Define the permanent-dismissal option there, then verify that a permanently dismissed notice is not added again; the issue names no test or file to run.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100