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
@mixin hover-state { | |
&:hover, &:active, &:focus { | |
@content; | |
} | |
} | |
a { | |
text-decoration: none; | |
@include hover-state { |
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 | |
// With dual parameters | |
function modify_query_one( $clauses, $query ) { | |
global $wpdb; | |
if ( isset( $query->query['orderby'] ) && 'color' == $query->query['orderby'] ) { | |
$clauses['join'] .= <<<SQL | |
LEFT OUTER JOIN {$wpdb->term_relationships} ON {$wpdb->posts}.ID={$wpdb->term_relationships}.object_id | |
LEFT OUTER JOIN {$wpdb->term_taxonomy} USING (term_taxonomy_id) | |
LEFT OUTER JOIN {$wpdb->terms} USING (term_id) |
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 | |
// initialize plugin | |
if ( function_exists( 'add_action' ) && function_exists( 'register_activation_hook' ) ) { | |
add_action( 'plugins_loaded', array( 'tabbed_plugin', 'get_object' ) ); | |
} | |
class tabbed_plugin | |
{ | |
// singleton class variable | |
static private $classobj = NULL; |
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
**/*.min.js | |
**/*.build.js | |
**/node_modules/** | |
**/vendor/** | |
build | |
coverage | |
cypress | |
node_modules | |
vendor |
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
emotion :+1: :-1: :clap: :heart: :sparkles: :v: :zzz: | |
icon :new: :ok: :cool: :vs: :tm: :warning: :wheelchair: :zap: :art: :bomb: :bulb: :key: :lock: :memo: :mag: | |
item :book: :gift: :moneybag: :mega: :scissors: :hammer: | |
device :computer: :iphone: :calling: :email: | |
human :cop: :runner: :feet: :fist: :punch: :lipstick: :tophat: | |
food :beer: :cake: :smoking: | |
behicle :airplane: :bike: :bus: :ski: :taxi: :train: | |
animal :bear: :fish: :octocat: | |
nature :fire: :leaves: :star: :sunny: |
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
/** | |
* http://plugins.jquery.com/project/query-object | |
* jQuery.query - Query String Modification and Creation for jQuery | |
* Written by Blair Mitchelmore (blair DOT mitchelmore AT gmail DOT com) | |
* Licensed under the WTFPL (http://sam.zoy.org/wtfpl/). | |
* Date: 2009/8/13 | |
* | |
* @author Blair Mitchelmore | |
* @version 2.1.7 | |
* |
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 | |
// Trims the_content. In place of excerpt, this allows us to output line breaks and styling | |
$post_content = get_the_content_with_formatting(); | |
// Checks the string length, if under 500 chars... | |
if (strlen($post_content) < 500){ | |
// Outputs the whole post content | |
print $post_content . '...'; | |
}else{ | |
// Output only 500 chars, but don't cut halfway through a word | |
$post_trimmed = substr($post_content, 0, strpos($post_content, ' ', 500)); |
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
<html> | |
<head> | |
<title>Google Maps Multiple Markers</title> | |
<script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script> | |
</head> | |
<body> | |
<div id="map" style="height: 400px; width: 500px;"> | |
</div> | |
<script type="text/javascript"> |
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 | |
add_filter( 'posts_clauses', 'filter_clauses', 10, 2 ); | |
/** | |
* Filtering everything. | |
* | |
* @param array $clauses Array with all parts of the query. | |
* @param WP_Query $wp_query Object. | |
* @return string |
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
javascript | |
ES6ValidationInspection | |
JSAccessibilityCheckInspection | |
JSBitwiseOperatorUsageInspection | |
JSCheckFunctionSignaturesInspection | |
JSClosureCompilerSyntaxInspection | |
JSCommentMatchesSignatureInspection | |
JSComparisonWithNaNInspection | |
JSConsecutiveCommasInArrayLiteralInspection |
OlderNewer