Skip to content

Instantly share code, notes, and snippets.

View manutheblacker's full-sized avatar
🎯
Focusing

Emmanuel A. manutheblacker

🎯
Focusing
View GitHub Profile
@manutheblacker
manutheblacker / wad.php
Last active December 23, 2019 06:06
How to add new rules in Conditional Discounts for WooCommerce extension ?
<?php
//Step 1 : Added of the condition "If customer ZIP code".
add_filter( "wad_get_discounts_conditions", "get_discount_rule_conditions" );
function get_discount_rule_conditions($conditions){
$conditions['customer-zip-code'] = __("If customer ZIP code", "wad");
return $conditions;
}
//Step 2 : Added of operators "Start with" and "Doesn't start with".
add_filter( "wad_operators_fields_match", "get_discount_rule_operators", 10, 3 );
function get_discount_rule_operators($operator_fields, $condition, $selected_value){
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.6.0/dist/leaflet.css"
integrity="sha512-xwE/Az9zrjBIphAcBb3F6JVqxf46+CDLwfLMHloNu6KEQCAWi6HcDUbeOfBIptF7tcCzusKFjFw2yuvEpDL9wQ=="
crossorigin=""/>
<style id="jsbin-css">
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.6.0/dist/leaflet.css"
integrity="sha512-xwE/Az9zrjBIphAcBb3F6JVqxf46+CDLwfLMHloNu6KEQCAWi6HcDUbeOfBIptF7tcCzusKFjFw2yuvEpDL9wQ=="
crossorigin=""/>
<style id="jsbin-css">
@manutheblacker
manutheblacker / jquery.ui.datepicker-fr.js
Created May 1, 2020 23:03 — forked from corsonr/jquery.ui.datepicker-fr.js
jQuery UI datepicker in French
/* French initialisation for the jQuery UI date picker plugin. */
/* Written by Keith Wood (kbwood{at}iinet.com.au) and Stéphane Nahmani (sholby@sholby.net). */
jQuery(function($){
$.datepicker.regional['fr'] = {
closeText: 'Fermer',
prevText: '&#x3c;Préc',
nextText: 'Suiv&#x3e;',
currentText: 'Aujourd\'hui',
monthNames: ['Janvier','Fevrier','Mars','Avril','Mai','Juin',
'Juillet','Aout','Septembre','Octobre','Novembre','Decembre'],
<div id='calendar'></div>
@manutheblacker
manutheblacker / gsap-404-typed-message-using-splittext.markdown
Created May 22, 2020 07:14
GSAP 404 typed message using SplitText
@manutheblacker
manutheblacker / 500-error-log-file-stack-trace-animation.markdown
Created May 22, 2020 08:07
500 Error: Log File / Stack Trace Animation

500 Error: Log File / Stack Trace Animation

This weeks code-doodle is just a little 500 error page mockup. Tried to capture the feeling of going through stack traces and lines and lines of log-files in an aesthetically pleasing way. -- wanted to mess around with css variables so likely doesn't work too well in ie :)

A Pen by Adam Quinlan on CodePen.

License.