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 / no-public-comments.php
Last active August 29, 2015 14:13
Hide CommentPress Comments
<?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-procedural-hooks.php
Last active August 29, 2015 14:18
CiviCRM Shortcode Button Hook Example
<?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 / upcoming-events.php
Last active August 29, 2015 14:19
Upcoming Events for Event Organiser
/**
* 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 ) ) {
<?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 / deploy.sh
Created October 12, 2012 13:24 — forked from BFTrick/deploy.sh
WordPress Plugin Deploy Script
#! /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

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 / civicrm-paypal-cc-screen.php
Last active February 29, 2016 15:22
Make Paypal default to the Credit Card screen instead of the Paypal login screen
<?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
--------------------------------------------------------------------------------
/**
* 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.
@christianwach
christianwach / civicrm-menu-style.css
Last active November 23, 2016 19:08
CiviCRM admin menu style changes for WordPress
/*
--------------------------------------------------------------------------------
Basic CiviCRM admin menu overrides for WordPress
--------------------------------------------------------------------------------
*/
body #civicrm-menu
{
height: 32px;
}
@christianwach
christianwach / civicrm-modifier.php
Last active November 23, 2016 19:11
Basic CiviCRM Modification
<?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
--------------------------------------------------------------------------------
*/