This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
Gravity Perks // GP Copy Cat // Copy Label (instead of Value) | |
http://gravitywiz.com/documentation/gravity-forms-copy-cat/ | |
Instructions: | |
1. Add an HTML field to your form. | |
2. Copy and paste the entire contents of this snippet into the "Content" field setting. | |
--> | |
<script> | |
gform.addFilter( 'gppc_copied_value', function( value, $elem, data ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"AL": "Alabama", | |
"AK": "Alaska", | |
"AS": "American Samoa", | |
"AZ": "Arizona", | |
"AR": "Arkansas", | |
"CA": "California", | |
"CO": "Colorado", | |
"CT": "Connecticut", | |
"DE": "Delaware", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* 1. add function to rest_api_init hook, */ | |
/* 2. then, call register_rest_route() function */ | |
add_action( 'rest_api_init', 'define_endpoint'); | |
function define_endpoint(){ | |
register_rest_route( 'namespace', '/new/route', array( | |
'methods' => array('POST','GET','UPDATE','DELETE'), | |
'callback' => 'my_awesome_func' | |
) ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php class Sports_Bench_Team_REST_Controller extends WP_REST_Controller { | |
/** | |
* Register the routes for the objects of the controller. | |
*/ | |
public function register_routes() { | |
$namespace = 'sportsbench'; | |
$base = 'teams'; | |
register_rest_route( $namespace, '/' . $base, array( | |
array( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class PageTemplater { | |
/** | |
* A reference to an instance of this class. | |
*/ | |
private static $instance; | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<!-- meta tags, tracking pixels, links to stylesheets, fonts and scripts go here. --> | |
</head> | |
<body> | |
<!-- The rest of your HTML goes here. Oh, and by the way... This is what a HTML comment looks like! --> | |
<!-- HTML Comments are only displayed in the code, they are for communicating with yourself and others --> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// default breakpoints for UIKit | |
// https://getuikit.com/v2/docs/core.html#breakpoints | |
$breakpoints: ( | |
xsmall: 479px, | |
small: 767px, | |
medium: 959px, | |
large: 1199px, | |
xlarge: 1200px | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.selector { | |
// small screens (xsmall - small) | |
@include breakpoint(small){ | |
// add styling here | |
} | |
// medium screens (small - medium) | |
@include breakpoint(medium){ | |
// add styling here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
box-shadow: inset 0px 1px 3px rgba(0,0,0,.5); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var data = []; | |
jQuery.map(obj , function (n, i) { | |
data[n.name] = n.value; | |
}); |
OlderNewer