{"id":185105,"date":"2024-04-07T14:09:07","date_gmt":"2024-04-07T14:09:07","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/texlab-current-year\/"},"modified":"2026-09-12T05:20:32","modified_gmt":"2026-09-12T05:20:32","slug":"texlab-current-year","status":"publish","type":"plugin","link":"https:\/\/ar.wordpress.org\/plugins\/texlab-current-year\/","author":21157933,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.2.0","stable_tag":"1.2.0","tested":"7.1.1","requires":"6.5","requires_php":"7.4","requires_plugins":null,"header_name":"Texlab Current Year","header_author":"Texlab IT","header_description":"Shows the current year.","assets_banners_color":"","last_updated":"2026-09-12 05:20:32","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/www.texlabit.com\/wordpress-plugin-texlab-current-year\/","header_author_uri":"https:\/\/www.texlabit.com\/","rating":5,"author_block_rating":0,"active_installs":0,"downloads":1023,"num_ratings":1,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.1.0":{"tag":"1.1.0","author":"texlab","date":"2025-04-19 01:50:14","revision":3276992},"1.2.0":{"tag":"1.2.0","author":"texlab","date":"2026-09-12 05:20:32","revision":3692339}},"upgrade_notice":{"1.2.0":"<p>Compatibility update for WordPress 7.1 plus code hardening and cleanup. The year now follows your site&#039;s timezone. Requires WordPress 6.5 and PHP 7.4 or later.<\/p>","1.1.0":"<p>This version includes improved code structure and security enhancements. Update recommended for all users.<\/p>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":1},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.1.0","1.2.0"],"block_files":[],"assets_screenshots":[],"screenshots":[]},"plugin_section":[],"plugin_tags":[2972,140685,1358,80,523],"plugin_category":[43],"plugin_contributors":[280323],"plugin_business_model":[],"class_list":["post-185105","plugin","type-plugin","status-publish","hentry","plugin_tags-copyright","plugin_tags-current-year","plugin_tags-date","plugin_tags-shortcode","plugin_tags-year","plugin_category-customization","plugin_contributors-texlab","plugin_committers-texlab"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/texlab-current-year.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>Texlab Current Year is a lightweight WordPress plugin that allows you to display the current year anywhere on your website using a simple shortcode. This is particularly useful for copyright notices and other date-sensitive content that needs to be automatically updated each year.<\/p>\n\n<p>The year is calculated from the timezone configured in Settings &gt; General, so it rolls over at midnight for your site rather than for the server.<\/p>\n\n<h4>Features<\/h4>\n\n<ul>\n<li>Simple shortcode <code>[texlab_current_year]<\/code> to display the current year<\/li>\n<li>Uses the site's configured timezone<\/li>\n<li>Lightweight and efficient: no options, no database queries, no assets loaded<\/li>\n<li>No configuration needed<\/li>\n<li>Works with any theme<\/li>\n<li>Perfect for footer copyright notices<\/li>\n<\/ul>\n\n<h4>Usage<\/h4>\n\n<p>Simply insert the shortcode <code>[texlab_current_year]<\/code> anywhere in your posts, pages, or widgets where you want the current year to appear.<\/p>\n\n<p>Example usage in a copyright notice:\n    \u00a9 [texlab_current_year] Your Company Name. All rights reserved.<\/p>\n\n<h4>Developers<\/h4>\n\n<p>The rendered year can be adjusted with the <code>texlab_current_year<\/code> filter:<\/p>\n\n<pre><code>add_filter( 'texlab_current_year', function ( $year ) { return $year; } );\n<\/code><\/pre>\n\n<p>GitHub repository: <a href=\"https:\/\/github.com\/TEXlab-IT\/texlab-current-year\">Texlab Current Year on GitHub<\/a><\/p>\n\n<h3>Additional Info<\/h3>\n\n<p>For more information and support, please visit:\n<a href=\"https:\/\/www.texlabit.com\/contact\/\">Texlab IT<\/a><\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload the plugin files to the <code>\/wp-content\/plugins\/texlab-current-year<\/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 shortcode <code>[texlab_current_year]<\/code> in your content<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"how%20do%20i%20use%20this%20plugin%3F\"><h3>How do I use this plugin?<\/h3><\/dt>\n<dd><p>Simply insert the shortcode <code>[texlab_current_year]<\/code> wherever you want the current year to appear.<\/p><\/dd>\n<dt id=\"does%20this%20plugin%20slow%20down%20my%20website%3F\"><h3>Does this plugin slow down my website?<\/h3><\/dt>\n<dd><p>No. The plugin registers a single shortcode and loads no scripts, styles or settings. It performs no database queries.<\/p><\/dd>\n<dt id=\"can%20i%20use%20this%20in%20my%20theme%27s%20template%20files%3F\"><h3>Can I use this in my theme's template files?<\/h3><\/dt>\n<dd><p>Yes, you can use the shortcode in template files by using the <code>do_shortcode()<\/code> function:\n    <\/p><\/dd>\n<dt id=\"which%20timezone%20is%20the%20year%20based%20on%3F\"><h3>Which timezone is the year based on?<\/h3><\/dt>\n<dd><p>The year is generated with <code>wp_date()<\/code>, which uses the timezone set in Settings &gt; General.<\/p><\/dd>\n<dt id=\"does%20it%20support%20different%20date%20formats%3F\"><h3>Does it support different date formats?<\/h3><\/dt>\n<dd><p>No. The shortcode outputs the year in YYYY format only. Developers who need something else can use the <code>texlab_current_year<\/code> filter.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.2.0<\/h4>\n\n<ul>\n<li>Tested with WordPress 7.1.<\/li>\n<li>Raised the minimum supported versions to WordPress 6.5 and PHP 7.4, as PHP 7.2 and 7.3 no longer receive security fixes.<\/li>\n<li>The year is now generated with <code>wp_date()<\/code> so it respects the timezone configured in Settings &gt; General instead of the server timezone.<\/li>\n<li>The shortcode callback now explicitly discards any attributes passed to it, so no author-supplied value can reach the output.<\/li>\n<li>Removed the activation and deactivation hooks that called <code>flush_rewrite_rules()<\/code>. The plugin registers no rewrite rules, so the call was unnecessary work on every activation.<\/li>\n<li>Removed the unused plugin path and URL constants from the global namespace.<\/li>\n<li>Removed the redundant <code>load_plugin_textdomain()<\/code> call. WordPress.org has served plugin translations automatically since WordPress 4.6.<\/li>\n<li>The shortcode is now registered on the <code>init<\/code> hook, as recommended.<\/li>\n<li>Added a <code>texlab_current_year<\/code> filter for developers.<\/li>\n<\/ul>\n\n<h4>1.1.0<\/h4>\n\n<ul>\n<li>Added proper class-based structure<\/li>\n<li>Improved code organization and documentation<\/li>\n<li>Added internationalization support<\/li>\n<li>Added activation and deactivation hooks<\/li>\n<li>Enhanced security measures<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release<\/li>\n<\/ul>","raw_excerpt":"Display the current year anywhere in your WordPress site using a simple shortcode.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ar.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/185105","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ar.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/ar.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/ar.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=185105"}],"author":[{"embeddable":true,"href":"https:\/\/ar.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/texlab"}],"wp:attachment":[{"href":"https:\/\/ar.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=185105"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/ar.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=185105"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/ar.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=185105"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/ar.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=185105"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/ar.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=185105"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/ar.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=185105"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}