diff --git a/wp-content/plugins/rss-license/readme.txt b/wp-content/plugins/rss-license/readme.txt new file mode 100644 index 0000000000000000000000000000000000000000..4858ac9effd9820e72767dc9e3f0e1ef9bdcf91a --- /dev/null +++ b/wp-content/plugins/rss-license/readme.txt @@ -0,0 +1,26 @@ +=== RSS License === +Contributors: patrys +Donate link: http://room-303.com/blog/postaw-piwo/ +Tags: feed, license +Requires at least: 2.0.11 +Tested up to: 2.9 +Stable tag: 0.1 + +Allows one to include the wpLicense copyright in blog feeds. + +== Description == + +This plugin will add a copyright footer to your feeds. Each footer contains a permalink, author info and the license. + +Currently footers are not appended to the excerpts as it's not common to steal these. + +== Installation == + +1. Make sure wpLicense is installed and working +1. Upload `rss-license` to the `/wp-content/plugins/` directory +1. Activate the plugin through the 'Plugins' menu in WordPress + +== Changelog == + += 0.1 = +First version released. diff --git a/wp-content/plugins/rss-license/rss-license.php b/wp-content/plugins/rss-license/rss-license.php new file mode 100644 index 0000000000000000000000000000000000000000..94808f80c9a39218c347a418864f2f8e1d11a11d --- /dev/null +++ b/wp-content/plugins/rss-license/rss-license.php @@ -0,0 +1,39 @@ +<?php +/* +Plugin Name: RSS License +Version: 0.1 +Plugin URI: http://room-303.com/blog/ +Description: Allows one to include the wpLicense copyright in blog feeds. +Author: Patryk Zawadzki +Author URI: http://room-303.com/blog/ +*/ + +function append_rss_license($contents) { + if (!is_feed()) + return $contents; + + $license_uri = get_option('cc_content_license_uri'); + $license_name = get_option('cc_content_license'); + $license_attribName = get_option('cc_content_attributionName'); + $license_attribURL = get_option('cc_content_attributionURL'); + + $result = '<a href="'.get_permalink().'">'.get_the_title().'</a> ©'; + + if($license_attribURL) { + $result .= ' <a href="'.$license_attribURL.'" rel="cc:attributionURL">'; + } + if($license_attribName) + $result .= $license_attribName; + else { + $result .= $license_attribURL; + } + if($license_attribURL) { + $result .= '</a>'; + } + $result .= ', <a rel="license" href="'.$license_uri.'">'.$license_name.'</a>.'; + + return $contents . '<p><small>'.$result.'</small></p>'; +} + +add_filter('the_content', 'append_rss_license'); +//add_filter('the_excerpt_rss', 'append_rss_license');