Skip to content

Instantly share code, notes, and snippets.

Berend Frique

Block or report user

Report or block Frique

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
Frique / functions.php
Created Jan 13, 2019
Clientside: conditionally disable admin theming
View functions.php
add_filter( 'clientside-is-themed', function( $bool ) {
if ( $_GET['page'] === 'my-admin-page' ) {
$bool = false;
return $bool;
} );
Frique / functions.php
Created Jan 3, 2019
WCSSM: Do not apply sales to out-of-stock products
View functions.php
add_filter( 'wcssm-applicable-sales', function( $value, $product ) {
if ( ! $product->is_in_stock() ) {
$value = null;
return $value;
}, 10, 2 );
Frique / functions.php
Last active Dec 29, 2018
wcssm woocs support
View functions.php
// Scheduled Sale Manager for WooCommerce support for Currency Switcher for WooCommerce by RealMag777
// Prevents incorrect sale price when the "Advanced > Is multiple allowed" option is enabled.
if ( class_exists( 'WOOCS' ) ) {
global $WOOCS;
add_filter( 'woocommerce_product_get_price', function( $price, $product_object ) {
global $WOOCS;
$is_manual_sale = $product_object->get_sale_price( 'edit' ) && $product_object->get_sale_price( 'edit' ) == WCSSM::get_product_sale_price( $product_object->get_sale_price( 'edit' ), $product_object );
Frique / example_fancybox-gallery.html
Created Oct 31, 2015
Etalage example: fancybox with gallery
View example_fancybox-gallery.html
Frique / functions.php
Last active Aug 29, 2015
Prevent WP update checking
View functions.php
// Tell WP everything is up to date
add_filter( 'pre_site_transient_update_core', 'le_prevent_update_checks' );
add_filter( 'pre_site_transient_update_plugins', 'le_prevent_update_checks' );
add_filter( 'pre_site_transient_update_themes', 'le_prevent_update_checks' );
function le_prevent_update_checks() {
global $wp_version;
return (object) array(
'last_checked' => time(),
View gist:b94f285ea6014398bbf6
/* Source: */
@mixin aspect-ratio($width, $height) {
position: relative;
&:before {
display: block;
content: "";
width: 100%;
padding-top: ($height / $width) * 100%;
Frique / gist:6212779
Created Aug 12, 2013
IE specific HTML classes
View gist:6212779
<!--[if lte IE 6]><html class="ie ie6 lte9 lte8 lte7"><![endif]-->
<!--[if IE 7]><html class="ie ie7 lte9 lte8 lte7"><![endif]-->
<!--[if IE 8]><html class="ie ie8 lte9 lte8"><![endif]-->
<!--[if IE 9]><html class="ie ie9 lte9"><![endif]-->
<!--[if gt IE 9]><html><![endif]-->
<!--[if !IE]><!--><html><!--<![endif]-->
View keep-focus.js
var tabbableElements = 'a[href], area[href], input:not([disabled]),' +
'select:not([disabled]), textarea:not([disabled]),' +
'button:not([disabled]), iframe, object, embed, *[tabindex],' +
function keepFocus($context){
var $allTabbableElements = $context.find(tabbableElements);
var $firstTabbableElement = $allTabbableElements.first();
var $lastTabbableElement = $allTabbableElements.last();
$context.on('keydown', function(event){
View CSS: Transitions.css
-webkit-transition: all 0.4s ease-out;
-moz-transition: all 0.4s ease-out;
-o-transition: all 0.4s ease-out;
-ms-transition: all 0.4s ease-out;
transition: all 0.4s ease-out;
View CSS: Transform: Rotate.css
-ms-transform: rotate(-1deg);
-moz-transform: rotate(-1deg);
-webkit-transform: rotate(-1deg);
-o-transform: rotate(-1deg);
transform: rotate(-1deg);
You can’t perform that action at this time.