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
/* | |
* Request is to set up 301 redirects for permalink change. | |
* permalink changing from: | |
* http://vip.local/blog/2015/06/27/hello-world/ | |
* to: | |
* http://vip.local/blog/uncategorized/hello-world-1/ | |
*/ | |
// Successfully applies new url structure | |
wpcom_vip_load_permastruct( '/%category%/%postname%-%post_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
$brand-colors: ( | |
#57585b, // grey | |
#d1662a, // orange | |
#632f54, // purple | |
#5e6e63, // green | |
#d2a732, // yellow | |
#006e94, // blue | |
#790025 // red | |
); |
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
function aspectRatioRespond(){ | |
mobileMax = 480; | |
elements = jQuery('[data-ratio]'); | |
elements.each(function(){ | |
container = jQuery(this); | |
var elRatio = container.data('ratio'); | |
var elMobileRatio = ( typeof container.data('mobile-ratio') == 'string' ) ? container.data('mobile-ratio') : container.data('ratio'); | |
if(container.width() < mobileMax){ | |
autoHeight = elMobileRatio; | |
}else{ |
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
function remote_get($key, $url, $args = array(), $expiration = 604800 ){ | |
if( empty( $expiration ) ){ | |
$results = get_option( $key ); | |
}else{ | |
$results = get_transient( $key ); | |
} | |
if ( false === $results ) { | |
$response = wp_remote_get($url, $args); |
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
$('.event-gallery a').magnificPopup({ | |
type: 'ajax', | |
callbacks: { | |
close: function() { | |
// destroy the slider to avoid memory leaks | |
this.content.find('.royalSlider').data('royalSlider').destroy(); | |
} | |
} | |
}); |
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
diff --git a/app/assets/javascripts/main.js b/app/assets/javascripts/main.js | |
index 6ae41ab..98330c3 100644 | |
--- a/app/assets/javascripts/main.js | |
+++ b/app/assets/javascripts/main.js | |
@@ -12,6 +12,7 @@ jQuery(document).ready(function($) { | |
type: 'ajax', | |
ajax: { | |
settings: { | |
+ verticalFit: true, | |
dataType: '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
add_action('save_post', 'cv_on_post_update_flush_transient'); | |
add_action('admin_menu', 'cv_docs_menu'); | |
function cv_docs_menu() { | |
$page = get_stylesheet_directory() . '/doc/index.html'; | |
if( file_exists( $page ) ){ | |
add_menu_page('Theme Documentatio', 'Theme Docs', 'edit_posts', 'cv_docs', 'cv_docs_page', 'dashicons-format-aside', 200); | |
} | |
} |
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
function cv_leadin_subscribe_email( $fields ){ | |
$body = file_get_contents( get_stylesheet_directory() . '/leadin/email.html' ); | |
$replacements = array(); | |
foreach ( $fields as $field ) { | |
$brace_label = "{" . ucwords( $field['label'] ) . "}"; | |
$replacements[$brace_label] = $field['value']; | |
} | |
$body = strtr($body, $replacements); | |
return $body; |
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
# Require any additional compass plugins here. | |
# Set this to the root of your project when deployed: | |
http_path = "./" | |
css_dir = "/" | |
sass_dir = "scss" | |
images_dir = "img" | |
javascripts_dir = "js" | |
fonts_dir = "fonts" |
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
@font-face { | |
font-family: "Nexa"; | |
src: url("nexa/nexa_regular-webfont.eot?76871668"); | |
src: url("nexa/nexa_regular-webfont.eot?76871668#iefix") format("embedded-opentype"), url("nexa/nexa_regular-webfont.woff?76871668") format("woff"), url("nexa/nexa_regular-webfont.ttf?76871668") format("truetype"), url("nexa/nexa_regular-webfont.svg?76871668#rosche") format("svg"); | |
font-weight: normal; | |
font-style: normal; | |
} | |
@font-face { | |
font-family: "Nexa"; |
OlderNewer