Quantcast
Channel: WP First Aid » bns_dynamic_copyright
Viewing all articles
Browse latest Browse all 2

Dynamic Copyright Revisited

$
0
0

A while back I wrote an article about a function to generate a dynamic copyright to display in themes.  Although I imagine the function can be adapted to be used elsewhere, the original intent was to place the function call in the footer of any given theme.

The function itself can be found in all the themes currently available from Cais at BuyNowShop.com via the WordPress Extend Themes repository. There have been a few minor changes to the function since it was introduced; and, it is just recently undergoing much more dramatic changes.

That being the case, I thought this would be a great opportunity to revisit the function and discuss what has changed since the last time I wrote about it here.

To see the BNS Dynamic Copyright code click here.To hide the BNS Dynamic Copyright code click here.

What’s changed:

  1. A `function_exists` conditional check has been added
  2. Better internationalization string formating has been applied.
  3. Default arguments have been set to generate a common notice.
  4. The `apply_filters` function has been implemented to allow for easier customization.

Also to note, the defaults are now written slightly different than the orginal generated copyright notice structure. The following are the current defaults:

  • ‘start’ => “Copyright”
  • ‘copy_years’ => the copyright symbol + the dynamically generated years with published posts
  • ‘url’ => points to the top level domain with the web site title as anchor text
  • ‘end’ => “All Rights Reserved.”

All of these paramters are now easily customized using the common WordPress structure, for example:

bns_dynamic_copyright( 'start=Mine, All Mine!&end=This means you, scrapers!' );

… would produce the following for this site (as of this writing):

Mine, All Mine! © 2009-2011 WP First Aid This means you, scrapers!

Of course, the above may not be appropriate for your own website … or maybe it is.

All the same, feel free to implement this updated function; and, don’t forget to look for it in the next releases of themes from BuyNowShop.com

Enjoy!


Viewing all articles
Browse latest Browse all 2

Trending Articles