« first day (2293 days earlier)      last day (2651 days later) » 

12:16 PM
It's long time I don't care about PHP version support in WP so I might have missed something: these days there's some information about PHP ver used by WP users according to the WP version? I see official stats says 5.9% for PHP 5.2, but how much of them are from people with very old WP version?
 
12:47 PM
only .org has that info and they haven't shared thus far
 
 
2 hours later…
3:12 PM
@gmazzap I had been trying to squeeze that info out for years, I even volunteered to make visualization for it (which I did, wasn't used so far). basically it's not too good, as in significant proportion of obsolete PHP actually runs newish WP versions.
people will run on PHP 5.2 until their server dies or someone educates them to update. and WP dead set against educating them.
 
Hopefully also hosts at some point force people to upgrade. Just had that with one client.
 
yeah, Siteground been steadily kicking people up
 
@Rarst thanks for the info.
 
 
2 hours later…
5:21 PM
0
Q: How to catch images with blank dimensions?

Ethan Jinks O'SullivanI've created a WordPress plugin that inserts width and height attributes to all images, for example: <img src="https://placehold.it/100x50"> - to - <img src="https://placehold.it/100x50" width="100" height="50"> Yet, when there are images that have blank dimensions (for both width and height),...

 
5:43 PM
@EthanJinksO'Sullivan Maybe something like if( ! $img[1] ) ?
Oh wait nevermind, just assumed. Didn't look @ your code.
Maybe something more like: $image_size = @getimagesize( $src ); ? Just an idea.
 
6:01 PM
@MichaelEcklund Already implementing getimagesize(), could you clarify what you mean exactly by your last comment?
Mainly my issue is that my regex/code doesn't apply to an image that has blank dimensions set (ex: width="" height="")
 
Well the image's width and height might be IN THE ARRAY, but they might not contain values. They might be empty.
check if in array and not empty.
or instead of in_array(), check isset() && !empty()
 
If I use !empty() it will understand that width="" means that it's empty?
As I understood my logic, it's just seeing it as a text
 

« first day (2293 days earlier)      last day (2651 days later) »