[wp-trac] [WordPress Trac] #24270: Post Formats: get_post_gallery() can return an array when asked for a string
WordPress Trac
noreply at wordpress.org
Mon May 6 15:12:36 UTC 2013
#24270: Post Formats: get_post_gallery() can return an array when asked for a
string
--------------------------+--------------------
Reporter: kovshenin | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.6
Component: Post Formats | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch |
--------------------------+--------------------
Comment (by kovshenin):
Sorry, blamed the wrong function :) `get_post_gallery` is the one and
[attachment:24270.2.diff] is the fix.
{{{
// The 9212 post has a gallery shortcode
echo gettype( get_post_gallery( 9212, false ) ); // array
echo gettype( get_post_gallery( 1, false ) ); // array
echo gettype( get_post_gallery( 9212, true ) ); // string
echo gettype( get_post_gallery( 1, true ) ); // array oO!
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/24270#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list