Skip to:
Content

BuddyPress.org

Changeset 14032


Ignore:
Timestamp:
09/28/2024 01:05:36 PM (7 months ago)
Author:
imath
Message:

Remove the is_plugin_active() polyfill

Fixes #9181

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/bp-core-wpabstraction.php

    r14029 r14032  
    430430}
    431431add_action( 'wp_validate_site_deletion', 'bp_delete_site', 10, 2 );
    432 
    433 if ( ! function_exists( 'is_plugin_active' ) ) {
    434     /**
    435      * Checks if a plugin is active.
    436      *
    437      * @since 15.0.0
    438      *
    439      * @param string $plugin Plugin path to check.
    440      * @return bool True if the plugin is active, false otherwise.
    441      */
    442     function is_plugin_active( $plugin ) {
    443         return in_array( $plugin, (array) get_option( 'active_plugins', array() ), true ) || ( is_multisite() && isset( get_site_option( 'active_sitewide_plugins' )[ $plugin ] ) );
    444     }
    445 }
Note: See TracChangeset for help on using the changeset viewer.