WP version compare with beta snapshots
-
Hey folks.
I’ve just installed 2.6-beta1. In order to test plugin compatibilities, I used the version_compare php function. I’d like to insert some code in 2.6-beta1 but not in 2.5.1. I’ve tried this:
if ( version_compare( $wp_version, '2.6', '>=' ) ) { // some code }
but the code doesnt execute in 2.6-beta1. The version_compare did work a hundred times on other parts of the code.
Don’t I see the wood for the trees?
edit. Since actually 2.6-beta1 is earlier than 2.6, I’ve also tried
if ( version_compare( $wp_version, '2.5.9', '>=' ) ) { // some code }
but that didnt work either.
Regards.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘WP version compare with beta snapshots’ is closed to new replies.