Years Ago Today

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 | Author Homepage

Screenshots

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

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.

FAQ

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

Contributors & Developers

“Years Ago Today” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

1.2.1 (2017-05-09)

  • Fix: Properly constrain CSS li styling to apply only to plugin’s dashboard widget and not any other dashboard widgets

1.2 (2017-02-20)

  • New: Add footer to daily emails to provide context about what the email is, why it is being sent, and where to go to discontinue it
  • Change: Make prefatory post listing text (in widget and email) more informative
    • Include month and day of the month instead of saying “this day”
    • Include count of the number of posts being listed
    • Use separate singular and plural strings
  • Change: Use built-in WP date query syntax for finding older posts
    • Delete add_year_clause_to_query()
    • Move some of the date handling code from add_year_clause_to_query() into get_posts() for use in date_query
  • Change: Split out functionality from cron_email() into single-purpose functions
    • Add get_email_subject() for getting email subject
    • Add get_email_body() for getting email body
    • Bail if either return empty string
  • Change: Prevent object instantiation
    • Add private __construct()
    • Add private __wakeup()
  • Change: Update unit test bootstrap
    • Default WP_TESTS_DIR to /tmp/wordpress-tests-lib rather than erroring out if not defined via environment variable
    • Enable more error output for unit tests
  • Change: Note compatibility through WP 4.7+
  • Change: Remove support for WordPress older than WP 4.6 (should still work for earlier versions back to WP 4.1)
  • Change: Minor inline code documnetation tweaks (fix typos, spacing)
  • Change: Update copyright date (2017)
  • New: Add LICENSE file
  • Change: Update screenshots

1.1 (2016-01-21)

  • Bugfix: Fix for bug when posts across two days were returned for today by using site’s time and not GMT.
  • New: Add filter ‘c2c_years_ago_ago-email_cron_time’.
  • Change: Change incorrectly named filter from ‘c2c_years_ago_ago-first_published_year’ to ‘c2c_years_ago_today-first_published_year’.
  • Change: Add support for language packs:
    • Don’t load textdomain from file.
    • Remove .pot file and /lang subdirectory.
    • Fix an incorrectly defined textdomain.
  • Change: Note compatibility through WP 4.4+.
  • Change: Explicitly declare methods in unit tests as public.
  • Change: Update copyright date (2016).
  • New: Create empty index.php to prevent files from being listed if web server has enabled directory listings.

1.0.1 (2015-08-03)

  • Bugfix: Change default value for ‘c2c_years_ago_today-email-if-no-posts’ filter from true to false. The original intent was by default not to send the email on days without past posts.
  • Bugfix: Load language files from the ‘lang’ sub-directory.
  • Change: Use dirname(__FILE__) instead of __DIR__ since the latter is only available on PHP 5.3+
  • Update: Note compatibility through WP 4.3+

1.0

  • Initial public release