bp_get_major_wp_version

Parse the WordPress core version number into the major release.

Description

(string) bp_get_major_wp_version(); 

Returns (string)

$wp_version


Usage

  1. if ( !function_exists( 'bp_get_major_wp_version' ) ) { 
  2. require_once '/bp-core/bp-core-wpabstraction.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bp_get_major_wp_version(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/bp-core/bp-core-wpabstraction.php  
  1. function bp_get_major_wp_version() { 
  2. global $wp_version; 
  3.  
  4. return (float) $wp_version;