Description
This plugin provides a simply admin dashboard widget that lists all of the posts published to your site on this day in years past. Users have the option (via their profiles) to opt into receiving a daily email that provides a listing and links to all of the posts published to your site on this day in years past.
Links: Plugin Homepage | Plugin Directory Page | GitHub | Author Homepage
Developer Documentation
Developer documentation can be found in DEVELOPER-DOCS.md. That documentation covers the numerous hooks provided by the plugin. Those hooks are listed below to provide an overview of what’s available.
c2c_years_ago_today-email_cron_time
: Customize the time of day to email the Years Ago Today email to those who have opted-in to it. By default this is “9:00 am”.c2c_years_ago_today-email-if-no-posts
: Override whether the daily Years Ago Today email is sent out on days that don’t have any posts in prior years. By default this value is false, meaning no email is sent in such circumstances.c2c_years_ago_today-email-body-no-posts
: Customize the content of the body of the daily Years Ago Today email when it is sent on days that had no posts in prior years.c2c_years_ago_today-first_published_year
: Explicitly define the earliest year to be considered when finding earlier published posts.
Screenshots
Installation
- Install via the built-in WordPress plugin installer. Or download and unzip
years-ago-today.zip
inside the plugins directory for your site (typicallywp-content/plugins/
) - Activate the plugin through the ‘Plugins’ admin menu in WordPress
- View the widget on your admin dashboard.
- (Optional.) To sign up for a daily email that lists posts published that day, go to your profile, set the checkbox for ‘”Years Ago Today” email’, and then press the button to update your profile.
FAQ
-
If multiple posts were made on this day in a past year, will they be listed?
-
Yes.
-
Are posts published today included?
-
No, only posts made for any year before the current year.
-
Not yet. This functionality is expected in a future update.
-
Why is the checkbox for ‘”Years Ago Today” email’ in my profile disabled?
-
Your site has its cron system disabled (via the
DISABLE_WP_CRON
constant) which means scheduled events (such as this plugin’s daily emails) won’t be handled by WordPress. -
I opted into the daily email, but why haven’t I gotten it?
-
The cron system for WordPress (which handles scheduled events, such as the schedule daily email) requires site traffic to trigger close to its scheduled time, so low traffic sites may not see events fire at a consistent time. It’s also possible cron has been disabled by the site (see previous question).
-
Does this plugin include unit tests?
-
Yes. The tests are not packaged in the release .zip file or included in plugins.svn.wordpress.org, but can be found in the plugin’s GitHub repository.
Reviews
ডেভেলপার এবং কন্ট্রিবিউটর
“Years Ago Today” is open source software. The following people have contributed to this plugin.
কন্ট্রিবিউটরTranslate “Years Ago Today” into your language.
ডেভেলপমেন্ট এ আগ্রহী?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
1.6 (2024-08-09)
- Fix: Convert use of deprecated string interpolation syntax to prevent notice under PHP8.2. Props Simounet.
- Change: Note compatibility through WP 6.6+
- Change: Update copyright date (2024)
- New: Add
.gitignore
file - Change: Remove development and testing-related files from release packaging
- Unit tests:
- Hardening: Prevent direct web access to
bootstrap.php
- Allow tests to run against current versions of WordPress
- New: Add
composer.json
for PHPUnit Polyfill dependency - Change: In bootstrap, store path to plugin file in a constant
- Change: In bootstrap, add backcompat for PHPUnit pre-v6.0
- Hardening: Prevent direct web access to
1.5.1 (2023-06-11)
- Change: Note compatibility through WP 6.3+
- Change: Update copyright date (2023)
- New: Add link to DEVELOPER-DOCS.md in README.md
1.5 (2022-10-12)
Highlights:
- This minor release improves cron handling, removes the little HTML used from emails, prevents a PHP8 warning, adds DEVELOPER-DOCS.md, notes compatibility through WP 6.0+, and reorganizes unit test files.
Details:
- Fix: Make
__wakeup()
public to prevent PHP8 warnings. Props Simounet, koolinus. - Change: Move cron initialization into new
cron_init()
- Change: Register cron task earlier. Props Simounet.
- Change: Remove HTML from email. Props Simounet.
- New: Add DEVELOPER-DOCS.md and move hooks documentation into it
- Change: Pare plugin tags down to 5
- Change: Note compatibility through WP 6.0+
- Change: Update copyright date (2022)
- Unit tests:
- Change: Restructure unit test directories
- Change: Move
phpunit/
intotests/phpunit/
- Change: Move
phpunit/bin/
intotests/
- Change: Move
- Change: Remove ‘test-‘ prefix from unit test file
- Change: In bootstrap, store path to plugin file constant
- Change: Restructure unit test directories
Full changelog is available in CHANGELOG.md.