Skip to content

Instantly share code, notes, and snippets.

View christophherr's full-sized avatar

Christoph Herr christophherr

View GitHub Profile
/*
Modify the color styles of the WooCommerce Bookings datepicker calendar.
Add any/all of these styles to your theme's custom CSS, but be sure to change
the color hex codes to your choice. They're all black here.
*/
/* Month header background color */
#wc-bookings-booking-form .wc-bookings-date-picker .ui-datepicker-header {
background-color: #000000;
}
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query
* Source: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php
*/
$args = array(
@christophherr
christophherr / gist:f529c348b6087a291ae6
Created April 1, 2015 06:42
Sublime test preferences
{
"auto_complete_commit_on_tab": true,
"bold_folder_labels": true,
"color_scheme": "Packages/User/Monokai (SL).tmTheme",
"default_line_ending": "unix",
"enable_telemetry": false,
"ensure_newline_at_eof_on_save": true,
"folder_exclude_patterns":
[
".git",
@christophherr
christophherr / 0_reuse_code.js
Last active August 29, 2015 14:18
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@christophherr
christophherr / WordPress Developers Club Challenge - Object Buffering
Created May 14, 2015 22:29
WordPress Developers Club Challenge - Object Buffering
//1.
//Hello World11.
//ob_flush sends the contents of the buffer.
//The first content is the echo "Hello World" and the second content is the string length (strlen) of "Hello World".
//Hello World echoes no matter what unless the buffer is "cleaned/destroyed" with ob_clean or ob_end_clean...
//2.
//Render out "Hello World"
@christophherr
christophherr / WPDevelopersClub Code Challenge May 19,2015
Last active August 29, 2015 14:21
WPDevelopersClub Code Challenge May 19,2015
//1.
$args = func_get_args();
//2.
$numargs = count($args);
//3.
//This is this weeks brain teaser.
@christophherr
christophherr / forth-unit-test-35272.php
Created October 26, 2016 18:21
Forth unit test 35272
function test_class_not_applied_to_page_item() {
$page_id1 = self::factory()->post->create( array( 'post_type' => 'page', 'post_title' => 'Home Page' ) );
update_option( 'page_on_front', $page_id1 );
$page_id2 = self::factory()->post->create( array( 'post_type' => 'page', 'post_title' => 'Test Page' ) );
wp_update_nav_menu_item( $this->menu_id, 0, array(
'menu-item-type' => 'post_type',
'menu-item-object' => 'page',
'menu-item-object-id' => $page_id1,
/**
* @ticket 38486
*/
function test_class_applied_to_page_for_posts_on_custom_post_type() {
$page_id = self::factory()->post->create( array( 'post_type' => 'page', 'post_title' => 'Home Page' ) );
update_option( 'page_for_posts', $page_id );
$cpt_id = self::factory()->post->create( array( 'post_type' => 'cpt', 'post_name' => 'cpt-name' ) );
wp_update_nav_menu_item( $this->menu_id, 0, array(
@christophherr
christophherr / countdown-timer.html
Created January 21, 2017 00:59
Countdown timer with jQuery.countdown and JS to change the HTML aftter the end of the countdown
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<div class="webinar-timer">
<span class="webinar-countdown"></span>
@christophherr
christophherr / extensions.txt
Last active October 31, 2017 01:34
VS Code Extensions
advanced-new-file - Version :0.5.0
Align - Version :0.2.0
auto-close-tag - Version :0.5.2
beautify - Version :1.1.1
bracket-pair-colorizer - Version :0.10.10
code-settings-sync - Version :2.8.3
CreateModule - Version :0.0.5
CSSLint - Version :0.0.3
debugger-for-chrome - Version :3.4.0
docthis - Version :0.6.0