Skip to:

Opened 2 years ago

Last modified 4 months ago

#7906 new defect (bug)

Helper function for checking WP version

Reported by: boonebgorges Owned by:
Milestone: 7.0.0 Priority: normal
Severity: normal Version:
Component: Core Keywords: has-patch dev-feedback


There are a few dozen places in BP where we check for the current WP version. This is generally done with something like:

if ( version_compare( $GLOBALS['wp_version'], '4.9', '>=' ) ) {

though in other places, we do function_exists() checks and other such things.

Two proposals:

  1. We introduce a wrapper function for checking WP version. A proposed implementation is attached.
  2. We standardize on using it throughout BP. This makes it easier to identify backward-compatibility chunks when we bump our minimum WP version.

Attachments (1)

7906.diff (798 bytes) - added by boonebgorges 2 years ago.

Download all attachments as: .zip

Change History (3)

2 years ago

#1 @boonebgorges
2 years ago

  • Milestone changed from 4.0 to Up Next

#2 @imath
4 months ago

  • Milestone changed from Up Next to 7.0.0
Note: See TracTickets for help on using tickets.