{"id":226709,"date":"2025-04-01T10:22:33","date_gmt":"2025-04-01T10:22:33","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/runthings-current-year-shortcode\/"},"modified":"2025-12-17T11:56:24","modified_gmt":"2025-12-17T11:56:24","slug":"runthings-current-year-shortcode","status":"publish","type":"plugin","link":"https:\/\/he.wordpress.org\/plugins\/runthings-current-year-shortcode\/","author":20973379,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"2.1.1","stable_tag":"2.1.1","tested":"6.9.4","requires":"6.0","requires_php":"7.4","requires_plugins":null,"header_name":"Current Year Shortcode","header_author":"runthingsdev","header_description":"Add a shortcode for displaying the current year as a range, usage: [year from=\"2025\"] or [runthings_year from=\"2025\"] if there's a conflict.","assets_banners_color":"f0f1f6","last_updated":"2025-12-17 11:56:24","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/runthings.dev\/wordpress-plugins\/current-year-shortcode\/","header_author_uri":"https:\/\/runthings.dev\/","rating":0,"author_block_rating":0,"active_installs":70,"downloads":589,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"2.1.0":{"tag":"2.1.0","author":"runthingsdev","date":"2025-04-01 10:23:22"},"2.1.1":{"tag":"2.1.1","author":"runthingsdev","date":"2025-12-17 11:56:24"}},"upgrade_notice":{"2.1.1":"<p>Bump tested up to 6.9. Update year examples to 2026.<\/p>","2.1.0":"<p>This update moves scripts and styles into externally included files.<\/p>","2.0.0":"<p>This update adds PHP type declarations for better code quality and updates year examples. Requires PHP 7.4 or higher.<\/p>"},"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3265012,"resolution":"128x128","location":"assets","locale":""},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3265012,"resolution":"256x256","location":"assets","locale":""}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3265012,"resolution":"1544x500","location":"assets","locale":""},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3265012,"resolution":"772x250","location":"assets","locale":""}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["2.1.0","2.1.1"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3421859,"resolution":"1","location":"plugin"},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3421859,"resolution":"2","location":"plugin"},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3421859,"resolution":"3","location":"plugin"}},"screenshots":{"1":"Using the shortcode in a footer widget","2":"Plugin info showing the active shortcode","3":"Help tab with usage examples"},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[2972,1358,2487,80,523],"plugin_category":[43],"plugin_contributors":[228895],"plugin_business_model":[],"class_list":["post-226709","plugin","type-plugin","status-publish","hentry","plugin_tags-copyright","plugin_tags-date","plugin_tags-dynamic-content","plugin_tags-shortcode","plugin_tags-year","plugin_category-customization","plugin_contributors-runthingsdev","plugin_committers-runthingsdev","plugin_support_reps-rtpharry"],"banners":{"banner":"https:\/\/ps.w.org\/runthings-current-year-shortcode\/assets\/banner-772x250.png?rev=3265012","banner_2x":"https:\/\/ps.w.org\/runthings-current-year-shortcode\/assets\/banner-1544x500.png?rev=3265012","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/runthings-current-year-shortcode\/assets\/icon-128x128.png?rev=3265012","icon_2x":"https:\/\/ps.w.org\/runthings-current-year-shortcode\/assets\/icon-256x256.png?rev=3265012","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/runthings-current-year-shortcode\/trunk\/screenshot-1.png?rev=3421859","caption":"Using the shortcode in a footer widget"},{"src":"https:\/\/ps.w.org\/runthings-current-year-shortcode\/trunk\/screenshot-2.png?rev=3421859","caption":"Plugin info showing the active shortcode"},{"src":"https:\/\/ps.w.org\/runthings-current-year-shortcode\/trunk\/screenshot-3.png?rev=3421859","caption":"Help tab with usage examples"}],"raw_content":"<!--section=description-->\n<p>This is a plugin which adds a simple shortcode to display the current year or a dynamic year range, particularly useful for copyright statements at the bottom of your website.<\/p>\n\n<p>Its most basic usage is <code>[year]<\/code>, which will display the current year. If you provide a starting year with the 'from' parameter, it will expand into a date range when the 'from' year is before the current year.<\/p>\n\n<p>If <code>[year]<\/code> is used by another plugin, then it uses the fallback <code>[runthings_year]<\/code> which can be customised with the <code>runthings_current_year_shortcode_tag<\/code> filter. You can see the active shortcode tag in it entry in the installed plugins page.<\/p>\n\n<h4>Features<\/h4>\n\n<ul>\n<li>Display current year with <code>[year]<\/code><\/li>\n<li>Create a dynamic year range with <code>[year from=\"2020\"]<\/code><\/li>\n<li>Abbreviated year format with <code>[year from=\"2020\" mode=\"short\"]<\/code>, which shows \"2020-26\" (if the current year is 2026)<\/li>\n<li>Automatic fallback shortcode <code>[runthings_year]<\/code> if another plugin already uses the 'year' shortcode<\/li>\n<li>Filter (<code>runthings_current_year_shortcode_tag<\/code>) to set your own shortcode<\/li>\n<\/ul>\n\n<h4>Usage Examples<\/h4>\n\n<p>Assuming the current year is 2026:<\/p>\n\n<ul>\n<li><code>[year]<\/code> displays \"2026\"<\/li>\n<li><code>[year from=\"2026\"]<\/code> displays \"2026\" (since it's the current year)<\/li>\n<li><code>[year from=\"1983\"]<\/code> displays \"1983-2026\"<\/li>\n<li><code>[year from=\"2020\" mode=\"short\"]<\/code> displays \"2020-26\" (shortened current year)<\/li>\n<li><code>[year from=\"1995\" mode=\"short\"]<\/code> displays \"1995-2026\" (not shortened because centuries differ)<\/li>\n<\/ul>\n\n<h3>Filters<\/h3>\n\n<h4>runthings_current_year_shortcode_tag<\/h4>\n\n<p>This filter allows customization of the shortcode tag used by the plugin.<\/p>\n\n<p>For detailed documentation and examples, see the <a href=\"https:\/\/github.com\/runthings-dev\/runthings-current-year-shortcode#filters\">full documentation on GitHub<\/a>.<\/p>\n\nParameters:\n\n<ol>\n<li><strong><code>$tag<\/code><\/strong> (<code>string<\/code>): The shortcode tag to be registered. Defaults to 'year' or 'runthings_year' if conflicted.<\/li>\n<\/ol>\n\n<h3>Additional Notes<\/h3>\n\n<p>Built by Matthew Harris of runthings.dev, copyright 2021-2026.<\/p>\n\n<p>Visit <a href=\"https:\/\/runthings.dev\/\">runthings.dev<\/a> for more WordPress plugins and resources.<\/p>\n\n<p>Contribute or report issues at <a href=\"https:\/\/github.com\/runthings-dev\/runthings-current-year-shortcode\">GitHub repository<\/a>.<\/p>\n\n<h3>License<\/h3>\n\n<p>This program is free software; you can redistribute it and\/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.<\/p>\n\n<p>This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.<\/p>\n\n<p>You should have received a copy of the GNU General Public License along with this program; if not, see <a href=\"http:\/\/www.gnu.org\/licenses\/gpl-3.0.html\">http:\/\/www.gnu.org\/licenses\/gpl-3.0.html<\/a>.<\/p>\n\n<p>Icon - Calendar by Qadeer Hussain, from Noun Project, https:\/\/thenounproject.com\/browse\/icons\/term\/calendar\/ (CC BY 3.0)<\/p>\n\n<p>Icon - legal by hanis tusiyani, from Noun Project, https:\/\/thenounproject.com\/browse\/icons\/term\/legal\/ (CC BY 3.0)<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload the plugin files to the <code>\/wp-content\/plugins\/runthings-current-year-shortcode<\/code> directory, or install the plugin through the WordPress plugins screen directly.<\/li>\n<li>Activate the plugin through the 'Plugins' screen in WordPress.<\/li>\n<li>Use the <code>[year]<\/code> shortcode in your posts, pages, or widgets.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id='what%20if%20another%20plugin%20already%20uses%20the%20%5Byear%5D%20shortcode%3F'><h3>What if another plugin already uses the [year] shortcode?<\/h3><\/dt>\n<dd><p>If another plugin already uses the <code>[year]<\/code> shortcode, this plugin will automatically use <code>[runthings_year]<\/code> instead to avoid conflicts.<\/p><\/dd>\n<dt id='how%20can%20i%20check%20which%20shortcode%20is%20active%3F'><h3>How can I check which shortcode is active?<\/h3><\/dt>\n<dd><p>On the Plugins admin page, you'll see the active shortcode listed in the plugin's row.<\/p><\/dd>\n<dt id='can%20i%20use%20this%20in%20my%20footer%3F'><h3>Can I use this in my footer?<\/h3><\/dt>\n<dd><p>Yes! This shortcode works perfectly in footer widgets, custom footer code, or anywhere else shortcodes are supported in your theme.<\/p><\/dd>\n<dt id='what%27s%20the%20%27mode%3Dshort%27%20parameter%20for%3F'><h3>What's the 'mode=short' parameter for?<\/h3><\/dt>\n<dd><p>When using a date range with years in the same century (e.g., 2020-2026), the 'short' mode will abbreviate the end year to just the last digits (2020-26), creating a cleaner look for your copyright statements.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>2.1.1 - 17th December 2025<\/h4>\n\n<ul>\n<li>Update year examples to 2026<\/li>\n<li>Bump tested up to 6.9<\/li>\n<\/ul>\n\n<h4>2.1.0 - 26th March 2025<\/h4>\n\n<ul>\n<li>Move scripts and styles into external files<\/li>\n<\/ul>\n\n<h4>2.0.0 - 15th March 2025<\/h4>\n\n<ul>\n<li>Update year examples to 2025<\/li>\n<li>Added fallback shortcode runthings_year if year is taken<\/li>\n<li>Added <code>runthings_current_year_shortcode_tag<\/code> filter to customise the shortcode<\/li>\n<li>Added contextual help tab to plugins page<\/li>\n<li>Added usage examples link to plugins page<\/li>\n<li>Added active shortcode info to plugins page<\/li>\n<li>Prepare for WordPress.org repository<\/li>\n<\/ul>\n\n<h4>1.3.0 - 5th January 2024<\/h4>\n\n<ul>\n<li>Update year examples to 2024<\/li>\n<\/ul>\n\n<h4>1.2.0 - 29th May 2023<\/h4>\n\n<ul>\n<li>Update year examples to 2023<\/li>\n<\/ul>\n\n<h4>1.1.0 - 19th February 2022<\/h4>\n\n<ul>\n<li>Added license<\/li>\n<li>Updated plugin meta<\/li>\n<li>Added readme file<\/li>\n<li>Initial public release<\/li>\n<\/ul>\n\n<h4>1.0.0 - 25th August 2021<\/h4>\n\n<ul>\n<li>Internal release<\/li>\n<\/ul>","raw_excerpt":"Adds a shortcode to display the current year or a year range, perfect for copyright statements.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/he.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/226709","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/he.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/he.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/he.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=226709"}],"author":[{"embeddable":true,"href":"https:\/\/he.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/runthingsdev"}],"wp:attachment":[{"href":"https:\/\/he.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=226709"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/he.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=226709"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/he.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=226709"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/he.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=226709"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/he.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=226709"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/he.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=226709"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}