3, 'members_friends_layout' => 3, 'groups_layout' => 3, 'members_group_layout' => 3, 'group_front_page' => 0, 'group_front_boxes' => 0, 'user_front_page' => 0, 'user_nav_display' => 1, 'group_nav_display' => 1, ); update_option( 'bp_nouveau_appearance', $bp_nouveau_appearance ); update_option( $option_key, 1 ); } $defaults_configured = true; } /** * Clean up unused assets * * Removes styles and scripts for inactive plugins to reduce memory usage * and prevent unnecessary HTTP requests. * * @since 2.0.0 * @return void */ function buddyx_cleanup_unused_assets() { // Remove WooCommerce assets if plugin is not active if ( ! class_exists( 'WooCommerce' ) ) { wp_dequeue_style( 'buddyx-woocommerce' ); wp_deregister_style( 'buddyx-woocommerce' ); } // Remove BuddyPress assets if plugin is not active if ( ! function_exists( 'buddypress' ) && ! class_exists( 'BuddyPress' ) ) { wp_dequeue_style( 'buddyx-buddypress' ); wp_deregister_style( 'buddyx-buddypress' ); } } /** * Add conditional theme support * * Adds theme support features only for active plugins to avoid * unnecessary functionality loading. * * @since 2.0.0 * @return void */ function buddyx_add_conditional_theme_support() { // WooCommerce theme support if ( class_exists( 'WooCommerce' ) ) { add_theme_support( 'woocommerce' ); add_theme_support( 'wc-product-gallery-zoom' ); add_theme_support( 'wc-product-gallery-lightbox' ); add_theme_support( 'wc-product-gallery-slider' ); } // BuddyPress theme support if ( function_exists( 'buddypress' ) || class_exists( 'BuddyPress' ) ) { add_theme_support( 'buddypress-use-nouveau' ); } } /** * Apply WooCommerce optimizations * * Removes default WooCommerce elements that are replaced by theme * implementations to avoid conflicts and duplication. * * @since 2.0.0 * @return void */ function buddyx_woocommerce_optimizations() { if ( class_exists( 'WooCommerce' ) ) { // Remove default WooCommerce breadcrumbs (theme provides its own) remove_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20, 0 ); } } /** * Display BuddyPress legacy template notice * * Shows admin notice if BuddyPress is active but not using the required * Nouveau template pack. * * @since 2.0.0 * @return void */ function buddyx_buddypress_legacy_notice() { if ( ! is_admin() ) { return; } if ( function_exists( 'buddypress' ) && function_exists( 'bp_get_theme_compat_id' ) && 'nouveau' !== bp_get_theme_compat_id() ) { ?>
', '' ); ?>