diff --git a/includes/fs-essential-functions.php b/includes/fs-essential-functions.php index f75c02758..7a1652688 100644 --- a/includes/fs-essential-functions.php +++ b/includes/fs-essential-functions.php @@ -36,39 +36,7 @@ function fs_normalize_path( $path ) { } } - if ( ! function_exists( 'fs_get_plugins' ) ) { - /** - * @author Leo Fajardo (@leorw) - * @since 2.2.1 - * - * @param bool $delete_cache - * - * @return array - */ - function fs_get_plugins( $delete_cache = false ) { - $cached_plugins = wp_cache_get( 'plugins', 'plugins' ); - if ( ! is_array( $cached_plugins ) ) { - $cached_plugins = array(); - } - - $plugin_folder = ''; - if ( isset( $cached_plugins[ $plugin_folder ] ) ) { - $plugins = $cached_plugins[ $plugin_folder ]; - } else { - if ( ! function_exists( 'get_plugins' ) ) { - require_once ABSPATH . 'wp-admin/includes/plugin.php'; - } - - $plugins = get_plugins(); - - if ( $delete_cache && is_plugin_active( 'woocommerce/woocommerce.php' ) ) { - wp_cache_delete( 'plugins', 'plugins' ); - } - } - - return $plugins; - } - } + require_once dirname( __FILE__ ) . '/supplements/fs-essential-functions-2.2.1.php'; #region Core Redirect (copied from BuddyPress) ----------------------------------------- diff --git a/includes/supplements/fs-essential-functions-2.2.1.php b/includes/supplements/fs-essential-functions-2.2.1.php new file mode 100644 index 000000000..946a34d6c --- /dev/null +++ b/includes/supplements/fs-essential-functions-2.2.1.php @@ -0,0 +1,45 @@ +plugins[ $this_sdk_relative_path ] ) || $this_sdk_version != $fs_active_plugins->plugins[ $this_sdk_relative_path ]->version