Changeset 13999 for branches/14.0/src/bp-core/bp-core-functions.php
- Timestamp:
- 08/07/2024 02:09:47 PM (2 years ago)
- File:
-
- 1 edited
-
branches/14.0/src/bp-core/bp-core-functions.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/14.0/src/bp-core/bp-core-functions.php
r13965 r13999 5012 5012 } 5013 5013 5014 // Only load 12.0 deprecated functions. 5015 return array( 12.0 ); 5016 } 5017 5018 $index_first_major = array_search( $initial_version, $deprecated_functions_versions, true ); 5019 if ( false === $index_first_major ) { 5020 return array_splice( $deprecated_functions_versions, -2 ); 5021 } 5022 5023 $latest_deprecated_functions_versions = array_splice( $deprecated_functions_versions, $index_first_major ); 5024 5025 if ( 2 <= count( $latest_deprecated_functions_versions ) ) { 5026 $latest_deprecated_functions_versions = array_splice( $latest_deprecated_functions_versions, -2 ); 5027 } 5028 5029 $index_initial_version = array_search( $initial_version, $latest_deprecated_functions_versions, true ); 5030 if ( false !== $index_initial_version && 12.0 !== $initial_version ) { 5031 unset( $latest_deprecated_functions_versions[ $index_initial_version ] ); 5032 } 5033 5034 return $latest_deprecated_functions_versions; 5014 // Load 12.0 deprecated functions only when BP was installed with 12.0, 14.0 or 15.0. 5015 if ( in_array( $initial_version, array( 12.0, 14.0, 15.0 ), true ) ) { 5016 return array( 12.0 ); 5017 } 5018 5019 return array(); 5020 } 5021 5022 $keep_last = 2; 5023 if ( (float) 15 >= $initial_version ) { 5024 $keep_last = count( $deprecated_functions_versions ) - array_search( 12.0, $deprecated_functions_versions, true ); 5025 } 5026 5027 return array_splice( $deprecated_functions_versions, -$keep_last ); 5035 5028 } 5036 5029
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)