[cc-commits] [SCM] Integrates CC licensing into media manager and posts (branch master) updated. 0.5-20-g5971311
git version control
git at a7.creativecommons.org
Mon Jul 12 12:10:07 EDT 2010
The branch, master has been updated
via 59713115d271d5c61e913ba629616c694b080519 (commit)
from c849961147c44ed81e74905eb59075e37c929c78 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 59713115d271d5c61e913ba629616c694b080519
Author: Nils Dagsson Moskopp <nils at dieweltistgarnichtso.net>
Date: Mon Jul 12 18:09:14 2010 +0200
+ post thumbnail filter now optional
-----------------------------------------------------------------------
Summary of changes (followed by patch):
wordpress-cc-plugin/wordpress-cc-plugin.php | 23 ++++++++++++++++++++---
1 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/wordpress-cc-plugin/wordpress-cc-plugin.php b/wordpress-cc-plugin/wordpress-cc-plugin.php
index 4e6cac0..fe640a2 100644
--- a/wordpress-cc-plugin/wordpress-cc-plugin.php
+++ b/wordpress-cc-plugin/wordpress-cc-plugin.php
@@ -19,12 +19,14 @@ Author URI: http://dieweltistgarnichtso.net
function cc_wordpress_register_settings() {
register_setting('cc_wordpress_options', 'cc_wordpress_css');
register_setting('cc_wordpress_options', 'cc_wordpress_default_license');
+ register_setting('cc_wordpress_options', 'cc_wordpress_post_thumbnail_filter');
}
// delete database entry on uninstall
function cc_wordpress_uninstall(){
- delete_option('cc_wordpress_css');
- delete_option('cc_wordpress_options', 'cc_wordpress_default_license');
+ unregister_setting('cc_wordpress_options', 'cc_wordpress_css');
+ unregister_setting('cc_wordpress_options', 'cc_wordpress_default_license');
+ unregister_setting('cc_wordpress_options', 'cc_wordpress_post_thumbnail_filter');
}
// install hook
@@ -149,6 +151,19 @@ label input {
</label>
</p>
+ <h2>Post Thumbnail Filter</h2>
+ <p>
+ Specify if post thumbnail images should be replaced with <i><figure></i> elements.
+ </p>
+ <p>
+ <label>
+ Filter post thumbnails
+ <input type="checkbox" name="cc_wordpress_post_thumbnail_filter"<?php
+ echo cc_wordpress_admin_checked('cc_wordpress_post_thumbnail_filter','on');
+ ?>/>
+ </label>
+ </p>
+
<h2>Stylesheet</h2>
<p>
A stylesheet changes the look of the license attribution.
@@ -448,7 +463,9 @@ function cc_wordpress_article_filter($article) {
}
function cc_wordpress_post_thumbnail_filter($html, $post_id, $post_thumbnail_id, $size, $attr) {
- $html = cc_wordpress_create_figure($post_thumbnail_id, '', $size, true);
+ if (get_option('cc_wordpress_post_thumbnail_filter') == 'on') {
+ $html = cc_wordpress_create_figure($post_thumbnail_id, '', $size, true);
+ }
return $html;
}
hooks/post-receive
--
Integrates CC licensing into media manager and posts
More information about the cc-commits
mailing list