[cc-commits] [SCM] Integrates CC licensing into media manager and posts (branch master) updated. 0.5-19-gc849961
git version control
git at a7.creativecommons.org
Mon Jul 12 11:35:51 EDT 2010
The branch, master has been updated
via c849961147c44ed81e74905eb59075e37c929c78 (commit)
from 23f3054ab0a03b2a44f181a7d8c620af8f13e7d6 (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 c849961147c44ed81e74905eb59075e37c929c78
Author: Nils Dagsson Moskopp <nils at dieweltistgarnichtso.net>
Date: Mon Jul 12 17:35:15 2010 +0200
* figure generation parameters now have default values: no warnings about missing arguments anymore
-----------------------------------------------------------------------
Summary of changes (followed by patch):
wordpress-cc-plugin/wordpress-cc-plugin.php | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/wordpress-cc-plugin/wordpress-cc-plugin.php b/wordpress-cc-plugin/wordpress-cc-plugin.php
index ff544fa..4e6cac0 100644
--- a/wordpress-cc-plugin/wordpress-cc-plugin.php
+++ b/wordpress-cc-plugin/wordpress-cc-plugin.php
@@ -347,7 +347,7 @@ function cc_wordpress_media_send_to_editor($html, $attachment_id, $attachment) {
return $embed_code;
}
-function cc_wordpress_create_figure($attachment_id, $title, $size, $is_post_thumbnail) {
+function cc_wordpress_create_figure($attachment_id, $title, $size = '', $is_post_thumbnail = false) {
$post =& get_post($attachment_id);
$id = $post->ID;
@@ -362,11 +362,11 @@ function cc_wordpress_create_figure($attachment_id, $title, $size, $is_post_thum
if ($type == 'image') {
$dmci_type_url = 'http://purl.org/dc/dcmitype/Image';
- if (isset($size)) {
+ if ($size == '') {
+ $media_html = '<img src="'. $url .'" alt="'. $alt .'"/>';
+ } else {
$image = wp_get_attachment_image_src($id);
$media_html = '<img src="'. $image[0] .'" alt="'. $alt .'"/>';
- } else {
- $media_html = '<img src="'. $url .'" alt="'. $alt .'"/>';
}
} elseif ($type == 'audio') {
$dmci_type_url = 'http://purl.org/dc/dcmitype/Sound';
hooks/post-receive
--
Integrates CC licensing into media manager and posts
More information about the cc-commits
mailing list