Skip to content

Instantly share code, notes, and snippets.

@pmcgriff
pmcgriff / editor.css
Created December 9, 2016 15:46 — forked from Hendrixer/editor.css
VS code custom CSS for theme
.composite-title, .composite-title, .vs-dark .monaco-workbench>.activitybar>.content {
background-color: rgba(40, 44, 52, 1) !important;
}
.tabs-container, .tab, .tab.active, .title-actions, .tablist, .tabs-container, .tabs, .composite.title {
background-color: rgba(40, 44, 52, 1) !important;
}
.tab.active, .tab {
border-right: 0px !important;
/**
* Convert html into correct element
* @param html
*/
html2element: function(html) {
var attributes = {},
$template;
if (_.isString(html)) {
this.template = _.template(html);
$template = $(this.template(this.model.toJSON(), vc.templateOptions.default).trim());
@pmcgriff
pmcgriff / Inflect.php
Created February 28, 2016 20:57 — forked from tbrianjones/Inflect.php
A PHP Class for converting English words between Singular and Plural.
<?php
// original source: http://kuwamoto.org/2007/12/17/improved-pluralizing-in-php-actionscript-and-ror/
/*
The MIT License (MIT)
Copyright (c) 2015
Permission is hereby granted, free of charge, to any person obtaining a copy
@pmcgriff
pmcgriff / _wp-gravity-forms.css
Created November 18, 2015 01:15 — forked from rogeruiz/_wp-gravity-forms.css
Gravity Forms SCSS Module
$color--form-background: #fcfcfc;
$color--form-text: #333;
$color--form-border: #e5e4e4;
$color--radio-checkbox: #555;
$color--blue: blue;
$color--pink: pink;
$color--red: red;
$color--validation: $color--red;
$color--required: $color--red;
$color--error: $color--red;
@pmcgriff
pmcgriff / media-queries.scss
Created November 13, 2015 19:04 — forked from sanderson/media-queries.scss
Simple SCSS Media Query Template
// Upper and Lower Ends
$sm-upper: "(max-width: 40em)"; /* 640px */
$md-lower: "(min-width: 40.063em)"; /* 641px */
$md-upper: "(max-width: 54em)"; /* 864px */
$lg-lower: "(min-width: 54.063em)"; /* 865px */
$lg-upper: "(max-width: 90em)"; /* 1440px */
// Specifications
$screen: only screen !default;
@pmcgriff
pmcgriff / button_filters.php
Created October 16, 2015 19:07 — forked from richardW8k/button_filters.php
convert the next, previous and/or submit button <input> to <button> and uses the input value to create the button text inside a <span>, this means you can set the button text by editing the form or page break settings.
<?php
/**
* Filters the next, previous and submit buttons.
* Replaces the forms <input> buttons with <button> while maintaining attributes from original <input>.
* @param string $button Contains the <input> tag to be filtered.
* @param object $form Contains all the properties of the current form.
* @return string The filtered button.
*/
add_filter( 'gform_next_button', 'input_to_button', 10, 2 );
add_filter( 'gform_previous_button', 'input_to_button', 10, 2 );
<?php
/**
* Gravity Wiz // WooCommerce Gravity Forms Product Add-ons // Process Feeds & Send Notifications
*
* Process Gravity Forms feeds on checkout for any GF-powered product in the cart. Currently supports GF Mailchimp add-on.
*
* @version 1.0
* @author David Smith <david@gravitywiz.com>
* @license GPL-2.0+
* @link http://gravitywiz.com/...
.gform_wrapper ul {
padding-left: 0;
list-style: none; }
.gform_wrapper li {
margin-bottom: 15px; }
.gform_wrapper form {
margin-bottom: 0; }
<?php
add_filter( 'gpmpn_frontend_labels', 'modify_gpmpn_frontend_labels', 10, 2 );
add_filter( 'gpmpn_frontend_labels', 'modify_gpmpn_frontend_labels', 10, 2 );
function modify_gpmpn_frontend_labels( $labels, $form ) {
$labels['backToLastPage'] = 'My Custom Button Label';
return $labels;
}
/* most field types */
.gform_wrapper input[readonly='readonly'] {
/* custom styles */
}
/* selects */
.gform_wrapper select[disabled='disabled'] {
/* custom styles */
}