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
/** | |
* VH and VW units can cause issues on iOS devices: http://caniuse.com/#feat=viewport-units | |
* | |
* To overcome this, create media queries that target the width, height, and orientation of iOS devices. | |
* It isn't optimal, but there is really no other way to solve the problem. In this example, I am fixing | |
* the height of element `.foo` —which is a full width and height cover image. | |
* | |
* iOS Resolution Quick Reference: http://www.iosres.com/ | |
*/ | |
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
<?php | |
function free_and_premium() { | |
vc_map( array( | |
"name" => __("Premium", "js_composer"), | |
"base" => "premium", | |
"content_element" => true, | |
"category" => "content>", | |
"show_settings_on_create" => false, | |
"params" => array( | |
// add params same as with any other content element |
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
var getCache = function(url) { | |
var supportsLocalStorage = 'localStorage' in window; | |
// Both functions return a promise, so no matter which function | |
// gets called inside getCache, you get the same API. | |
function getJSON(url) { | |
var promise = $.getJSON(url); |
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
<?php | |
/** | |
* Example programmatic registration of Advanced Custom Fields fields | |
* | |
* @see http://www.advancedcustomfields.com/resources/register-fields-via-php/ | |
*/ | |
function register_custom_acf_fields() { | |
if ( function_exists( 'acf_add_local_field_group' ) ) { |
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
var elixir = require('laravel-elixir'); | |
var gutil = require('gulp-util'); | |
// If 'gulp watch' is run | |
if (gutil.env._.indexOf('watch') > -1) { | |
// Enable watchify for faster builds | |
elixir.config.js.browserify.watchify.enabled = true |
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
<?php | |
/** | |
* custom_tinymce | |
*/ | |
function vpm_custom_tinymce( $settings ) { | |
// Define our custom formats | |
$style_formats = array( | |
array( |
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
# sass-lint config generated by make-sass-lint-config v0.1.2 | |
# | |
# The following scss-lint Linters are not yet supported by sass-lint: | |
# DisableLinterReason, ElsePlacement, PropertyCount, SelectorDepth | |
# SpaceAroundOperator, TrailingWhitespace, UnnecessaryParentReference, Compass::* | |
# | |
# The following settings/values are unsupported by sass-lint: | |
# Linter Indentation, option "allow_non_nested_indentation" | |
# Linter Indentation, option "character" | |
# Linter NestingDepth, option "ignore_parent_selectors" |
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
<?php | |
function funkshun_responsive_videos($html, $url, $attr, $post_id) { | |
return '<div class="video-wrapper">' . $html . '</div>'; | |
} | |
add_filter('embed_oembed_html', 'funkshun_responsive_videos', 99, 4); | |
?> |
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
<?php | |
/** | |
* Description | |
* | |
* @package RacingJunk | |
* @copyright 2014 Internet Brands, Inc. All Rights Reserved. | |
*/ | |
namespace InternetBrands\RacingJunk; | |
/** |
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
var touchstartX = 0; | |
var touchstartY = 0; | |
var touchendX = 0; | |
var touchendY = 0; | |
var gesuredZone = document.getElementById('gesuredZone'); | |
gesuredZone.addEventListener('touchstart', function(event) { | |
touchstartX = event.screenX; | |
touchstartY = event.screenY; |
OlderNewer