Skip to content

Instantly share code, notes, and snippets.

@jmccall75
jmccall75 / functions.php
Last active January 9, 2024 03:15
Locking down Gutenberg...
<?php
/**
* Gutenberg Block customization for this theme.
*/
// gutenberg disable for posts
//add_filter('use_block_editor_for_post', '__return_false', 10);
// gutenberg disable for post types
//add_filter('use_block_editor_for_post_type', '__return_false', 10);
@tameemsafi
tameemsafi / emails.php
Last active April 15, 2024 12:42
Send an email programmatically in wordpress with wp_mail using the woocommerce transaction emails template.
<?php
// Define a constant to use with html emails
define("HTML_EMAIL_HEADERS", array('Content-Type: text/html; charset=UTF-8'));
// @email - Email address of the reciever
// @subject - Subject of the email
// @heading - Heading to place inside of the woocommerce template
// @message - Body content (can be HTML)
function send_email_woocommerce_style($email, $subject, $heading, $message) {