Windows Subsystem 2 for Linux, Hyper, ZSH + Oh My Zsh + Powerlevel9k + plugins, FNM + VSCode (+ext) and Nerd Font
To setup native Linux, see this gist
import { | |
add, | |
eachMonthOfInterval, | |
endOfYear, | |
format, | |
isEqual, | |
isFuture, | |
parse, | |
startOfMonth, | |
startOfToday, |
<?php | |
add_filter( | |
'forminator_cform_render_fields', | |
function( $wrappers, $model_id ) { | |
if( $model_id != 1441 ){ | |
return $wrappers; | |
} | |
$select_fields_data = array( |
<?php | |
/** | |
* Plugin Name: [Forminator Pro] - Make an AJAX request upon an input | |
* Plugin URI: https://premium.wpmudev.org/ | |
* Description: Send an AJAX request when an input is filled (as of 1.11.3) | |
* Author: Alessandro Kaounas @ WPMUDEV | |
* Author URI: https://premium.wpmudev.org/ | |
* Task: 0/1135022585412927/1164144055767340 | |
* License: GPLv2 or later | |
*/ |
Windows Subsystem 2 for Linux, Hyper, ZSH + Oh My Zsh + Powerlevel9k + plugins, FNM + VSCode (+ext) and Nerd Font
To setup native Linux, see this gist
<?php | |
/** | |
* Plugin Name: Forminator | |
* Description: Limit form submissions per IP for 24 hours. | |
* Author: Konstantinos Xenos @ WPMUDEV | |
* Author URI: https://premium.wpmudev.org | |
* License: GPLv2 or later | |
*/ |
"use strict"; | |
// Load plugins | |
const autoprefixer = require("autoprefixer"); | |
const browsersync = require("browser-sync").create(); | |
const cp = require("child_process"); | |
const cssnano = require("cssnano"); | |
const del = require("del"); | |
const eslint = require("gulp-eslint"); | |
const gulp = require("gulp"); |
<?php | |
/** | |
* Estimates the reading time for a given piece of $content. | |
* | |
* @param string $content Content to calculate read time for. | |
* @param int $wpm Estimated words per minute of reader. | |
* | |
* @returns int $time Esimated reading time. | |
*/ | |
function prefix_estimated_reading_time( $content = '', $wpm = 300 ) { |
select | |
p.ID as order_id, | |
p.post_date, | |
max( CASE WHEN pm.meta_key = '_billing_email' and p.ID = pm.post_id THEN pm.meta_value END ) as billing_email, | |
max( CASE WHEN pm.meta_key = '_billing_first_name' and p.ID = pm.post_id THEN pm.meta_value END ) as _billing_first_name, | |
max( CASE WHEN pm.meta_key = '_billing_last_name' and p.ID = pm.post_id THEN pm.meta_value END ) as _billing_last_name, | |
max( CASE WHEN pm.meta_key = '_billing_address_1' and p.ID = pm.post_id THEN pm.meta_value END ) as _billing_address_1, | |
max( CASE WHEN pm.meta_key = '_billing_address_2' and p.ID = pm.post_id THEN pm.meta_value END ) as _billing_address_2, | |
max( CASE WHEN pm.meta_key = '_billing_city' and p.ID = pm.post_id THEN pm.meta_value END ) as _billing_city, | |
max( CASE WHEN pm.meta_key = '_billing_state' and p.ID = pm.post_id THEN pm.meta_value END ) as _billing_state, |
<?php // do not copy this line | |
/** | |
* add_new_topic_hooks will add a new webhook topic hook. | |
* @param array $topic_hooks Esxisting topic hooks. | |
*/ | |
function add_new_topic_hooks( $topic_hooks ) { | |
// Array that has the topic as resource.event with arrays of actions that call that topic. |