Changes between Version 2 and Version 3 of Ticket #19503

Timestamp:
12/10/11 17:23:58 (18 months ago)
Author:
johnjamesjacoby
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #19503 – Description

    v2 v3  
    1 Problem: 
     1'''Problem:''' 
    22 
    33Plugin/theme authors cannot reliably use $wp_version when doing their own feature development without hitting a chicken-egg scenario. 
    44 
    5 Example: 
     5---- 
     6 
     7'''Example:''' 
    68 
    79I want a plugin to call function foo_32() for all major WordPress 3.2 branch versions. 
     10 
    811I want a plugin to call function foo_33() for all major WordPress 3.3 branch versions. 
    912 
    10 version_compare() is inadequate for this when used in conjunction with WordPress core's versioning scheme: 
     133.2.1 is greater than 3.2 
    1114 
    12 3.2.1 is greater than 3.2 
    13153.3-RC2 is less than 3.3 
    1416 
    15 Paradox: 
     17version_compare() is inadequate for this when used in conjunction with core's versioning scheme. 
     18 
     19---- 
     20 
     21'''Paradox:''' 
    1622 
    1723version_compare( '3.2', $wp_version ); -- Fails when 3.2.1 comes out 
     24 
    1825version_compare( '3.3', $wp_version ); -- Fails before 3.3 is released 
    1926 
    2027Using version_compare() with any combination of operators yields the same result. 
    2128 
    22 Proposed Solution: 
     29---- 
     30 
     31'''Proposed Solution:''' 
    2332 
    2433A new global: $wp_major_version