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 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 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
$('.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 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
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 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 | |
class Nama_Widget_Classes extends WP_Widget { | |
/*--------------------------------------------------*/ | |
/* Constructor | |
/*--------------------------------------------------*/ | |
/** | |
* Specifies the classname and description, instantiates the widget, |
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
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 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 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 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
# 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 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
@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"; |
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
$brand-colors: | |
grey #57585b, | |
orange #d1662a, | |
purple #632f54, | |
green #5e6e63, | |
yellow #d2a732, | |
blue #006e94, | |
red #790025; | |
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
Search: Hello World | |
SELECT SQL_CALC_FOUND_ROWS wp_posts.id | |
FROM wp_posts | |
WHERE 1 = 1 | |
AND ( ( ( wp_posts.post_title LIKE '%hello%' ) | |
OR ( wp_posts.post_content LIKE '%hello%' ) ) | |
AND ( ( wp_posts.post_title LIKE '%world%' ) | |
OR ( wp_posts.post_content LIKE '%world%' ) ) ) | |
AND wp_posts.post_type IN ( 'post', 'page', 'attachment', 'product', |