Changeset 13304 for trunk/src/class-buddypress.php
- Timestamp:
- 07/26/2022 01:31:07 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/class-buddypress.php
r13303 r13304 464 464 */ 465 465 $this->email_taxonomy_type = apply_filters( 'bp_email_tax_type', 'bp-email-type' ); 466 467 /** 468 * Are PHPUnit tests running? 469 * 470 * @since 11.0.0 471 * 472 * @param bool $value True if PHPUnit tests are running, false otherwise. 473 */ 474 $this->is_phpunit_running = function_exists( 'tests_add_filter' ); 466 475 } 467 476 … … 484 493 if ( ! defined( 'BP_DB_VERSION' ) ) { 485 494 define( 'BP_DB_VERSION', $this->db_version ); 486 }487 488 // Define if deprecated functions should be ignored.489 if ( ! defined( 'BP_IGNORE_DEPRECATED' ) ) {490 define( 'BP_IGNORE_DEPRECATED', true );491 495 } 492 496 } … … 536 540 require $this->plugin_dir . 'bp-core/bp-core-blocks.php'; 537 541 538 // Maybe load deprecated functionality (this double negative is proof positive!). 539 if ( ! bp_get_option( '_bp_ignore_deprecated_code', ! $this->load_deprecated ) ) { 540 require $this->plugin_dir . 'bp-core/deprecated/1.2.php'; 541 require $this->plugin_dir . 'bp-core/deprecated/1.5.php'; 542 require $this->plugin_dir . 'bp-core/deprecated/1.6.php'; 543 require $this->plugin_dir . 'bp-core/deprecated/1.7.php'; 544 require $this->plugin_dir . 'bp-core/deprecated/1.9.php'; 545 require $this->plugin_dir . 'bp-core/deprecated/2.0.php'; 546 require $this->plugin_dir . 'bp-core/deprecated/2.1.php'; 547 require $this->plugin_dir . 'bp-core/deprecated/2.2.php'; 548 require $this->plugin_dir . 'bp-core/deprecated/2.3.php'; 549 require $this->plugin_dir . 'bp-core/deprecated/2.4.php'; 550 require $this->plugin_dir . 'bp-core/deprecated/2.5.php'; 551 require $this->plugin_dir . 'bp-core/deprecated/2.6.php'; 552 require $this->plugin_dir . 'bp-core/deprecated/2.7.php'; 553 require $this->plugin_dir . 'bp-core/deprecated/2.8.php'; 554 require $this->plugin_dir . 'bp-core/deprecated/2.9.php'; 555 require $this->plugin_dir . 'bp-core/deprecated/3.0.php'; 556 require $this->plugin_dir . 'bp-core/deprecated/4.0.php'; 557 require $this->plugin_dir . 'bp-core/deprecated/6.0.php'; 558 require $this->plugin_dir . 'bp-core/deprecated/7.0.php'; 559 require $this->plugin_dir . 'bp-core/deprecated/8.0.php'; 560 require $this->plugin_dir . 'bp-core/deprecated/9.0.php'; 561 require $this->plugin_dir . 'bp-core/deprecated/10.0.php'; 562 require $this->plugin_dir . 'bp-core/deprecated/11.0.php'; 563 } 542 // Get the list of versions needing their deprecated functions to be loaded. 543 $deprecated_functions_versions = bp_get_deprecated_functions_versions(); 544 545 // Maybe load deprecated functionality. 546 if ( $deprecated_functions_versions && ! $this->is_phpunit_running ) { 547 $this->load_deprecated = true; 548 549 foreach ( $deprecated_functions_versions as $deprecated_functions_version ) { 550 // Load all or last 2 deprecated versions. 551 require $this->plugin_dir . sprintf( 'bp-core/deprecated/%s.php', $deprecated_functions_version ); 552 } 553 } 564 554 565 555 // Load wp-cli module if PHP 5.6+. … … 721 711 ! in_array( $component, array( 'core', 'members' ), true ) && 722 712 ! bp_is_active( $component ) && 723 ! function_exists( 'tests_add_filter' )713 ! $this->is_phpunit_running 724 714 ) { 725 715 return;
Note: See TracChangeset
for help on using the changeset viewer.