Years Ago Today

September 03, 2023

Years Ago Today Plugin

Admin dashboard widget (and optional daily email) that lists posts published to your site on this day in years past.

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.

Installation

  1. Install via the built-in WordPress plugin installer. Or download and unzip years-ago-today.zip inside the plugins directory for your site (typically wp-content/plugins/)
  2. Activate the plugin through the ‘Plugins’ admin menu in WordPress
  3. View the widget on your admin dashboard.
  4. (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.

Screenshots

  1. A screenshot of the admin dashboard showing posts published on the current day in past years.

    A screenshot of the admin dashboard showing posts published on the current day in past years.

  2. A screenshot of the admin dashboard when no posts were published on the current day in any past year.

    A screenshot of the admin dashboard when no posts were published on the current day in any past year.

  3. Profile option for opting into receiving a daily email of posts published on the current day in past years.

    Profile option for opting into receiving a daily email of posts published on the current day in past years.

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.

Can I filter the widget to only show my posts (or only posts for a particular author)?

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).

Changelog

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/ into tests/phpunit/
      • Change: Move phpunit/bin/ into tests/
    • Change: Remove ‘test-‘ prefix from unit test file
    • Change: In bootstrap, store path to plugin file constant

1.4 (2021-04-19)

Highlights:

  • This minor release adds the ability for admins to edit the value of the setting for other users and also notes compatibility through WP 5.7+.

Details:

  • New: Permit admins to see and edit the value of the setting for other users
  • New: Add HTML5 compliance by omitting type attribute for style tag
  • Change: Note compatibility through WP 5.7+
  • Change: Drop compatibility for versions of WP older than 4.9
  • Change: Update copyright date (2021)

Full changelog is available in CHANGELOG.md.

Details

  • Version: 1.5.1
  • Active installations: 100
  • WordPress Version: 4.9
  • Tested up to: 6.3.5

Ratings


5 Stars
4 Stars
3 Stars
2 Stars
1 Stars