[theme-reviewers] Request to review theme
Philip Walton
philip at philipwalton.com
Thu Apr 21 17:33:35 UTC 2011
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:
function theme_prefix_wpcaption($x=null, $attr, $content)
{
extract(shortcode_atts( array( 'id' => '', 'align' => 'alignnone', 'width' => '', 'caption' => '' ), $attr));
if ( 0>= (int) $width || empty($caption) ) {
return $content;
}
$id = $id ? 'id="' . $id . '" ' : '';
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>';
}
add_filter('img_caption_shortcode', 'theme_prefix_wpcaption', 10, 3);
On 4/21/11 10:16 AM, Towfiq I. wrote:
> @emil
>
> But the twenty-ten theme is rendering the same thing. The caption
> width is automatically added by wordpress and I am not able to
> override the default width. :/
>
> Any suggestion?
>
>
> -- Towfiq I.
>
>
>
> _______________________________________________ theme-reviewers
> mailing list theme-reviewers at lists.wordpress.org
> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wordpress.org/pipermail/theme-reviewers/attachments/20110421/479c86c3/attachment.htm>
More information about the theme-reviewers
mailing list