To copyright, or not to copyright?

You don’t really have a choice you know. At least in the United States, everything you create is automatically copyrighted (unless you release those rights). Well, everything after March 1, 1989. On that day the “Berne Convention Implementation Act of 1988” ensured that no one else need place that little Copyright symbol © on their creative works.

Now, unless Google’s history is wrong, the first website came about in 1993 (info.cern.ch). So why do we put copyright notices on websites at all? There are a couple of valid reasons I’ve read.

  • Deterrence. Some say that a notice let’s a user know they cannot legally copy the content. However, I personally disagree that people looking to copy content are worried about a notice.
  • Information Age Gauge. I’ve definitely peeked a copyright notice to see how old a website’s content is. I find it to be a decent indicator. Sometimes old content is great though!

If one primary purpose is to let users know how old content is, why have I gone through the trouble of creating dynamically updating copyright notices? Usually done to prevent requests to update it when the new year rolls around. I suppose I probably shouldn’t have done that, but like everyone else, I make mistakes and sometimes operate in an uninformed way.

Let’s get into WordPress and see how I may have implemented a way to output a dynamically updating copyright notice.

First, there’s a WordPress short code:

// functions.php

function ryan_cady_output_copyright() {
	echo '© Copyright ' . date('Y') . ' ryanscady.com. All rights reserved.';
}
add_shortcode('copyright_notice', 'ryan_cady_output_copyright');

// Usage: [copyright_notice]

Pretty simple. Unexciting. Gets the job done.

Considering that you shouldn’t update the copyright year unless you’ve updated content, maybe we can find a way to adapt the copyright notice to ensure this is true. Within WordPress.

// theme functions.php

define('RYAN_CADY_COPYRIGHT_OPTION_NAME', 'copyright_notice_year');
             
function ryan_cady_output_copyright() {
	echo '© Copyright ' . get_option(RYAN_CADY_COPYRIGHT_OPTION_NAME) . ' ryanscady.com. All rights reserved.';
}
add_shortcode('copyright_notice', 'ryan_cady_output_copyright');


function ryan_cady_add_copyright_option()
{
  // Add the current year by default
  add_option('copyright_notice_year', date(Y));
}
add_action('after_setup_theme', 'ryan_cady_add_copyright_option');


// https://developer.wordpress.org/reference/hooks/post_updated/
function ryan_cady_update_copyright_option()
{
  // A post has been created or updated, let's update the option
  update_option(RYAN_CADY_COPYRIGHT_OPTION_NAME, date('Y'));
}
add_action('post_updated', 'ryan_cady_update_copyright_option');
add_action('wp_insert_post', 'ryan_cady_update_copyright_option');

Well this is definitely kind of gross, but I think it would work. I’m not sure, I haven’t tested it…

I think the moral of this story is that we probably don’t need to dynamically update the year in these notices. And we definitely should really consider whether or not we even need that copyright. However, it really isn’t that big of a deal either way. So do what makes you happy, because that’s what actually matters in the end.

I appreciate the time you’ve wasted with me. A fun little topic for my first post, maybe there will be more content sometime in the future. But for now, I’m signing off.

Leave a Reply