Skip to content

Instantly share code, notes, and snippets.

@tylerzey
tylerzey / function.php
Created July 23, 2019 11:51
wp ajax for sophia
add_action('wp_ajax_testAction', 'testActionFunction');
add_action('wp_ajax_nopriv_testAction', 'testActionFunction'); // only include if non-logged in users should be able to do this
function testActionFunction(){
//You can catch variables like this
$name = !empty($_POST['name'])?$_POST['name']:'';
// You return data by echo it or by wp_send_json
echo $name;
@tylerzey
tylerzey / machine.js
Created February 2, 2022 15:18
Generated by XState Viz: https://xstate.js.org/viz
const fetchMachine = Machine({
id: 'fetch',
initial: 'c9e177d3-43cb-45b4-93ab-34371b0d317f',
context: {
retries: 0
},
states: {
"c9e177d3-43cb-45b4-93ab-34371b0d317f": {
"__typename": "XState",
@tylerzey
tylerzey / calendly-listener-and-triggers.json
Created December 18, 2024 14:47
Calendly GTM Embed Listener and Triggers
{
"exportFormatVersion": 2,
"exportTime": "2024-12-18 14:44:29",
"containerVersion": {
"path": "accounts/6260567265/containers/202414991/versions/0",
"accountId": "6260567265",
"containerId": "202414991",
"containerVersionId": "0",
"container": {
"path": "accounts/6260567265/containers/202414991",