[wp-trac] [WordPress Trac] #24060: Post formats: `get_the_post_format_image()` splitting content doesn't work when "intermediate_image_sizes" result is empty

WordPress Trac noreply at wordpress.org
Fri Apr 12 16:53:38 UTC 2013


#24060: Post formats: `get_the_post_format_image()` splitting content doesn't work
when "intermediate_image_sizes" result is empty
------------------------------------+------------------
 Reporter:  lancewillett            |       Owner:
     Type:  defect (bug)            |      Status:  new
 Priority:  normal                  |   Milestone:  3.6
Component:  Post Formats            |     Version:
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |
------------------------------------+------------------

Comment (by lancewillett):

 As an explanatory note for # 1 above (move permalink out of foreach loop)
 this is an example debug for an Image post format:

 {{{
 Array
 (
     [0] => http://wordpress-trunk:8888/wp-content/uploads/2013/04
 /navigation-circles-150x150.png
     [1] => http://wordpress-trunk:8888/2013/04/image-test-in-content
 /navigation-circles/
     [2] => http://wordpress-trunk:8888/wp-content/uploads/2013/04
 /navigation-circles-300x57.png
     [3] => http://wordpress-trunk:8888/2013/04/image-test-in-content
 /navigation-circles/
     [4] => http://wordpress-trunk:8888/wp-content/uploads/2013/04
 /navigation-circles-1024x196.png
     [5] => http://wordpress-trunk:8888/2013/04/image-test-in-content
 /navigation-circles/
     [6] => http://wordpress-trunk:8888/wp-content/uploads/2013/04
 /navigation-circles-604x270.png
     [7] => http://wordpress-trunk:8888/2013/04/image-test-in-content
 /navigation-circles/
     [8] => http://wordpress-trunk:8888/wp-content/uploads/2013/04
 /navigation-circles-724x138.png
     [9] => http://wordpress-trunk:8888/2013/04/image-test-in-content
 /navigation-circles/
 )
 }}}

 You'll see that the permalink is the same for each size, so it's not
 necessary to have it in the loop.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/24060#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list