WP plugin: Blog Copyright
Blog Copyright is a WordPress plugin that displays a dated copyright mark. When displayed on general, category, search and author queries it provides a range of dates (first-last post years); on single posts, Pages and archive queries the year for the content will be used. Name, copyright term and reservation of rights text can be fully customized through tag parameters, or completely overridden with a custom field.
Blog Copyright is not so much a new plugin for me as a collection of code I’ve been using for a while, just now wrapped up in plugin clothing. So those who might be concerned I’m not driving on towards the finish line for a certain other project, rest assured this was little more than a pit stop.
To install the plugin, download the zip file, extract blog-copyright.php, upload this to your wp-content/plugins/ directory, and activate Blog Copyright in WordPress under Plugins. To use, the template tag
<?php blog_copyright(); ?> can be placed anywhere in your theme templates.
<?php blog_copyright(owner, author, 'idmode', 'customkey', 'before', 'after', 'copyterm', 'rights', in_loop, display); ?>
<?php szub_blog_copyright('args'); ?>
- (integer -or- string) User ID of copyright holder. Set to 0 (zero) to use the blog name as holder (this is the default). Provide a string to override value and use a custom name for holder: ‘Joe aka The Bloggermeister’.
- (boolean) Use post or Page author as copyright holder. Set to FALSE (0) to use ‘owner’ (blog name if ‘owner’ set to 0). Default is TRUE (1).
- (enum) Set format for copyright holder’s name. Default is display option set under their user profile. Options:
- ‘login’ – login name
- ‘nickname’ – nickname only
- ‘firstname’ – first name only
- ‘lastname’ – last name only
- ‘namefl’ – name in format “firstname lastname”
- ‘namelf’ – name in format “lastname firstname”
- ‘namenl’ – name in format “nickname lastname”
- (string) Copyright custom field key expected when using a custom field for individual post or Page copyright information. Example: ‘cc’ (for say a Creative Commons license). Default is ‘copyright’. Using a custom field for copyright info overrides all other parameter values (except ‘before’ and ‘after’)
- (string) Text or HTML displayed before copyright. Default is ‘<p>’.
- (string) Text or HTML displayed after copyright. Default is ‘</p>’.
- (string) Text displayed for copyright term. Default is ‘Copyright©’.
- (string) Text displayed for “reservation of rights,” which comes after the copyright holder’s name. Example: ‘All Rights Reserved’. There is no default.
- (boolean) Whether function is run within The Loop . Set to TRUE (1) if it is. Default is FALSE (0).
- (boolean) Whether to display copyright notice or return it for use in other code. Set it to FALSE (0) to return only. Default is TRUE (1).
* For boolean parameters, use only the value in parentheses (1 or 0) with szub_blog_copyright().
<?php blog_copyright('Bob & Alice Jones', TRUE, 'namefl', '', '<div class="copyright">', '</div>', '', 'All Rights Reserved'); ?>
Display “Bob & Alice Jones” for copyright holder; use author as copyright holder on posts/Pages; firstname lastname for name format; default custom field key; “<div class=”copyright”>” and “</div>” as before and after text (HTML tags); default copyright term; “All Rights Reserved” for reservation of rights text.
<?php szub_blog_copyright('owner=2&author=0&customkey=commons&before=&after='); ?>
Display user #2 for copyright owner; do not use author as copyright holder for posts/Pages; ‘commons’ used for custom field key; no before and after text, defaults for name format, copyright term and reservation of rights.
<?php blog_copyright(); ?>
<?php szub_blog_copyright(); ?>
Display defaults: blog name as copyright holder; use author as copyright holder on posts/Pages; profile display option for name format; ‘copyright’ used for custom field key; ‘<p>’ and ‘</p>’ for before and after text; default copyright term (Copyright©); no reservation of rights text.
I’m hardly an expert in this (or just about any) area of law, so for information on issues of copyright and intellectual property, check out these sites:
- What Is Copyright Protection?
- The Copyright Website
- World Intellectual Property Organization copyright pages
<?php blog_copyright(); ?>in The Loop—it displays the range of dates for copyright instead of the year of the current post. I’m currently looking over how to resolve it (or just leave it as is).