[theme-reviewers] Request to review theme
Justin Tadlock
justin at justintadlock.com
Fri Apr 22 18:21:50 UTC 2011
Here's my version:
http://svn.locallylost.com/themes/hybrid-core/trunk/extensions/cleaner-caption.php
It makes sure we're not viewing a feed and does a little extra escaping
on those attributes.
On 4/21/2011 12:37 PM, Towfiq I. wrote:
>
>
> On Thu, Apr 21, 2011 at 11:33 PM, Philip Walton
> <philip at philipwalton.com <mailto:philip at philipwalton.com>> wrote:
>
> 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
> <mailto:theme-reviewers at lists.wordpress.org>
>
> > http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>
>
> _______________________________________________
> theme-reviewers mailing list
> theme-reviewers at lists.wordpress.org
> <mailto:theme-reviewers at lists.wordpress.org>
> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>
>
>
> 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.
> Didn't know css "!important" tag could beat the inline html style.
> Thanks again :)
>
>
> --
> 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/20110422/972546e6/attachment-0001.htm>
More information about the theme-reviewers
mailing list