Skip to content

Instantly share code, notes, and snippets.

Avatar
Thinking time

Christian Wach christianwach

Thinking time
View GitHub Profile
@christianwach
christianwach / civicrm-paypal-cc-screen.php
Last active Feb 29, 2016
Make Paypal default to the Credit Card screen instead of the Paypal login screen
View civicrm-paypal-cc-screen.php
<?php /*
--------------------------------------------------------------------------------
Plugin Name: CiviCRM Paypal Credit Card Screen
Plugin URI: http://haystack.co.uk
Description: Makes Paypal default to the Credit Card screen instead of the Paypal login screen
Author: Christian Wach
Version: 0.1
Author URI: http://haystack.co.uk
Depends: CiviCRM
--------------------------------------------------------------------------------
@christianwach
christianwach / warnings.php
Created Jan 26, 2016 — forked from r-a-y/warnings.php
Suppress warnings created by certain plugins and themes in WordPress.
View warnings.php
/**
* Suppress errors generated by specified WordPress plugins.
*
* Put this in /wp-content/mu-plugins/
*
* @param string $errno The error number.
* @param string $errstr The error message.
* @param string $errfile Path to the file that caused the error.
* @param int $errline Line number of the error.
* @return bool True to suppress error reporting; false to use default error handler.
View bpgen-wpbe-compat.php
<?php /*
--------------------------------------------------------------------------------
Plugin Name: BPGEN WPBE Compatibility
Plugin URI: https://gist.github.com/christianwach/c7a77ffd52f9ec2b21d9
Description: Ensures that BP Group Email Notifications digests are sent using WP Better Emails template.
Author: Christian Wach
Version: 0.1
Author URI: http://haystack.co.uk
--------------------------------------------------------------------------------
*/
@christianwach
christianwach / upcoming-events.php
Last active Aug 29, 2015
Upcoming Events for Event Organiser
View upcoming-events.php
/**
* Amend query for upcoming events
*/
function bpeo_upcoming_events_page( $query ) {
// only run when EO active on main site
if ( function_exists( 'eventorganiser_is_event_query' ) ) {
if ( eventorganiser_is_event_query( $query ) ) {
@christianwach
christianwach / civicrm-procedural-hooks.php
Last active Aug 29, 2015
CiviCRM Shortcode Button Hook Example
View civicrm-procedural-hooks.php
<?php
/*
--------------------------------------------------------------------------------
Plugin Name: CiviCRM Shortcode Button Hook Example
Plugin URI: https://gist.github.com/christianwach/291e646c1306a6652a4a
Description: An example plugin showing how to exclude the CiviCRM shortcode button from a custom post type
Author: Christian Wach
Version: 0.1
Author URI: http://haystack.co.uk
--------------------------------------------------------------------------------
@christianwach
christianwach / no-public-comments.php
Last active Aug 29, 2015
Hide CommentPress Comments
View no-public-comments.php
<?php
/*
Plugin Name: Hide CommentPress Comments
Description: Hides comments and comment form from users who are not logged in
Author: Christian Wach
Version: 1.0
*/
add_filter( 'commentpress_reply_to_para_link_text', 'my_override_reply_to_text', 10, 2 );
function my_override_reply_to_text( $link_text, $paragraph_text ) {
@christianwach
christianwach / civicrm-modifier.php
Last active Nov 23, 2016
Basic CiviCRM Modification
View civicrm-modifier.php
<?php /*
--------------------------------------------------------------------------------
Plugin Name: CiviCRM Modifier
Plugin URI: http://haystack.co.uk
Description: Custom code to modify CiviCRM's behaviour in a multisite context
Author: Christian Wach
Version: 0.1
Author URI: http://haystack.co.uk
--------------------------------------------------------------------------------
*/
@christianwach
christianwach / civicrm-menu-style.css
Last active Nov 23, 2016
CiviCRM admin menu style changes for WordPress
View civicrm-menu-style.css
/*
--------------------------------------------------------------------------------
Basic CiviCRM admin menu overrides for WordPress
--------------------------------------------------------------------------------
*/
body #civicrm-menu
{
height: 32px;
}
View Contract Killer 3.md

Contract Killer 3

Revised date: 07/11/2012

Between us [company name] and you [customer name]

Summary:

We’ll always do our best to fulfil your needs and meet your expectations, but it’s important to have things written down so that we both know what’s what, who should do what and when, and what will happen if something goes wrong. In this contract you won’t find any complicated legal terms or long passages of unreadable text. We’ve no desire to trick you into signing something that you might later regret. What we do want is what’s best for both parties, now and in the future.

@christianwach
christianwach / deploy.sh
Created Oct 12, 2012 — forked from BFTrick/deploy.sh
WordPress Plugin Deploy Script
View deploy.sh
#! /bin/bash
# A modification of Dean Clatworthy's deploy script as found here: https://github.com/deanc/wordpress-plugin-git-svn
# The difference is that this script lives in the plugin's git repo & doesn't require an existing SVN repo.
# main config
PLUGINSLUG="______your-plugin-name______"
CURRENTDIR=`pwd`
MAINFILE="______your-plugin-name______.php" # this should be the name of your main php file in the wordpress plugin
# git config