Skip to content

Instantly share code, notes, and snippets.

View christianwach's full-sized avatar
Thinking time

Christian Wach christianwach

Thinking time
View GitHub Profile
@christianwach
christianwach / groups-buddpress-compatibility.php
Last active May 18, 2023 17:45
Resolves action conflicts between the BuddyPress and Groups plugins.
<?php
/**
* Plugin Name: BuddyPress Groups Action Resolver
* Plugin URI: https://gist.github.com/christianwach/897a0e94add0f477efdd03c089e25019
* Description: Resolves action conflicts between the BuddyPress and Groups plugins.
* Version: 1.0.0
* Author: Christian Wach
* Author URI: https://haystack.co.uk
* License: GPLv3
*
@christianwach
christianwach / groups-filters-manage.php
Last active March 2, 2023 09:24
A WordPress plugin that manages the "Groups" plugin filters across a Multisite network.
<?php
/**
* Plugin Name: Manage Groups Filters
* Plugin URI: https://gist.github.com/christianwach/334816adcb29565dbfe35fd8d5c6d5b5
* Description: Manages the "Groups" plugin filters across a Multisite network.
* Version: 1.0
*
* Put this plugin in /wp-content/mu-plugins/
*
* @package CMW_Groups_Filters_Manage
<?php
/**
* Plugin Name: Remove CiviCRM Base Page from Menu
* Plugin URI: https://gist.github.com/christianwach/931bdf52803a35e363043ad0302fd4be
* Description: Removes the CiviCRM Base Page from a front-end menu.
* Author: Christian Wach
* Version: 1.0
* Author URI: https://haystack.co.uk
*/
<?php
/**
* Plugin Name: Multisite: Passwort Reset on Local Blog
* Plugin URI: https://gist.github.com/eteubert/293e07a49f56f300ddbb
* Description: By default, WordPress Multisite uses the main blog for passwort resets. This plugin enables users to stay in their blog during the whole reset process.
* Version: 1.0.0
* Author: Eric Teubert
* Author URI: http://ericteubert.de
* License: MIT
*/
@christianwach
christianwach / bp-enforce-display-name.php
Last active April 5, 2024 20:00
Enforces the format of the BuddyPress Name field and WordPress Display Name field.
<?php
/**
* Plugin Name: BP Enforce Display Name
* Description: Enforces the format of the BuddyPress Name field and WordPress Display Name field.
* Plugin URI: https://gist.github.com/christianwach/5f07b5cbc0b9067d2353e13cd19806be
* Version: 1.0
* Author: Christian Wach
* Author URI: https://github.com/christianwach
*/
@christianwach
christianwach / bp-xprofile-functions.php
Last active October 19, 2021 08:49
Patched xprofile_sync_wp_profile() for BuddyPress 9.2+
<?php
/**
* Syncs Xprofile data to the standard built in WordPress profile data.
*
* @since 1.0.0
* @since 9.2.0 Adds the $args arguments to catch hook's additional arguments.
*
* @param int $user_id ID of the user to sync.
* @param array $args Hook's additional arguments.

Why am I seeing this?

The BP xProfile WordPress User Sync plugin is no longer needed because the "First Name" and "Last Name" xProfile Fields that it provides have been added to BuddyPress 8.0.0. In addition to this, BuddyPress itself now handles syncing the data with the built-in WordPress User fields. For more information about this transition, please visit the BuddyPress Dev Update page.

What needs to be done?

Before you go ahead and deactivate and delete the BP xProfile WordPress User Sync plugin, there are few things that need to be checked to make sure your site continues to work the way it did before.

Filters and Actions

@christianwach
christianwach / bp-hide-name-field.php
Last active April 5, 2024 20:19
Hides the default Name field on BuddyPress Registration form and Profile Edit screens.
<?php
/**
* Plugin Name: BP Hide Name Field
* Description: Hides the default Name field on BuddyPress Registration form and Profile Edit screens.
* Plugin URI: https://gist.github.com/christianwach/06d878edc277ce1ca8a7e59a82052744
* Version: 1.1
* Author: Christian Wach
* Author URI: https://github.com/christianwach
*/
@christianwach
christianwach / order-payment-api-01.txt
Last active May 6, 2021 17:04
Order API & Payment API mismatches
Using CiviCRM Sample Data (where "financial_type_id=5" is a Taxable Financial Type and "financial_type_id=2" is not)
Call Order.create with these params:
[params] => Array
(
[contact_id] => 206
[financial_type_id] => 5 <----- Taxable Financial Type.
[payment_instrument_id] => 4
[trxn_id] => WooCommerce Order - 1859
@christianwach
christianwach / suppress-admin-notices.php
Last active April 24, 2024 18:33
A WordPress plugin that suppresses nagging admin notices from various plugins.
<?php
/**
* Plugin Name: Suppress Admin Notices
* Plugin URI: https://gist.github.com/christianwach/c30d2972d1807ad9a04dff1db971b7cd
* Description: Stop that damn nagging!
* Version: 1.0.1
* Author: Christian Wach
* Author URI: https://haystack.co.uk
*
* @package CMW_Suppress_Notices