<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
Here's my version:<br>
<a class="moz-txt-link-freetext" href="http://svn.locallylost.com/themes/hybrid-core/trunk/extensions/cleaner-caption.php">http://svn.locallylost.com/themes/hybrid-core/trunk/extensions/cleaner-caption.php</a><br>
<br>
It makes sure we're not viewing a feed and does a little extra
escaping on those attributes.<br>
<br>
On 4/21/2011 12:37 PM, Towfiq I. wrote:
<blockquote
cite="mid:BANLkTimk33PBdnB6TZ1vZQhsqRT5OS0-3w@mail.gmail.com"
type="cite"><br>
<br>
<div class="gmail_quote">On Thu, Apr 21, 2011 at 11:33 PM, Philip
Walton <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:philip@philipwalton.com">philip@philipwalton.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<div bgcolor="#ffffff" text="#000000"> I haven't been
following this discussion, so sorry if this isn't what you
were asking, but this is what I do in ALL my themes to make
the wp-caption div the same width as the img:<br>
<br>
<pre><tt>function theme_prefix_wpcaption($x=null, $attr, $content)</tt></pre>
<pre><tt>{ </tt></pre>
<pre><tt> extract(shortcode_atts( array( 'id' => '', 'align' => 'alignnone', 'width' => '', 'caption' => '' ), $attr));</tt></pre>
<pre><tt> if ( 0 >= (int) $width || empty($caption) ) {</tt></pre>
<pre><tt> return $content;</tt></pre>
<pre><tt> }</tt></pre>
<pre><tt> $id = $id ? 'id="' . $id . '" ' : '';</tt></pre>
<pre><tt> return '<div ' . $id . 'class="wp-caption ' . $align . '" style="width: ' . $width . 'px">' . $content . '<div class="wp-caption-wrapper"><p class="wp-caption-text">' . $caption . '</p></div></div>';</tt></pre>
<pre><tt>}</tt></pre>
<pre><tt>add_filter('img_caption_shortcode', '</tt><tt><tt>theme_prefix_</tt></tt><tt>wpcaption', 10, 3);</tt></pre>
<div>
<div class="h5"> <br>
<br>
On 4/21/11 10:16 AM, Towfiq I. wrote:<br>
</div>
</div>
<span style="white-space: pre-wrap;">
<div>
<div class="h5">> @emil<br>
<br>
> <br>
<br>
> But the twenty-ten theme is rendering the same
thing. The<br>
caption<br>
<br>
> width is automatically added by wordpress and I
am not able<br>
to<br>
<br>
> override the default width. :/<br>
<br>
> <br>
<br>
> Any suggestion?<br>
<br>
> <br>
<br>
> <br>
<br>
> -- Towfiq I.<br>
<br>
> <br>
<br>
> <br>
<br>
> <br>
</div>
</div>
<br>
> _______________________________________________<br>
theme-reviewers
<div class="im"><br>
<br>
> mailing list <a moz-do-not-send="true"
href="mailto:theme-reviewers@lists.wordpress.org"
target="_blank">theme-reviewers@lists.wordpress.org</a>
<br>
<br>
> <a moz-do-not-send="true"
href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers"
target="_blank">http://lists.wordpress.org/mailman/listinfo/theme-reviewers</a></div>
</span><br>
</div>
<br>
_______________________________________________<br>
theme-reviewers mailing list<br>
<a moz-do-not-send="true"
href="mailto:theme-reviewers@lists.wordpress.org">theme-reviewers@lists.wordpress.org</a><br>
<a moz-do-not-send="true"
href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers"
target="_blank">http://lists.wordpress.org/mailman/listinfo/theme-reviewers</a><br>
<br>
</blockquote>
</div>
<br>
<br>
Thanks for the response Philip, but Emil's solution worked. I knew
I could rewrite the default wp-caption output but wouldn't want to
get into that trouble. <br>
Didn't know css "!important" tag could beat the inline html style.
Thanks again :)<br>
<br clear="all">
<br>
-- <br>
<span style="color: rgb(153, 153, 153);">Towfiq I.</span><br>
<br>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
theme-reviewers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:theme-reviewers@lists.wordpress.org">theme-reviewers@lists.wordpress.org</a>
<a class="moz-txt-link-freetext" href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers">http://lists.wordpress.org/mailman/listinfo/theme-reviewers</a>
</pre>
</blockquote>
</body>
</html>