Changeset 13705 for trunk/src/bp-core/bp-core-functions.php
- Timestamp:
- 01/22/2024 03:50:51 AM (16 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/bp-core-functions.php
r13682 r13705 4847 4847 // List of versions containing deprecated functions. 4848 4848 $deprecated_functions_versions = array( 4849 '1.2',4850 '1.5',4851 '1.6',4852 '1.7',4853 '1.9',4854 '2.0',4855 '2.1',4856 '2.2',4857 '2.3',4858 '2.4',4859 '2.5',4860 '2.6',4861 '2.7',4862 '2.8',4863 '2.9',4864 '3.0',4865 '4.0',4866 '6.0',4867 '7.0',4868 '8.0',4869 '9.0',4870 '10.0',4871 '11.0',4872 '12.0',4849 1.2, 4850 1.5, 4851 1.6, 4852 1.7, 4853 1.9, 4854 2.0, 4855 2.1, 4856 2.2, 4857 2.3, 4858 2.4, 4859 2.5, 4860 2.6, 4861 2.7, 4862 2.8, 4863 2.9, 4864 3.0, 4865 4.0, 4866 6.0, 4867 7.0, 4868 8.0, 4869 9.0, 4870 10.0, 4871 11.0, 4872 12.0, 4873 4873 ); 4874 4874 … … 4894 4894 */ 4895 4895 $initial_version = (float) bp_get_initial_version(); 4896 $current_ version = (float) bp_get_version();4897 $load_latest_deprecated = $initial_version < $current_ version;4896 $current_major_version = (float) bp_get_major_version( bp_get_version() ); 4897 $load_latest_deprecated = $initial_version < $current_major_version; 4898 4898 4899 4899 // New installs. … … 4905 4905 function( $file ) { 4906 4906 if ( false !== strpos( $file, '.php' ) ) { 4907 return str_replace( '.php', '', $file );4907 return (float) str_replace( '.php', '', $file ); 4908 4908 }; 4909 4909 }, … … 4918 4918 4919 4919 // Only load 12.0 deprecated functions. 4920 return array( '12.0' ); 4921 } 4922 4923 // Try to get the first major version that was in used when BuddyPress was fist installed. 4924 $first_major = ''; 4925 if ( $initial_version ) { 4926 $first_major = bp_get_major_version( $initial_version ); 4927 } 4928 4929 $index_first_major = array_search( $first_major, $deprecated_functions_versions, true ); 4920 return array( 12.0 ); 4921 } 4922 4923 $index_first_major = array_search( $initial_version, $deprecated_functions_versions, true ); 4930 4924 if ( false === $index_first_major ) { 4931 4925 return array_splice( $deprecated_functions_versions, -2 ); … … 4938 4932 } 4939 4933 4940 $index_initial_version = array_search( $ first_major, $latest_deprecated_functions_versions, true );4934 $index_initial_version = array_search( $initial_version, $latest_deprecated_functions_versions, true ); 4941 4935 if ( false !== $index_initial_version ) { 4942 4936 unset( $latest_deprecated_functions_versions[ $index_initial_version ] );
Note: See TracChangeset
for help on using the changeset viewer.