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
"use strict"; | |
// . . . . | |
// ,`,`,`,`, | |
//. . . . `\`\`\`\; | |
//`\`\`\`\`, ~|;!;!;\! | |
// ~\;\;\;\|\ (--,!!!~`! . | |
//(--,\\\===~\ (--,|||~`! ./ | |
// (--,\\\===~\ `,-,~,=,:. _,// | |
// (--,\\\==~`\ ~-=~-.---|\;/J, |
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 get_video_thumbnail( $src ) { | |
$url_pieces = explode('/', $src); | |
if ( $url_pieces[2] == 'vimeo.com' ) { // If Vimeo | |
$id = $url_pieces[3]; | |
$hash = unserialize(file_get_contents('http://vimeo.com/api/v2/video/' . $id . '.php')); | |
$thumbnail = $hash[0]['thumbnail_large']; | |
} elseif ( $url_pieces[2] == 'www.youtube.com' ) { // If Youtube | |
$extract_id = explode('?', $url_pieces[3]); | |
$watchid = $extract_id[1]; |
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 | |
$number_of_posts_per_page = 9; | |
$initial_offset = 1; | |
$paged = ( get_query_var('page') ) ? get_query_var('page') : 1; | |
// Use paged if this is not on the front page | |
$number_of_posts_past = $number_of_posts_per_page * ($paged - 1); | |
$off = $initial_offset + (($paged > 1) ? $number_of_posts_past : 0); |
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 | |
$id = get_post_thumbnail_id(); | |
$size = 'medium'; | |
$img_src = wp_get_attachment_image_url( $id, $size ); | |
$img_srcset = wp_get_attachment_image_srcset( $id, $size ); | |
$title = get_post($id)->post_title; | |
$alt = get_post_meta($id, '_wp_attachment_image_alt')[0]; | |
?> | |
<img src="<?php echo esc_url( $img_src ); ?>" | |
srcset="<?php echo esc_attr( $img_srcset ); ?>" |
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 | |
$counter = 0; | |
while ( have_posts() ) : the_post(); | |
$counter++; | |
if ($counter === 1) { | |
echo '<div class="row">';//start the row | |
} | |
echo '<div class="col-sm-__NAME__">';//start the col// | |
get_template_part( 'template-parts/content', 'page' ); |
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
if ( is_home() && ! in_the_loop() ) { | |
$ID = get_option('page_for_posts'); | |
} elseif ( is_post_type_archive()) { | |
$query = get_queried_object(); | |
$slug = $query->name; | |
$pageobj = get_page_by_title($slug); | |
$ID = $pageobj->ID; | |
} else { | |
$ID = get_the_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
/*! | |
♡♡♡♡♡♡♡♡♡♡♡ | |
♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥ | |
Async functionality | |
♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥ | |
♡♡♡♡♡♡♡♡♡♡♡ | |
*/ | |
$(document).on('click', '#page a:not([target="_blank"]):not([href="#"]):not(.btn), [href^="/"]', function (e) { | |
var $this = $(this), | |
$page = $this.attr('href'), |
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
/*! | |
♡♡♡♡♡♡♡♡♡♡♡ | |
♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥ | |
Parallax functionality | |
♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥ | |
♡♡♡♡♡♡♡♡♡♡♡ | |
*/ | |
$('.parallax').on('mouseover', function () { | |
$(this).css('z-index', '99'); |
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
/*! | |
♡♡♡♡♡♡♡♡♡♡♡ | |
♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥ | |
store viewport height for mobile | |
♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥♥ | |
♡♡♡♡♡♡♡♡♡♡♡ | |
*/ | |
// First we get the viewport height and we multiple it by 1% to get a value for a vh unit | |
let vh = window.innerHeight; | |
let currentWidth = window.innerWidth; |
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
/* Generated with http://k88hudson.github.io/syntax-highlighting-theme-generator/www */ | |
/* http://k88hudson.github.io/react-markdocs */ | |
/** | |
* @author k88hudson | |
* | |
* Based on prism.js default theme for JavaScript, CSS and HTML | |
* Based on dabblet (http://dabblet.com) | |
* @author Lea Verou | |
*/ | |
/********************************************************* |