Skip to content

Instantly share code, notes, and snippets.

View trishasalas's full-sized avatar

Trisha Salas trishasalas

  • Level Access
  • Tulsa, OK
View GitHub Profile
@trishasalas
trishasalas / tribe_filter-bar_custom_filter
Created September 30, 2018 03:43 — forked from rliverman/tribe_filter-bar_custom_filter
Add a custom filter to "The Events Calendar Pro" filter bar plugin based on a taxonomy
<?php
/**
* Adding a custom filter
* A simple copy and paste of the existing Category filter
* Find this new filter in: WP Admin > Events > Settings > Filterbar
* Docs for TribeEventsFilter: http://docs.tri.be/Filter-Bar/class-TribeEventsFilter.html
*/
class TribeEventsFilter_CustomClubs extends TribeEventsFilter {
public $type = 'select';
<?php
/**
* Plugin Name: Dev Plugins
*/
add_action( 'muplugins_loaded', function() {
// Plugins to activate automatically.
$auto_activate = [
'debug-bar/debug-bar.php',
'debug-bar-extender/debug-bar-extender.php',
@trishasalas
trishasalas / events-conditional-wrappers.php
Created April 14, 2017 02:49 — forked from jo-snips/events-conditional-wrappers.php
The Events Calendar: Basic Conditional Wrappers
<?php
/*-----------------------------------------------------------------------------------*/
/* Conditional Logic to Detect Various Event Related Views/Pages
/*-----------------------------------------------------------------------------------*/
if( tribe_is_month() && !is_tax() ) { // Month View Page
echo 'were on the month view page';
} elseif( tribe_is_month() && is_tax() ) { // Month View Category Page
@trishasalas
trishasalas / gist:83015d849a42a230bc3e520ee636bf0e
Created July 14, 2016 02:59 — forked from lloc/gist:5685040
WordPress - Add link to plugin_row_meta
<?php
define( 'PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
function my_plugin_row_meta( $plugin_meta, $plugin_file, $plugin_data, $status ) {
if ( PLUGIN_BASENAME == $plugin_file )
$plugin_meta[] = '<a href="#">Test: plugin_row_meta</a>';
return $plugin_meta;
}
add_filter( 'plugin_row_meta', 'my_plugin_row_meta', 10, 4 );
@trishasalas
trishasalas / 0_reuse_code.js
Created June 2, 2014 14:23
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
<?php
/*
Plugin Name: Nav Menu Exporter and Importer
Description: Export and Import nav menus. Requires WordPress Importer plugin
Author: hissy, megumi themes
Version: 0.1
Text Domain: nav-menu-exporter-importer
License: GPL version 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*/
<?php
add_action( 'wp_enqueue_scripts', 'enqueue_my_styles' );
function enqueue_my_styles() {
global $wp_styles;
// Load the main stylesheet
wp_enqueue_style( 'my-theme', get_stylesheet_directory_uri() . '/style.css' );
<?php
/**
* Plugin Name: Static Templates
*
* If most of your site content is in .php template files, and you're tired of
* creating new pages, assigning them page templates, creating page templates
* then doing it all over again on production, this plugin is for you.
*
* Examples:
*
@trishasalas
trishasalas / gist:2794178
Created May 26, 2012 14:42 — forked from pdewouters/gist:2464266
Genesis layouts with SCSS / Susy fluid grid
// Layout ----------------------------------------------------------------------
@include establish-baseline(16px);
#nav,
#inner,
#footer{
@include container;
width:100%;
@include padding-trailer(1);