How to check older WordPress versions? -


i want know how check if wordpress installation lower version. let's want check if wordpress installation below 3.4.

how do ?

what important here version can 4.1.1 isn't float either.

how check if version lower current version 4.1.1?

<?php echo bloginfo('version'); ?> 

bloginfo('version') returns wordpress version.

http://codex.wordpress.org/function_reference/get_bloginfo

so based on comments in specific case be

$wp_version = bloginfo('version'); $wp_version = substr('$wp_version', 0, 2);  <-- gets x.x digits compare $wp_version_num = floatval($wp_version); if($wp_version_num <= 3.4) {    echo "less equal"; } else{    echo "greater"; } 

what did here take string cut 1 decimal convert float wanted.


Comments

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

gradle error "Cannot convert the provided notation to a File or URI" -

ios - Possible to get UIButton sizeThatFits to work? -