Skip to content

Instantly share code, notes, and snippets.

View jeremyfelt's full-sized avatar
🍕
Look at that pizza emoji!

Jeremy Felt jeremyfelt

🍕
Look at that pizza emoji!
View GitHub Profile
<?php
/*
Template Name: Calendar View
*/
get_header();
do_action( 'tribe_events_before_template' );
tribe_get_template_part( 'modules/bar' );
tribe_get_template_part('month/content');
<?php
//Capture the domain and path from the current request
$requested_domain = $_SERVER['HTTP_HOST'];
$requested_uri = trim( $_SERVER['REQUEST_URI'], '/' );
// We currently support one subdirectory deep, and therefore only look at the first path level
$requested_uri_parts = explode( '/', $requested_uri );
$requested_path = $requested_uri_parts[0] . '/';
<?php
add_action( 'after_setup_theme', 'wsu_add_editor_style' );
/**
* Add a stylesheet to the post editor
*/
function wsu_add_editor_style() {
add_editor_style( 'wsu-editor-styles.css' );
}
<?php
/**
* Functions that perform some core functionality that we would love to live inside
* of WordPress one day.
*/
/**
* Retrieve a list of sites that with which the passed user has associated capabilities.
*
* @param int $user_id ID of the user
config.vm.provision :shell do |shell|
shell.path = File.join( "provision", "provision.sh" )
shell.args = "cmd1"
end
<?php
/*
Plugin Name: Log wp_mail()
Version: 0.1
Plugin URI: http://wsu.edu
Description: Log emails sent through WordPress to a text file.
Author: jeremyfelt, wsu.edu
*/
add_filter( 'wp_mail', 'wsu_log_wp_mail', 1 );
  • #20220 link - add check for sunrise, basic commit or close
  • #22160 link - eTags in ms-files
  • #19451 link - add stage of signup to existing filter
  • #24434 link - add mp4 as a default allowed filetype
  • #20854 link - prevent notice by using absint()
  • #20075 link - add hooks to wp-activate
  • #20651 link - pre-deletion hook for site options
  • #19753 link - show network name in network admin page titles
  • #25020 link - sitemeta filter in populate_network()
  • #23650 link - make get_space_allowed filterable
@jeremyfelt
jeremyfelt / gist:6212957
Created August 12, 2013 17:13
Permanently permanently accept SVN SSL certificate
cd ~/.subversion/auth/
../auth $ ls -lrt
drwxr-xr-x 2 jeremyfelt staff 68 Jul 15 15:41 svn.username
drwxr-xr-x 2 jeremyfelt staff 68 Jul 15 15:41 svn.ssl.client-passphrase
drwxr-xr-x 2 jeremyfelt staff 68 Jul 15 15:41 svn.simple
drwxr-xr-x 3 jeremyfelt staff 102 Aug 11 12:07 svn.ssl.server
../auth $ cd svn.ssl.server/
../auth/svn.ssl.server $ ls -lrt
git-repo-root/
.git/
.gitmodules/ # aware of www/wordpress/ submodule, not aware of wp-cli
www/
wordpress/
.git/
wp-cli/
.git/
.gitignore # has www/wp-cli listed
<?php
class WSU_WP_Admin_Bar extends WP_Admin_Bar {
}
add_filter( 'wp_admin_bar_class', function() { return 'WSU_WP_Admin_Bar'; } );