This file contains 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 | |
function glip_webhook($webhook_url,$title, $body, $activity,$icon ='' ) { | |
$json = json_encode(array('icon'=>$icon,'activity'=>$activity,'title'=>$title,'body'=>$body) ); | |
$ch = curl_init($webhook_url); | |
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); | |
curl_setopt($ch, CURLOPT_POSTFIELDS, $json); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | |
curl_setopt($ch, CURLOPT_HTTPHEADER, array( |
This file contains 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
{ | |
"activity":"Contact Us form fill", | |
"attachments":[ | |
{ | |
"fields":[ | |
{ | |
"title":"Name", | |
"value":"{{lead.First Name:default= }} {{lead.Last Name:default= }}" | |
}, | |
{ |
This file contains 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
/** | |
2 * BLOCK: wpt | |
3 * | |
4 * Registering a basic block with Gutenberg. | |
5 * Simple block, renders and saves the same content without any interactivity. | |
6 */ | |
7 | |
8 // Import CSS. | |
9 import './style.scss'; | |
10 import './editor.scss'; |
This file contains 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
const { subscribe } = wp.data; | |
if((typeof rsvpmaker_json !== 'undefined' ) && rsvpmaker_json.projected_url) { | |
let wasSavingPost = wp.data.select( 'core/editor' ).isSavingPost(); | |
let wasAutosavingPost = wp.data.select( 'core/editor' ).isAutosavingPost(); | |
let wasPreviewingPost = wp.data.select( 'core/editor' ).isPreviewingPost(); | |
// determine whether to show notice | |
subscribe( () => { | |
const isSavingPost = wp.data.select( 'core/editor' ).isSavingPost(); | |
const isAutosavingPost = wp.data.select( 'core/editor' ).isAutosavingPost(); |
This file contains 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
// context check: if this is an rsvpmaker template, this will have be available as localized data from PHP | |
if((typeof rsvpmaker_json !== 'undefined' ) && rsvpmaker_json.projected_url) { | |
let wasSavingPost = wp.data.select( 'core/editor' ).isSavingPost(); | |
let wasAutosavingPost = wp.data.select( 'core/editor' ).isAutosavingPost(); | |
let wasPreviewingPost = wp.data.select( 'core/editor' ).isPreviewingPost(); | |
// determine whether to show notice | |
subscribe( () => { | |
const isSavingPost = wp.data.select( 'core/editor' ).isSavingPost(); | |
const isAutosavingPost = wp.data.select( 'core/editor' ).isAutosavingPost(); |
This file contains 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
// context check: if this is an rsvpmaker template, this will have be available as localized data from PHP | |
if((typeof rsvpmaker_json !== 'undefined' ) && rsvpmaker_json.projected_url) { | |
let wasSavingPost = wp.data.select( 'core/editor' ).isSavingPost(); | |
let wasAutosavingPost = wp.data.select( 'core/editor' ).isAutosavingPost(); | |
let wasPreviewingPost = wp.data.select( 'core/editor' ).isPreviewingPost(); | |
// determine whether to show notice | |
subscribe( () => { | |
const isSavingPost = wp.data.select( 'core/editor' ).isSavingPost(); | |
const isAutosavingPost = wp.data.select( 'core/editor' ).isAutosavingPost(); |
This file contains 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: Change Set Password Link | |
*/ | |
//modification for rsvpmaker-for-toastmasters | |
add_filter('welcome_message_set_password','my_welcome_message_set_password',10,3); | |
function my_welcome_message_set_password ($set_password_url, $key, $user_login) { | |
//make this whatever it needs to be for your front end login function. $key is a password reset hash code |
This file contains 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 | |
//excerpt from rsvpmaker-for-toastmasters | |
function sendWelcome($user) { | |
$key = wp_generate_password( 20, false ); | |
do_action( 'retrieve_password_key', $user["user_login"], $key ); | |
// Now insert the key, hashed, into the DB. | |
if ( empty( $wp_hasher ) ) { |
This file contains 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
<script> | |
class RSVPJsonWidget { | |
constructor(divid, url, limit, morelink = '') { | |
this.el = document.getElementById(divid); | |
this.url = url; | |
this.limit = limit; | |
this.morelink = morelink; | |
let eventslist = ''; | |
fetch(url) |
This file contains 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 | |
add_action( 'init', function(){ | |
register_meta( 'post', '_demo_select', array( | |
'type' => 'string', | |
'single' => true, | |
'show_in_rest' => true, | |
'auth_callback' => function() { | |
return current_user_can('edit_posts'); | |
} | |
) ); |
OlderNewer