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
import { InspectorControls } from '@wordpress/block-editor'; | |
import { PanelBody } from '@wordpress/components'; | |
import { addFilter } from '@wordpress/hooks'; | |
import {RSVPEventOrder} from './event-order'; | |
import RSVPControls from './rsvpslot'; | |
import {RSVPTaxonomyControls} from './taxonomy-controls'; | |
import RSVPControlsInheritedQuery from './rsvpslot-inherited-query'; | |
import { __ } from '@wordpress/i18n'; | |
const RSVP_VARIATION_NAME = 'rsvpmaker/rsvpmaker-loop'; |
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
/** | |
* From a block scaffolded using the Create Block utility | |
* Registers a new block provided a unique name and an object defining its behavior. | |
* | |
* @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/ | |
*/ | |
import { registerBlockType, createBlock, createBlocksFromInnerBlocksTemplate } from '@wordpress/blocks'; | |
/** | |
* Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files. |
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: Dashboard Screen for Similarweb | |
*/ | |
// see https://developer.wordpress.org/reference/ | |
add_action('admin_menu','menu_for_similarweb'); | |
function menu_for_similarweb() { | |
//anyone who can create blog posts can access this screen |
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
//adds intval sanitization | |
if(!empty($_POST['resend'])) | |
{ | |
echo '<div class="notice"><p>Resending email requesting confirmation</p></div>'; | |
$mail['from'] = get_option('admin_email'); | |
$mail['fromname'] = get_option('blogname'); | |
$mail['subject'] = 'Please confirm your subscription to the email list for '.$mail['fromname']; | |
foreach($_POST['resend'] as $id) { | |
$sql = "select email from $table where id = ".intval($id); | |
$mail['to'] = $wpdb->get_var($sql); |
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 rsvpBlockDataOutput($block, $post_id) { | |
if(empty($block)) | |
return; | |
$attrs = ($block->attrs) ? json_encode($block->attrs) : ''; | |
if(!empty($block->innerHTML) || (!empty($block->innerBlocks) && sizeof($block->innerBlocks)) ) { | |
$output = sprintf('<!-- wp:%s %s -->',$block->blockName,$attrs)."\n"; | |
if(!empty($block->innerHTML)) | |
$output .= $block->innerHTML."\n"; | |
if(!empty($block->innerBlocks) && is_array($block->innerBlocks) && sizeof($block->innerBlocks)) { |
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 my_edit_site_menu($wp_admin_bar) { | |
$args = array( | |
'parent' => 'site-editor', | |
'id' => 'theme-header', | |
'title' => __('Header / Menu','twentytwentytwo-tm'), | |
'href' => admin_url('site-editor.php?postType=wp_template_part&postId=twentytwentytwo-tm%2F%2Fheader'), | |
'meta' => array( 'class' => 'twentytwentytwo-tm') | |
); |
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 | |
/* | |
* Adds variation on a block theme's single template for custom post type | |
* called on plugin activation or after_theme_switch action | |
*/ | |
register_activation_hook( __FILE__, 'rsvpmaker_single_block_template' ); | |
add_action('after_switch_theme','rsvpmaker_single_block_template'); | |
function rsvpmaker_single_block_template() { |
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
<!-- wp:wp4toastmasters/agendaedit {"editable":"Welcome and Introductions","uid":"editable16181528933590.29714489144034184","time_allowed":"5","inline":true} /--> | |
<!-- wp:wp4toastmasters/role {"role":"Toastmaster of the Day","agenda_note":"Introduces supporting roles. Leads the meeting.","time_allowed":"4","padding_time":"5"} /--> | |
<!-- wp:wp4toastmasters/role {"role":"Ah Counter"} /--> | |
<!-- wp:wp4toastmasters/role {"role":"Timer"} /--> | |
<!-- wp:wp4toastmasters/role {"role":"Vote Counter"} /--> |
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: Multisite Hacks for MailPoet | |
Version: 1.1 | |
Description: Example but DOES NOT SEEM TO WORK WITH THE LATEST MAILPOET VERSION. My recommended alternative to MailPoet https://rsvpmaker.com/blog/2022/08/27/rsvpmaker-postmark-free-email-marketing/ | |
*/ | |
function mailpoet_site_subscribers () { | |
if(!strpos($_SERVER['REQUEST_URI'],'mailpoet')) | |
return; |
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_filter('mailpoet_newsletter_shortcode', 'mailpoet_rsvpmaker_shortcode', 10, 5); | |
function mailpoet_rsvpmaker_shortcode($shortcode, $newsletter, $subscriber, $queue, $newsletter_body) { | |
// always return the shortcode if it doesn't match your own! | |
if (!strpos($shortcode,'rsvpmaker') && !strpos($shortcode,'event_listing') ) return $shortcode; | |
global $email_context; | |
$email_context = true; | |
$shortcode = str_replace('custom:','',$shortcode); |
NewerOlder