- Donate link: https://ubr.link/donate-wp
- Tags: year, dynamic, date, copyright, footer, block
- Tested up to: 7.1
- Requires at least: 6.4
- Requires PHP: 7.4
- Stable tag: 1.0.1
- License: GPL 2.0 or later
Auto update the copyright year in your website footer dynamically. At the turn of each year, the number will automatically change to reflect the current year.
- Open any post or page in your WordPress.
- Click the main plus icon (+), located at the upper left corner of the editor, to add a new block.
- Type “Dynamic Year Block” in the search field.
- Look for the plugin with this name in the list of available block plugins and click to install.
- Wait for the installation process and the block will be available to use in your content. You can deactivate it in the “Plugins → All plugins” menu, in your WordPress admin dashboard.
- Upload the dynamic-year-block.zip file via the plugin page of WordPress by clicking “Add New” and selecting the zip from your local computer, or alternatively upload the decompressed
dynamic-year-blockfolder to your/wp-content/plugins/directory on your server, via SFTP/FTP. - Activate the plugin through the “Plugins” menu in WordPress.
- Search for the “Current Year” block in any block inserter within the block editor.
- Optionally, customize the year format in the sidebar of the block editor. The plugin does not create menus or additional settings in the WordPress dashboard.
This eliminates the need to manually edit the year of your website's copyright statement, usually located at the bottom of each page.
It is recommended to insert it in the footer template part of your block's theme, but it can be used anywhere in your content.
Not at all, the plugin is quite simple. It does not add any CSS or Javascript on its own. If you want to style the text in any way, you will use the Block Editor's native features to do so.
Absolutely not, the plugin respects your privacy. It's completely add-free and the code only uses core WordPress functions.
No, this plugin works exclusively in the Block Editor.
The block works only with the native Privacy Policy page. You can create one under “Settings → Privacy”, clicking the “Create button” on the “Settings” tab. Also, make sure your Privacy Policy page is published.
Most probably not. While the plugin offers a basic copyright notice, it doesn't automatically solve all legal issues your website may have, nor does it constitute legal advice in any way. The site owner is solely responsible for ensuring that the website respects the law.
Does the plugin use the client time (via Javascript) or the server time (via PHP) to update the year?
The plugin uses a WordPress core function (current_datetime) to get your server time, using the timezone specified in the “Settings → General → Timezone” on your WordPress dashboard. So it is important to set your timezone in order to display the year correctly, especially at the turn of the year.
The block is rendered dynamically whenever WordPress generates the page. However, a full-page cache or CDN may continue serving previously generated HTML until that cache expires or is purged. This behavior can occur with any caching solution, not only LiteSpeed Cache. Most caches expire or are invalidated normally, but if the previous year remains visible after January 1, purge the affected page or the full-page cache. The plugin intentionally does not bypass caching or require a vendor-specific ESI integration.
You can help with a donation, by visiting our website or publishing a positive review, if you find it useful.
- Run the JavaScript formatter and linter, then rebuild the production assets.
- Confirm that the generated block icon retains
fill="currentColor"and that the generatedrender.phpcontains the direct-access guard. - Test with a WordPress 7.1 Release Candidate in both the post editor and Site Editor, including insertion, editing, saving, reopening, and front-end rendering.
- Test both year formats, text before and after the year, site-name and privacy-policy links, alignment, typography, borders, spacing, colors, gradients, and background images.
- Test automatic insertion through Block Hooks and the existing per-template opt-out behavior.
- Test existing saved block instances to confirm backward compatibility.
- Run Plugin Check against the release package and verify that development files, previous ZIP files, hidden files, and
node_modulesare excluded. - Finalize the release package and prepare the Git and WordPress.org SVN release directories.
- Evaluate the WordPress 7.1
background.gradientsupport in a separate change. Preserve rendering and editing of blocks saved with the legacy color-gradient support; do not migrate automatically. - Replace global
wp.date.dateI18n()usage with an explicit@wordpress/dateimport so the build declares the dependency directly.
