Skip to content

Instantly share code, notes, and snippets.

View KINKCreative's full-sized avatar

Klemen KINKCreative

  • Los Angeles, CA
View GitHub Profile
@KINKCreative
KINKCreative / gist:972ef0560d15e6f6f857
Created August 25, 2015 20:33
Pangolin style.css
/* PREVIOUS LINE
body.woocommerce ul.tabs li.active a,
body.woocommerce #content-area div.product .woocommerce-tabs ul.tabs li:last-child a {
/* border: 2px solid #000;*/
}
*/
/* START UPDATE 2015 - 1 */
// Line 2193
jQuery(".dc-variable-tab-link").click(function() {
dc_activate_tab(jQuery(this));
});
jQuery('body').on('click', '.dc-variable-tab-link', function(e) {
dc_activate_tab(jQuery(this));
});
@KINKCreative
KINKCreative / gist:ddd012faeed4f1f6cabd
Last active August 29, 2015 14:28
Pangolin - Category Accordion - Final
function category_accordion() {
?>
<?php
$args = array(
'number' => $number,
// 'orderby' => 'menu_order',
// 'order' => 'ASC',
@KINKCreative
KINKCreative / gist:a7aa1d1efec5a43db5ee
Created August 18, 2015 22:29
SilverStripe Gists
// REGEX FOR AN URL FIELD
$link = TextField::create("Link","Link (optional) e.g. http://example.com")->setAttribute("pattern", "http?://.+")
@KINKCreative
KINKCreative / gist:17f6cccf2a93d4878577
Created August 12, 2015 10:48
dc_woocommerce.php
<?php
/**
* Add new register fields for WooCommerce registration.
*
* @return string Register fields HTML.
*/
if ( ! function_exists( 'woocommerce_simple_add_to_cart_2' ) ) {
@KINKCreative
KINKCreative / gist:db7acdf999ec33309500
Last active August 29, 2015 14:26
PageSlugTemplate Controller Extension
<?php
// This extension allows for URLSegment-based layouts
// Inspired by how Wordpress handles templates
// e.g. For mysite.com/testurl
// it gives priority to the Page-testurl.ss template if it exists
// Code submitted by <Klemen Novak/klemen@designcollective.io>
class PageSlugTemplate_ControllerExtension extends Extension {
@KINKCreative
KINKCreative / gist:5987558244a6509f2935
Created May 29, 2015 18:52
Vide Switch to Fullscreen and Back Logic
var videoController = {
videoData: {},
videoInstance: {},
videoWrapper: {},
startHeight: null,
//TODO: videURl should not be hardcoded
"init": function () {
if( $(".slides .present[data-video='1']").length>0 || $(".hero-unit[data-video='1']").length>0 ) {
@KINKCreative
KINKCreative / gist:b94831770605e1f39645
Created May 1, 2015 00:31
DesignCollective SSH Keys
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDRk0/sswqX421CuZlWRo1390ffsuVnwvOw2oSY/YoAtxU3b9VvMXn6lOmzQazrviqIjTStMtfBGLz+9MiLDpjkFu+ULK/4UCLlxSWAycWU5HEEXIqvfRBAH9T0cveS1NKmU6IBG3QR+IKylYbbEumgaglQ8pkHtabI7U9ZGTIteD0+A55pkCFGnbGUoSI5QgCeuZdK0rOPIObXM6/s2dFJ/xhXUCdiVFIYnvCKriCep4HbFVbeIRo98vbgFCJUaYtw8FgDYwzB6NXi05TziwS7nVhH6Jn99ab4Ol/UcTpNdljy5wkbMpP2GYXoRNK1OucHkD+siH/D/sUWSO7BKG/h rodrigo@designcollective.io
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA1+6VeQ7cthpHXW7U8FeRYp1VYJi5JMCX9Q3/puy6OlCX9AP7L86BQCLdVKi0Ynv5GegSVI9Yr2P9JctyDy6/bXLdOQHl6noN6/Ska18Bd9xS5xdDhJqxBhyzcO8m+1ycPrcxp9aVuMtr2LyLWiBx7uUh2vU9nNl2v5ImrlKgZKOiQ2nd8VbPtCoCHXCMXMRMbSgqjR4DiG7e+b87XN4g8Rc1ivxBE1tx8/19WyC2PqO6iPnd6LXQurcuJPIXad5NZWLZ1gfU+xXcQGDmpKQtHsCRNN5d0jJjem+TuczSYskes4uyTb3Ovhtl73dTSnAp5xKvvXI3rTaICJZQXcszRQ== klemen@designcollective.io
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDheiwpgWBtCVmxxOyMWr9qjGY1xr8W4q8qhSrmLgjOOU2LHCvVYwlRvThDZVCB6olWH7i4VAdAxAdw4YD4KUFjuQhCe4HQMI0lU/MjD/aZFcDDsDEHS8yhHQRVr5isnt12kK3O1huSu5RaD7au4kGmg0D1x4b649FQMiSdnRQ
@KINKCreative
KINKCreative / gist:423b1c3907b34356fd4d
Created April 5, 2015 18:06
Add Advanced Custom Fieds into Theme
<?php
/*
CUSTOM FIELDS
*/
// Customize ACF path
add_filter('acf/settings/path', 'my_acf_settings_path');
@KINKCreative
KINKCreative / gist:b5186e1532dc2f2d4f95
Created February 12, 2015 01:22
WP Mailchimp form for use with Bootstrap
<p>
<input type="email" id="mc4wp_email" class="form-control" name="EMAIL" placeholder="Your email address" required />
</p>
<p>
<input type="submit" class="btn btn-primary" value="Sign up" />
</p>