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 | |
/** | |
* 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( |
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
GITDIR='remote'; echo ssh://${USER}@${HOSTNAME}:${PWD}/${GITDIR}.git |
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
/** | |
* detect a click outside of an element and trigger callbacks based on that click. | |
* @param trigger | |
* @param element | |
* @param openCallback | |
* @param closeCallback | |
*/ | |
function DetectClickOutsideOfElement (trigger, element, openCallback, closeCallback) { | |
var enabled = false; |
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 getPositionFromBottom(element) { | |
return $(document).height() - element.offset().top - element.outerHeight() | |
} |
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
doctrine: | |
dbal: | |
option: | |
# This is PDO::MYSQL_ATTR_LOCAL_INFILE | |
1001: true |
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
// Create RewriteRule from given variables | |
function createRewriteString(oldUrl, newUrl, removeDomainPrefix) { | |
return 'RewriteRule ^' + oldUrl.replace(removeDomainPrefix, '') + '/?$ ' + newUrl + ' [NC,L,R=301]' | |
} | |
// Url to path mapping. Seperated by one space. | |
const urls = `http://example.com/foo/bar /bar/foo | |
http://example.com/foo/baz /baz/foo` | |
// Split by line break |
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 count_posts($language_code = '', $post_type = 'post', $post_status = 'publish'){ | |
global $sitepress, $wpdb; | |
//get default language code | |
$default_language_code = $sitepress->get_default_language(); | |
//adjust post type to format WPML uses | |
switch($post_type){ | |
case '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
$('html').attr('class') | |
.split(' ') | |
.filter( function (word) { | |
return word.match(/wf-(.*)-active/g); } | |
) | |
.forEach( function (font) { | |
console.log(font.replace(/wf-|-active/g, '')) | |
}) |
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
.swiper-container { | |
position: relative; | |
overflow: hidden; | |
width: 100%; | |
} | |
.swiper-wrapper { | |
position: relative; | |
width: 10000%; | |
} |
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
filetype plugin indent on | |
syntax on |
OlderNewer