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
var wakaTimer; | |
function blurWindow(){ | |
wakaTimer = setInterval(function(){ | |
handleAction(true); | |
}, 5e3); | |
} | |
function setupEventListeners() { | |
MainViewManager.on('currentFileChange', function () { |
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
/* | |
/wp-content/plugins/quick-featured-images/admin/class-quick-featured-images-tools.php after line 609 | |
*/ | |
$fimg_post_types = get_post_types( array( | |
'_builtin' => false | |
) ); //get post types | |
foreach ( $fimg_post_types as $fi_cpt ) { | |
if( post_type_exists( $fi_cpt ) ) { |
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
// Vertical align inside DIV | |
// <span class="valign">Some content</span> | |
// <span class="vfix"></span> | |
.valign {display: inline-block;vertical-align: middle; max-width: 98%} | |
.vfix {display: inline-block;height: 100%;vertical-align: middle;width: 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 | |
/* Wordpress Custom Search by title, ACF, post_meta */ | |
// Wordpress ?s= redirect to /search/ | |
function wpa_search_redirect() { | |
global $wp_rewrite; | |
if (!isset($wp_rewrite) || !is_object($wp_rewrite) || !$wp_rewrite->using_permalinks()) { return; } | |
$search_base = $wp_rewrite->search_base; | |
if (is_search() && !is_admin() && strpos($_SERVER['REQUEST_URI'], "/{$search_base}/") === false) { | |
wp_redirect(home_url("/{$search_base}/" . urlencode(get_query_var('s')))); |
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
//gallery scroll | |
var gScroll = $('#gallery .row .gscroll'); | |
function gLoop(){ | |
var gHeight = gScroll.height() - $('#gallery').height(), | |
gTop = parseInt(gScroll.position().top * -1, 10); | |
if(gTop <= gHeight) { | |
gScroll.stop().animate({top:'-=10'}, 25, 'linear', gLoop); | |
} |
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
// Custom JS | |
var catConfig = { | |
hideControlOnEnd: true, | |
adaptiveHeight: true, | |
infiniteLoop: false, | |
useCSS: false, | |
prevText: '', | |
nextText: '', | |
pager: false, | |
speed: 350 |
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
$green: #008744; | |
$blue: #0057e7; | |
$red: #d62d20; | |
$yellow: #ffa700; | |
// scaling... any units | |
$width: 30px; | |
.showbox { | |
-webkit-transition: all .5s ease; |
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($){ | |
$.fn.extend({ | |
donetyping: function(callback,timeout){ | |
timeout = timeout || 1e3; // 1 second default timeout | |
var timeoutReference, | |
doneTyping = function(el){ | |
if (!timeoutReference) return; | |
timeoutReference = null; | |
callback.call(el); | |
}; |
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 | |
$tax = 'YOUR_TAX_HERE'; | |
$cpt = 'YOUR_CPT_HERE'; | |
$count = 3; | |
$types = get_terms(array( | |
'taxonomy' => $tax, | |
'hide_empty' => false, | |
'parent' => 0 | |
)); | |
$arr = 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
<?php | |
/* | |
1.- Create an App. | |
2.- Go to: https://developers.facebook.com/tools/explorer/ | |
+ Select your new created app on the right top. | |
+ Select "Get App Token" |
OlderNewer