Custom Post Type UI
[resolved] WP_VERSION constant introduced in 0.8.1beta (4 posts)

  1. Ov3rfly
    Posted 2 years ago #

    // Define current version constant
    define( 'CPT_VERSION', '0.8.1' );
    // Define current WordPress version constant
    define( 'WP_VERSION', get_bloginfo( 'version' ) );

    Please rename the WP_VERSION constant to something like CPT_WP_VERSION or similar to avoid possible name collisions, see also here:

    All the functions in your Plugin need to have unique names that are different from functions in the WordPress core, other Plugins, and themes. For that reason, it is a good idea to use a unique function name prefix on all of your Plugin's functions.



  2. Michael Beckwith
    Plugin Author

    Posted 2 years ago #

    Will do, thanks for the feedback. Posted this to GitHub so that I can better keep track of it.

  3. Michael Beckwith
    Plugin Author

    Posted 2 years ago #


  4. Ov3rfly
    Posted 2 years ago #

    An additional note here, to compare versions, there is a PHP function version_compare().

    Current check, line 965 and 1606 in current 0.8.1beta:

    if ( CPTUI_WP_VERSION > '3.5' ) {

    Suggested check, something like this:

    if ( version_compare( CPTUI_WP_VERSION, '3.5', '>' ) ) {

    Thanks for the great plugin.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Custom Post Type UI
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.