Skip to content

Instantly share code, notes, and snippets.

View yuriitaran's full-sized avatar

Yurii Taran yuriitaran

View GitHub Profile
@yuriitaran
yuriitaran / wp-query-ref.php
Created November 7, 2017 10:08 — forked from luetkemj/wp-query-ref.php
WP: Query $args
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/3.9/src/wp-includes/query.php
*/
$args = array(
@yuriitaran
yuriitaran / jQuery.newPlugin.js
Created February 4, 2018 11:01 — forked from agragregra/jQuery.newPlugin.js
jQuery New Plugin
$.fn.myNewPlugin = function() {
return this.each(function() {
// Do something to each element here.
});
};
@yuriitaran
yuriitaran / userChrome.css
Created February 4, 2018 11:03 — forked from agragregra/userChrome.css
Firefox DevTools font size
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document regexp("chrome://browser/content/devtools/**/.*"){
.devtools-monospace {
font-size: 13pt!important;
}
}
@yuriitaran
yuriitaran / jquery-active.js
Last active February 4, 2018 11:04 — forked from agragregra/jquery-active.js
jQuery Active Menu
// Active menu
$("li a").each(function() {
if (this.href == window.location.href) {
$(this).addClass("active");
}
});
// second way
var url = window.location.pathname,
urlRegExp = new RegExp(url.replace(/\/$/,"") + "$");
@yuriitaran
yuriitaran / mfp-blurred.css
Created February 4, 2018 11:05 — forked from agragregra/mfp-blurred.css
Magnific-Popup Blurred Background
CSS:
* {
transition: filter .25s ease;
}
.mfp-wrap ~ * {
filter: blur(1px);
}
Sass:
*
@yuriitaran
yuriitaran / wordpress-get-all-fields.php
Created February 4, 2018 11:15 — forked from agragregra/wordpress-get-all-fields.php
WordPress Get All Custom Fields without _edit_lock, _edit_last, _thumbnail_id
<?php
$custom_fields = get_post_custom($post->ID);
foreach ( $custom_fields as $field_key => $field_values ) {
if(!isset($field_values[0])) continue;
if(in_array($field_key,array("_edit_lock", "_edit_last", "_thumbnail_id"))) continue;
echo "<strong>$field_key:</strong> $field_values[0] <br>";
}
<style>
/* ---------------------------------------------- /*
* Mouse animate icon
/* ---------------------------------------------- */
.mouse-icon {
border: 2px solid #000;
border-radius: 16px;
height: 40px;
width: 24px;
display: block;
@yuriitaran
yuriitaran / chrome-smooth-scroll.js
Created February 4, 2018 11:18 — forked from agragregra/chrome-smooth-scroll.js
Chrome Smooth Scroll
//Chrome Smooth Scroll
try {
$.browserSelector();
if($("html").hasClass("chrome")) {
$.smoothScroll();
}
} catch(err) {
};
<!-- HTML -->
<a href="#" class="toggle-mnu hidden-lg"><span></span></a>
<!-- SASS -->
.toggle-mnu
display: block
width: 28px
height: 28px
margin-top: 14px
@yuriitaran
yuriitaran / svgdraw.js
Created February 4, 2018 11:28 — forked from agragregra/svgdraw.js
SVG Animate
var path = document.querySelector('path');
var length = path.getTotalLength();
// Clear any previous transition
path.style.transition = path.style.WebkitTransition =
'none';
// Set up the starting positions
path.style.strokeDasharray = length + ' ' + length;
path.style.strokeDashoffset = length;
// Trigger a layout so styles are calculated & the browser
// picks up the starting position before animating