Skip to content

Instantly share code, notes, and snippets.

View phpbits's full-sized avatar
🎯
Focusing

Jeffrey Carandang phpbits

🎯
Focusing
View GitHub Profile
@mcsf
mcsf / my-test.php
Last active March 19, 2020 06:19
[Per Slack request] Illustrating the use of WordPress data selectors in conjunction with React hooks to react to post saving within a custom sidebar in Gutenberg. Move advanced entity-centric selectors may be used from the 'core' store instead.
<?php
/*
Plugin Name: Test
*/
function my_test_enqueue_scripts() {
wp_enqueue_style(
'my-test-style',
plugins_url( 'style.css', __FILE__ )
);
@johnbillion
johnbillion / wp_mail.md
Last active June 3, 2024 13:31
WordPress Emails

WordPress Emails

This document lists all the situations where WordPress sends an email, along with how to filter or disable each email.

This documentation has moved here: https://github.com/johnbillion/wp_mail

@cferdinandi
cferdinandi / umd-script-boilerplate.js
Last active December 10, 2023 10:23
A simple boilerplate for UMD JS modules.
(function (root, factory) {
if ( typeof define === 'function' && define.amd ) {
define([], factory(root));
} else if ( typeof exports === 'object' ) {
module.exports = factory(root);
} else {
root.myPlugin = factory(root);
}
})(typeof global !== "undefined" ? global : this.window || this.global, function (root) {