WP Manifestindependent plugin directory
manifest / editor / wall-tally-block

Wall Tally Block

A block for WordPress to display the number of days since a given date and time.

by Jonathan Rothwell · github.com/jrothwell/wall-tally-block

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/jrothwell/wall-tally-block/archive/refs/heads/main.zip

A block to display the number of days since a specific event, like a stereotypical tally on a prisoner's wall.

Description

This should be primarily used for cases where you want to display the number of days since some event, e.g. "X days since downstairs toilets were closed 'temporarily'"; "we have been waiting Y days for our deliveries to arrive".

Installation

  1. Upload the plugin files to the /wp-content/plugins/wall-tally-block directory, or install the plugin through the WordPress plugins screen directly.
  2. Activate through the 'Plugins' screen in WordPress.

Frequently Asked Questions

Can I use this as a countdown timer?

Possibly. However, be warned that the block will only show a positive integer, and currently has no means to dynamically change between 'until' or 'since.' So only use it for a future event if you're really sure you're going to change it on the day it reaches 0.

Does it update automatically, i.e. if someone keeps the page open over several days, will the counter increase?

No. The number of days between now and the target date are calculated at render time in PHP.

In practice, if someone uses it on a phone browser or similar, the page will likely be ejected from RAM or the cache and reloaded if they return after more than a day.

Why doesn't it support [my favourite feature] that other countdown/count-up plugins do?

The Wall Tally Block is something I wrote for a very specific use case and as such is extremely minimalist—it is also my first time writing any PHP in well over ten years. You are, of course, welcome to fork it and tweak it to your heart's content for your preferred use case.

Screenshots

  1. What a rendered output looks like.
  2. What the blocks look like in the block editor.

Changelog

0.1.1

  • Fix an extra space flying around that shouldn't be there.

0.1.0

  • Initial Release
    • Supports the English language only and does not support multilanguage.
    • Requires the use of both the leading and trailing text not to produce spurious newlines.