Changeset 24572
- Timestamp:
- 07/05/2013 08:54:46 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/media.php
r24571 r24572 2025 2025 * 2026 2026 * @param string $content A string which might contain image data. 2027 * @param boolean $html Whether to return HTML or URLs 2027 * @param boolean $html Whether to return HTML or URLs in the array 2028 2028 * @param int $limit Optional. The number of image srcs to return 2029 2029 * @return array The found images or srcs … … 2110 2110 * 2111 2111 * @param string $content A string which might contain image data. 2112 * @param boolean $html Whether to return HTML or data 2112 * @param boolean $html Whether to return HTML or data in the array 2113 2113 * @param int $limit Optional. The number of galleries to return 2114 2114 * @return array A list of galleries, which in turn are a list of their srcs in order … … 2153 2153 * 2154 2154 * @param int $post_id Optional. Post ID. 2155 * @param boolean $html Whether to return HTML or data 2155 * @param boolean $html Whether to return HTML or data in the array 2156 2156 * @return array A list of arrays, each containing gallery data and srcs parsed 2157 2157 * from the expanded shortcode … … 2194 2194 * @param int $post_id Optional. Post ID. 2195 2195 * @param boolean $html Whether to return HTML or data 2196 * @return array Gallery data and srcs parsed from the expanded shortcode2196 * @return string|array Gallery data and srcs parsed from the expanded shortcode 2197 2197 */ 2198 2198 function get_post_gallery( $post_id = 0, $html = true ) { 2199 2199 if ( ! $post = get_post( $post_id ) ) 2200 return array();2200 return $html ? '' : array(); 2201 2201 2202 2202 if ( ! has_shortcode( $post->post_content, 'gallery' ) ) 2203 return array();2203 return $html ? '' : array(); 2204 2204 2205 2205 $data = get_content_galleries( $post->post_content, $html, false, 1 );
Note: See TracChangeset
for help on using the changeset viewer.