Skip to content

Instantly share code, notes, and snippets.

View abchiaravalle's full-sized avatar
😀

Adam Chiaravalle abchiaravalle

😀
  • 01:58 (UTC -05:00)
View GitHub Profile
<?php
add_action('wpcf7_before_send_mail', function($contact_form) {
// Get the submission instance
$submission = WPCF7_Submission::get_instance();
if ($submission) {
// Get the mail properties
$mail = $contact_form->get_properties()['mail'];
// Add the BCC header
@abchiaravalle
abchiaravalle / elementor-fix-put-this-in-functions.php
Last active January 27, 2025 04:33 — forked from mattiasghodsian/functions.php
[Wordpress] Fix Password Protect pages with Elementor
/**
* Fix Password Protect pages with Elementor
*
* Author: Mattias Ghodsian
* Donate a cup of coffee: https://www.buymeacoffee.com/mattiasghodsian
* Donate Eth: 0xBBB96204E45D11C9799c6B12E6eE6F0d4A071Ef5
*
* @param string $content
* @return html
*/
@abchiaravalle
abchiaravalle / dynamic-ooo-new-tab-fix.html
Created December 18, 2024 16:58
Dynamic ooo extension to allow linkable grid to open in new tab
<script>
document.addEventListener("DOMContentLoaded", function () {
document.querySelectorAll("article[data-post-link]").forEach(article => {
// Clone the article to remove existing listeners
const clonedArticle = article.cloneNode(true);
article.parentNode.replaceChild(clonedArticle, article);
// Create the overlay link
const link = document.createElement("a");
link.href = clonedArticle.getAttribute("data-post-link");