[wp-trac] Re: [WordPress Trac] #6380: the_excerpt & [gallery]
WordPress Trac
wp-trac at lists.automattic.com
Thu Apr 3 04:51:31 GMT 2008
#6380: the_excerpt & [gallery]
----------------------------+-----------------------------------------------
Reporter: DD32 | Owner: anonymous
Type: defect | Status: new
Priority: normal | Milestone: 2.5.1
Component: Administration | Version: 2.5
Severity: normal | Resolution:
Keywords: has-patch |
----------------------------+-----------------------------------------------
Comment (by markjaquith):
Replying to [comment:5 westi]:
> I would prefer if a publish/save post hook set a post meta variable for
the posts that said they contained a gallery shortcode that way a single
query should be able to find out if we are going to display a gallery for
the current page I think.
Could scan for all known shortcodes. store as postmeta rows:
uses_shortcode => gallery uses_shortcode => foo
then could have a contains_shortcode() function that could optionally
accept a shortcode param.
{{{
<?php
if ( contains_shortcode( 'gallery' ) {
// do gallery foo bar
}
}}}
?>
But that's too ambitious for a 2.5.1 milestone.
--
Ticket URL: <http://trac.wordpress.org/ticket/6380#comment:6>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list