Skip to content

Instantly share code, notes, and snippets.

@mandava
mandava / customizer-links.php
Created June 23, 2017 03:01 — forked from slushman/customizer-links.php
How to link into the WordPress Customizer
@mandava
mandava / grid.js
Last active February 21, 2021 18:53
Thumbnail Grid Expanding Preview WordPress jQuery Fix
/*
* debouncedresize: special jQuery event that happens once after a window resize
*
* latest version and complete README available on Github:
* https://github.com/louisremi/jquery-smartresize/blob/master/jquery.debouncedresize.js
*
* Copyright 2011 @louis_remi
* Licensed under the MIT license.
*/
var $ = jQuery;
@mandava
mandava / 0_reuse_code.js
Created July 2, 2016 21:56
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
@mandava
mandava / social_share_count.php
Created August 27, 2015 01:57
Social Share Buttons with Count for WordPress
<?php
/**
* Social Share Buttons with Count for WordPress
*/
/**
* Performs HTTP request and returns response body with conditionally decoding json.
*
@mandava
mandava / get_forms_list.php
Last active January 4, 2017 16:19
Get Forms List for Ninja Forms, Gravity Forms and Contact Form 7 WordPress Plugins
<?php
/** Ninja Forms */
function delight_ninja_forms() {
if ( function_exists('ninja_forms_get_all_forms') ) {
$nfs = ninja_forms_get_all_forms();
}
$nforms = array( '' => __('Select a Form', 'TEXT-DOMAIN') );
if( !empty( $nfs ) ) {
foreach($nfs as $form){