Years Ago Today

Descrizione

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.

Screenshot

  • A screenshot of the admin dashboard showing posts published on the current day in past years.
  • A screenshot of the admin dashboard when no posts were published on the current day in any past year.
  • Profile option for opting into receiving a daily email of posts published on the current day in past years.

Installazione

  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.

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

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.

Recensioni

14 Novembre 2019 1 risposta
This is a very useful plugin, but after the latest update, it shows all of my posts, instead of just the ones posted on the day. But this is very good for me. I can check on posts in the past and then see if they need updating or editing. Thank you for this.
25 Marzo 2019
Simple for use and absolutely useful plugin. Just one thing already mentioned here – will be great to have a widget available. Anyway – 5 stars are yours, thanks for your job.
25 Marzo 2019
I was looking for something like this for months when I came across it by accident on an unrelated plugin review article. Does exactly what it says and if you’ve go 2000+ posts like me, it helps you remember older posts that you can repost as evergreen content. I agree that it definitely needs a front-end widget which would be incredibly useful if, like me, you would like to have an ‘on this day’ feature displaying content from your own site.
Leggi tutte le recensioni di 5

Contributi e sviluppo

“Years Ago Today” è un software open source. Le persone che hanno contribuito allo sviluppo di questo plugin sono indicate di seguito.

Collaboratori

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

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

Full changelog is available in CHANGELOG.md.