[cc-commits] [CC SVN] r11441 - in ccwordpress/branches/production: . www/wp-content/themes/cc4

webmaster at creativecommons.org webmaster at creativecommons.org
Tue Dec 23 17:08:42 EST 2008


Author: bse
Date: 2008-12-23 22:08:42 +0000 (Tue, 23 Dec 2008)
New Revision: 11441

Modified:
   ccwordpress/branches/production/
   ccwordpress/branches/production/www/wp-content/themes/cc4/functions.php
   ccwordpress/branches/production/www/wp-content/themes/cc4/header.php
   ccwordpress/branches/production/www/wp-content/themes/cc4/style.css
Log:
Merged revisions 11438-11439 via svnmerge from 
svn+ssh://svn@code.creativecommons.org/svnroot/ccwordpress/trunk

........
  r11438 | bse | 2008-12-23 20:46:46 +0000 (Tue, 23 Dec 2008) | 2 lines
  
  Set meta description to blog post excerpt on single view pages.
........
  r11439 | bse | 2008-12-23 20:57:32 +0000 (Tue, 23 Dec 2008) | 2 lines
  
  Hanging about styles; don't do custom excerpt meta description for Pages, too prone to failure.
........



Property changes on: ccwordpress/branches/production
___________________________________________________________________
Modified: svnmerge-integrated
   - /ccwordpress/trunk:1-8278,8280-8284,8286,8288-8296,8298-8311,8313-8435,8437-8453,8455-8471,8473-8499,8501-8502,8504-8509,8511-8514,8516-8518,8520-8576,8578-8601,8604-8655,8657-8663,8665-8671,8673-8694,8696-9095,9097-9115,9117,9119-9122,9125-9132,9134-9465,9467-9612,9615-9627,9629-9643,9645-9659,9661-9687,9689-9712,9733,9769,9771,9775,9809-9810,9813,9820,9832-9838,9841-9901,9903-9920,9922-10049,10051-10061,10063-10087,10093-10094,10096-10164,10166-10173,10175-10539,10541,10545-10582,10584-10600,10602-10638,10640-10734,10736,10784,10787,10822,10842,10868,10895,10913,10927,10938-11077,11079-11200,11219,11221,11224-11225,11279,11281-11284,11286-11359,11361-11362,11399,11401,11404-11406,11409,11411,11415,11417,11422-11423,11425,11427,11429,11434,11436
   + /ccwordpress/trunk:1-8278,8280-8284,8286,8288-8296,8298-8311,8313-8435,8437-8453,8455-8471,8473-8499,8501-8502,8504-8509,8511-8514,8516-8518,8520-8576,8578-8601,8604-8655,8657-8663,8665-8671,8673-8694,8696-9095,9097-9115,9117,9119-9122,9125-9132,9134-9465,9467-9612,9615-9627,9629-9643,9645-9659,9661-9687,9689-9712,9733,9769,9771,9775,9809-9810,9813,9820,9832-9838,9841-9901,9903-9920,9922-10049,10051-10061,10063-10087,10093-10094,10096-10164,10166-10173,10175-10539,10541,10545-10582,10584-10600,10602-10638,10640-10734,10736,10784,10787,10822,10842,10868,10895,10913,10927,10938-11077,11079-11200,11219,11221,11224-11225,11279,11281-11284,11286-11359,11361-11362,11399,11401,11404-11406,11409,11411,11415,11417,11422-11423,11425,11427,11429,11434,11436,11438-11439

Modified: ccwordpress/branches/production/www/wp-content/themes/cc4/functions.php
===================================================================
--- ccwordpress/branches/production/www/wp-content/themes/cc4/functions.php	2008-12-23 21:12:46 UTC (rev 11440)
+++ ccwordpress/branches/production/www/wp-content/themes/cc4/functions.php	2008-12-23 22:08:42 UTC (rev 11441)
@@ -87,6 +87,17 @@
   return stripslashes (get_option ('cc_current_feature'));
 }
 
+/* Equivalent to WP's the_excerpt()
+ * This version builds out excerpt sans html and entities, safe for use in meta tags.
+ */
+function cc_post_excerpt() {
+	global $post;
+
+	$excerpt = htmlentities(strip_tags($post->post_content));
+	$excerpt_a = array_slice (explode(" ", $excerpt), 0, 55);
+	echo implode(" ", $excerpt_a) . "...";
+}
+
 // Removes over-zealously placed <br/>'s and </p>'s from commented out html, and RDF blocks
 // Also removes <br/>'s from the end of </li>'s
 function cc_post_content_process($content) {

Modified: ccwordpress/branches/production/www/wp-content/themes/cc4/header.php
===================================================================
--- ccwordpress/branches/production/www/wp-content/themes/cc4/header.php	2008-12-23 21:12:46 UTC (rev 11440)
+++ ccwordpress/branches/production/www/wp-content/themes/cc4/header.php	2008-12-23 22:08:42 UTC (rev 11441)
@@ -20,9 +20,12 @@
   <? }?>
   <meta name="generator" content="WordPress <?php bloginfo('version'); ?>" />
   <meta name="keywords" content="creative commons, commons, free culture, open source, attribution, non-commercial, share-alike, no derivatives, lessig" />
-  <meta name="description" content="Creative Commons licenses provide a flexible range of protections and freedoms for authors, artists, and educators." />
+<?php if (is_single()) { ?>
+	<meta name="description" content="<?php cc_post_excerpt() ?>" />
+<?php } else { ?>
+	<meta name="description" content="Creative Commons licenses provide a flexible range of protections and freedoms for authors, artists, and educators." />
+<?php } ?>
   
-  
   <? if (is_home() || ($category_name == "weblog")) { ?>
   <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('home')?>/weblog/rss">
   <? } else if (is_category()) { ?>
@@ -33,7 +36,7 @@
   <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
   <?php } ?>
   
-  <link href="<?php bloginfo('stylesheet_directory'); ?>/style.css?4.6" rel="stylesheet" type="text/css" />
+  <link href="<?php bloginfo('stylesheet_directory'); ?>/style.css?4.6.1" rel="stylesheet" type="text/css" />
   <link href="<?php bloginfo('stylesheet_directory'); ?>/support.css?5.1" rel="stylesheet" type="text/css" />
   <link href="/includes/total.css?<?= rand() ?>" rel="stylesheet" type="text/css" /> 
 
@@ -49,7 +52,7 @@
   <?php wp_head(); ?>
  </head>
  <body onload="">
-  <a name="top"></a>
+ <a name="top"></a>
     <div id="header-wrapper">
       <div id="header-main" class="box">
         <span class="publish">

Modified: ccwordpress/branches/production/www/wp-content/themes/cc4/style.css
===================================================================
--- ccwordpress/branches/production/www/wp-content/themes/cc4/style.css	2008-12-23 21:12:46 UTC (rev 11440)
+++ ccwordpress/branches/production/www/wp-content/themes/cc4/style.css	2008-12-23 22:08:42 UTC (rev 11441)
@@ -498,3 +498,16 @@
 			margin-right: 10px;
 	}
 
+	.about-items {
+			width: 48%;
+			padding-right: 2%;
+			float: left;
+	}
+	.about-items-box {
+			clear: both;
+			padding-bottom: 3em; 
+			margin: 1em 0;  
+			border-bottom: 1px solid #e0e0e0;  
+			overflow: auto;
+	}
+




More information about the cc-commits mailing list