[wp-hackers] Custom post types filtering

Andrew Nacin wp at andrewnacin.com
Wed Jun 30 00:17:41 UTC 2010

On Tue, Jun 29, 2010 at 12:38 PM, Olivier <autremonde75 at gmail.com> wrote:

>        if ($wp_version >= '3.0' ...

If you must do a version compare (I would generally not recommend this, and
instead check for functionality -- akin to browser detection versus feature
detection in JS), I would use version_compare().

You can also use get_bloginfo( 'version' ) instead of using the global.

More information about the wp-hackers mailing list