Skip to content

Instantly share code, notes, and snippets.

@BrookeDot
BrookeDot / Readme.md
Last active July 28, 2021 06:17
MACROPAD Hotkeys with Consumer Key Support
@BrookeDot
BrookeDot / wp-plugins-url.diff
Created May 20, 2018 22:23
Update WP Plugin data plugin to use new Plugin URL
Index: trunk/fergcorp_wp-plugin-data.php
===================================================================
--- trunk/fergcorp_wp-plugin-data.php (revision 1878124)
+++ trunk/fergcorp_wp-plugin-data.php (working copy)
@@ -26,6 +26,9 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+if ( ! defined( 'ABSPATH' ) ) {
+ exit; // Exit if accessed directly
@BrookeDot
BrookeDot / plugin.php
Created December 22, 2017 02:00
wp_die to admin_notice
Index: trunk/plugin.php
===================================================================
--- trunk/plugin.php (revision 1791008)
+++ trunk/plugin.php (working copy)
@@ -13,8 +13,9 @@
*/
register_activation_hook( __FILE__, 'genesis_tabs_activation_check' );
+
/**
@BrookeDot
BrookeDot / plugin.php
Created December 22, 2017 01:54
Check for genesis_get_image
Index: trunk/Index: trunk/plugin.php
===================================================================
--- trunk/plugin.php (revision 1791008)
+++ trunk/plugin.php (working copy)
@@ -144,7 +144,7 @@
echo '<div id="cat-' . $cat . '" '; post_class( 'ui-tabs-hide' ); echo '>';
- if ( ! empty( $instance['show_image'] ) ) :
+ if ( ( ! empty( $instance['show_image'] ) ) && ( function_exists( 'genesis_get_image' ) ) ) :
@BrookeDot
BrookeDot / plugin.php
Last active December 22, 2017 01:47
Genesis Tabs require Genesis on theme switch.
Index: trunk/plugin.php
===================================================================
--- trunk/plugin.php (revision 1791008)
+++ trunk/plugin.php (working copy)
@@ -144,7 +144,7 @@
echo '<div id="cat-' . $cat . '" '; post_class( 'ui-tabs-hide' ); echo '>';
- if ( ! empty( $instance['show_image'] ) ) :
+ if ( ( ! empty( $instance['show_image'] ) ) && ( function_exists( 'genesis_get_image' ) ) ) :
@BrookeDot
BrookeDot / updater.diff
Created November 19, 2017 00:00
Check if using a child theme before comparing version of GPP themes
@@ -523,8 +524,13 @@
private function get_local_version() {
if ( $this->is_theme() ) {
$theme_data = wp_get_theme();
-
- return $theme_data->Version;
+ if( $theme_data->parent() ){
+ $parent_theme_data = wp_get_theme( $theme_data->Template );
+ return $parent_theme_data->Version;
+ }
@BrookeDot
BrookeDot / led-remote.ino
Last active August 30, 2022 18:02
Particle LED Remote
/* =================================================================
* LED Remote
* (c) Brooke. 2016-2020
* This file is the firmware to be upload and ran on the photon. It makes use of the particle API.
* All original code is under the GPL v3 except where listed.
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
@BrookeDot
BrookeDot / lookbook.php
Created May 1, 2017 20:25
Jetpack's Infinite scroll to GPP Lookbook
// Current Jetpack.php file
/**
* Add theme support for Infinite Scroll.
* See: http://jetpack.me/support/infinite-scroll/
*/
function lookbook_jetpack_setup() {
add_theme_support( 'infinite-scroll', array(
'container' => 'main',
'footer' => 'page',
) );
Index: empty-blog.php
===================================================================
--- empty-blog.php (revision 1504006)
+++ empty-blog.php (working copy)
@@ -92,7 +92,11 @@
// Delete categories
if ( isset( $_POST['delete_categories'] ) && 1 == $_POST['delete_categories'] ) {
print "<h3>" . __( "Deleting categories." ) . "</h3>\n";
- $cats = get_all_category_ids();
+ $cats = get_terms( array(
Index: define.php
===================================================================
--- define.php (revision 1461678)
+++ define.php (working copy)
@@ -3,62 +3,130 @@
if (function_exists('plugin_dir_url'))
{
define('DUPLICATOR_VERSION', '1.1.15');
- define("DUPLICATOR_HOMEPAGE", "http://lifeinthegrid.com/labs/duplicator");
- define("DUPLICATOR_GIVELINK", "http://lifeinthegrid.com/partner");