This file contains hidden or 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 | |
// have to add that opening tag to get syntax highlighting... ¯\_(ツ)_/¯ | |
/** | |
* Prevent update notification for plugin | |
* http://www.thecreativedev.com/disable-updates-for-specific-plugin-in-wordpress/ | |
* Place in theme functions.php or at bottom of wp-config.php | |
*/ | |
function disable_plugin_updates( $value ) { |
This file contains hidden or 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
Date: select first date | |
StartOfDateWeek: fromTimestamp(timestamp(prop("Date")) - (((day(prop("Date")) == 0) ? 7 : ((day(prop("Date")) - 1) * 24 + toNumber(formatDate(prop("Date"), "H")))) * 60 + toNumber(formatDate(prop("Date"), "m"))) * 60 * 1000) | |
WeeksFromOriginal: ceil(dateBetween(now(), prop("Date"), "days") / 7) | |
NearestDate: dateAdd(prop("Date"), prop("WeeksFromOriginal"), "weeks") | |
Whenever it's 24 hours from last event, NearestDate should update to same + 7 days. |
This file contains hidden or 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 | |
/** | |
* Plugin Name: WPForms GH Contact Smart Tag | |
* Plugin URI: | |
* Description: Use Groundhogg contact fields inside WPForms with Smart Tags. Se here for more informations about WPFOrms Smart Tags: https://wpforms.com/docs/how-to-use-smart-tags-in-wpforms/ | |
* Version: 1.0 | |
* Author: Marco Michely | |
* Author URI: https://www.michely-web-engineering.de | |
*/ | |
defined( 'ABSPATH' ) or die( 'No script kiddies please!' ); |
This file contains hidden or 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
if( function_exists('oxygen_vsb_register_condition') ) { | |
global $oxy_condition_operators; | |
// Condition to check if a URL parameter is present. | |
oxygen_vsb_register_condition('URL Param Exists', array('options'=>array(), 'custom'=>true), array('--'), 'oxy_url_param_exists_callback', 'Other'); | |
function oxy_url_param_exists_callback($value, $operator) { | |
if( isset($_GET[$value]) && $_GET[$value] ) { |
This file contains hidden or 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
addEventListener("fetch", event => { | |
event.respondWith(handleRequest(event.request)) | |
}) | |
let body = {}; | |
async function handleRequest(request) { | |
let content = "just drop if it fails...okay ?"; | |
for( var i of request.headers.entries() ) { | |
content += i[0] + ": " + i[1] + "\n"; | |
} | |
let respContent = ""; |
This file contains hidden or 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 Config Settings | |
wp config set AUTOMATIC_UPDATER_DISABLED true | |
wp config set CORE_UPGRADE_SKIP_NEW_BUNDLED true | |
# Changing Site URL to https | |
wp option get siteurl | sed "s/http:/https:/g" | xargs -I {} wp option update siteurl {} | |
wp option get home | sed "s/http:/https:/g" | xargs -I {} wp option update home {} | |
# Install themes & plugins |
This file contains hidden or 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
import { getZodConstraint, parseWithZod } from "@conform-to/zod" | |
import type { HTMLAttributes } from "astro/types" | |
import { ZodAny, z, type ZodIssue } from "zod" | |
export type Constraint = ReturnType<typeof getZodConstraint>[0] | |
export type FieldAttributes = { | |
name: string | |
value: string | |
type: NonNullable<HTMLAttributes<"input">["type"]> | |
} & Partial<Record<Lowercase<keyof Constraint>, any>> |
OlderNewer