This file contains hidden or 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
| function user_is_role($role) { | |
| $userId = get_current_user_id(); | |
| $userData = get_userdata($userId); | |
| return isset($userData->caps[$role]); | |
| } |
This file contains hidden or 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
| .social-icon { | |
| position:relative; | |
| display:block; | |
| opacity:0.8; | |
| @include transition(opacity $trans-speed $trans-ease); | |
| &:hover { | |
| opacity: 1; | |
| } |
This file contains hidden or 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
| // Requires imagesLoaded.js | |
| // https://github.com/desandro/imagesloaded | |
| $('html').imagesLoaded( function() { | |
| var mobileWidth = 600; | |
| var i = 0; | |
| var selector = ''; | |
| var bgUrl = ''; | |
| if ( $(window).width() > mobileWidth ) { |
This file contains hidden or 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
| @include fontFace ("Property Name", "font-folder/filename-without-ext"); |
This file contains hidden or 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
| // Custom Excerpt Limits | |
| // http://www.wpexplorer.com/custom-excerpt-lengths-wordpress/ | |
| function excerpt($limit) { | |
| $excerpt = explode(' ', get_the_excerpt(), $limit); | |
| if (count($excerpt)>=$limit) { | |
| array_pop($excerpt); | |
| $excerpt = implode(" ",$excerpt).'...'; | |
| } else { | |
| $excerpt = implode(" ",$excerpt); | |
| } |
This file contains hidden or 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
| li { | |
| @for $i from 1 through 30 { | |
| &:nth-of-type(#{$i}) { | |
| @include transition-delay(#{$i * 100}ms); | |
| } | |
| } | |
| } |
This file contains hidden or 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
| function getDistanceFromLatLonInKm(lat1,lon1,lat2,lon2) { | |
| var R = 6371; // Radius of the earth in km | |
| var dLat = deg2rad(lat2-lat1); // deg2rad below | |
| var dLon = deg2rad(lon2-lon1); | |
| var a = Math.sin(dLat/2) * Math.sin(dLat/2) + Math.cos(deg2rad(lat1)) * Math.cos(deg2rad(lat2)) * Math.sin(dLon/2) * Math.sin(dLon/2); | |
| var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a)); | |
| var d = R * c; // Distance in km | |
| return d; | |
| } |
This file contains hidden or 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
| print_r( $wp_query->query_vars ); |
This file contains hidden or 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 left-col($width: '68%') { | |
| float:left; | |
| width:#{$width}; | |
| @include clearfix; | |
| @include breakpoint(narrowColumn) { | |
| float:none; | |
| width:100%; | |
| } | |
| } |