Skip to content

Instantly share code, notes, and snippets.

View bamadesigner's full-sized avatar

Rachel Cherry bamadesigner

View GitHub Profile
@mathetos
mathetos / plugin.php
Last active April 13, 2023 16:48
Dependent Plugin Activation/Deactivation and Alert
<?php
/*
* Dependent Plugin Activation/Deactivation
*
* Sources:
* 1. https://pippinsplugins.com/checking-dependent-plugin-active/
* 2. http://10up.com/blog/2012/wordpress-plug-in-self-deactivation/
*
*/
@jdevalk
jdevalk / logging-helper.php
Last active December 9, 2021 16:25
This little hack enables fatal error logging for your site, without creating an error log that is insanely big.
<?php
/**
* This changes logging to only log fatal errors. This file should go in your mu-plugins directory.
*/
// Set the error logging to only log fatal errors
error_reporting( E_ERROR );
// Optional: change the location of your error log, it might be wise to put it outside your WP content dir.
// If you don't change it, the default place for this log is debug.log in your WP_CONTENT_DIR.
@markjaquith
markjaquith / off-limits-when-not-home.groovy
Last active August 29, 2015 13:56
Alerts me when someone opens my office door when I'm not at home
/**
* My office is off-limits when I am gone
*
* Author: Mark Jaquith
* Date: 2014-03-01
*/
preferences {
section("Monitor this door") {
input "door", "capability.contactSensor"