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
jQuery(document).ready( function($) { | |
function send_popup( title, text, popup_class, delay ) { | |
// Initialize parameters | |
title = title !== '' ? '<span class="title">' + title + '</span>' : ''; | |
text = text !== '' ? text : ''; | |
popup_class = popup_class !== '' ? popup_class : 'update'; | |
delay = typeof delay === 'number' ? delay : 20000; | |
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 | |
function return_page_404() { | |
global $wp_query; | |
$wp_query->set_404(); | |
status_header(404); | |
} |
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
jQuery('iframe.inpagedemo').load(function () { | |
var iframe = jQuery(this); | |
jQuery(window).resize(function() { | |
iframe.height(iframe[0].contentWindow.document.body.scrollHeight + 40); | |
}); | |
jQuery(window).trigger('resize'); | |
}); |
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
backend default { | |
.host = "127.0.0.1"; | |
.port = "8080"; | |
} | |
acl purge { | |
"localhost"; | |
"127.0.0.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
<!DOCTYPE html> | |
<html class="no-js"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>MyApp</title> | |
<style> |
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 | |
/** | |
* Skip cart and redirect to direct checkout | |
* | |
* @package WooCommerce | |
* @version 1.0.0 | |
* @author Alessandro Benoit | |
*/ | |
// Skip the cart and redirect to check out url when clicking on Add to cart |
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
/** | |
* Restfulizer | |
* | |
* Restfulize any hiperlink that contains a data-method attribute by | |
* creating a mini form with the specified method and adding a trigger | |
* within the link. | |
* Requires jQuery! | |
* | |
* Ex: | |
* <a href="post/1" data-method="delete">destroy</a> |
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 | |
/** | |
* Sync roles between different WordPress Blog | |
* | |
* Tables must be inside the same schema and you have to define | |
* custom user tables on wp-config.php in the SLAVE blog as follow: | |
+ define('CUSTOM_USER_TABLE', 'myprefix_users'); | |
+ define('CUSTOM_USER_META_TABLE', 'myprefix_usermeta'); | |
* Sync is run only at the first login on the alternative blog, any following | |
* role change must be manually sync. |
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
/* Facebook fix */ | |
.fb-like span{overflow:visible !important; width:450px !important; margin-right:-375px;z-index: 999;} |
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
/** | |
* Add query args | |
*/ | |
function add_query_args(uri, params) { | |
var separator = uri.indexOf('?') !== -1 ? '&' : '?'; | |
for (var key in params) { | |
if(params.hasOwnProperty(key)){ | |
uri += separator + key + '=' + params[key]; | |
separator = '&'; | |
} |