This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Clone of wp_debug_backtrace_summary() | |
* | |
* Return a comma-separated string of functions that have been called to get | |
* to the current point in code. | |
* | |
* @see https://core.trac.wordpress.org/ticket/19589 | |
* | |
* @param string $ignore_class Optional. A class to ignore all function calls within - useful | |
* when you want to just give info about the callee. Default null. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Delay MailChimp subscription when registration is moderated. | |
* | |
* Only users who have requested to be signed up to the list will be passed | |
* to this callback, so store that fact in usermeta for later processing. | |
* | |
* @param bool $delay False delays subscription, true does not | |
* @param int $user_id The user ID to subscribe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php /* | |
-------------------------------------------------------------------------------- | |
Plugin Name: BuddyPress Biography Sync | |
Description: Keeps a BuddyPress xProfile field in sync with the WordPress user description field. | |
Author: Christian Wach | |
Version: 0.1 | |
Author URI: http://haystack.co.uk | |
-------------------------------------------------------------------------------- | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'admin_body_class', 'my_admin_body_classes' ); | |
/** | |
* Adds classes to body element when viewing CiviCRM in WordPress admin. | |
* | |
* This allows selectors to be written for CiviCRM admin pages. | |
* | |
* @param str $classes The existing admin body classes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php /* | |
-------------------------------------------------------------------------------- | |
Plugin Name: CiviCRM Remove KAM | |
Description: Removes CiviCRM's menu on the front-end. | |
Author: Christian Wach | |
Version: 0.1 | |
Author URI: http://haystack.co.uk | |
Depends: CiviCRM | |
-------------------------------------------------------------------------------- | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Populate file info for JSON files. | |
* | |
* @see https://core.trac.wordpress.org/ticket/45633 | |
* | |
* @param array $info The existing file data array. | |
* @param string $file Full path to the file. | |
* @param string $filename The name of the file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Define CiviCRM Multisite Domain constants and settings. | |
* | |
* When a WordPress site is accessed, CiviCRM needs to know a number of settings | |
* that enable Multisite Domain functionality. Define that data here. | |
* | |
* Once the Domain has been created (e.g. via the form on the "Domains" tab of | |
* the CiviCRM Admin Utilities network settings page) add the corresponding data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 | |
*/ |