Skip to content

Instantly share code, notes, and snippets.

View bdeleasa's full-sized avatar

Brianna Deleasa bdeleasa

View GitHub Profile
@bdeleasa
bdeleasa / wp-admin-menu-fix.php
Created September 9, 2015 12:43
Fixes an issue with Wordpress 4.3 doing some funky things in Chrome.
<?php
add_action('admin_enqueue_scripts', 'hudsonawning_chrome_fix');
/**
* Fixes an issue with the admin menu doing funky things in Chrome.
* It's rather annoying.
*
* @param none
* @return none
*/
function hudsonawning_chrome_fix() {
@bdeleasa
bdeleasa / gravityforms-wpbe-fix.php
Last active August 30, 2022 13:32
Wordpress plugin that fixes an issue with WP Better Emails not being able to format Gravity Forms email notifications.
<?php
/**
* Plugin Name: Gravity Forms - WPBE Email Fix
* Plugin URI: https://gist.github.com/bdeleasa/d3bff35069a9a025c82a
* Description: Wordpress mu-plugin which fixes an issue with WP Better Emails not being able to format Gravity Forms email notifications.
* Version: 1.0.0
* Author: Brianna Deleasa
* Author URI: https://briannadeleasa.com
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
@bdeleasa
bdeleasa / wp-disable-canonical-url-redirection.php
Created April 12, 2016 18:38
Disable Canonical URL Redirection WP Plugin
<?php
/*
Plugin Name: Disable Canonical URL Redirection
Description: Disables the "Canonical URL Redirect" features of WordPress 2.3 and above.
Version: 1.0
Author: Brianna Deleasa
Author URI: http://chooserethink.com
*/
remove_filter('template_redirect', 'redirect_canonical');
@bdeleasa
bdeleasa / wp-domain-masking.php
Created April 14, 2016 15:19
Wordpress plugin that removes the X-Frame-Options header to allow for domain masking.
<?php
/**
* The plugin bootstrap file
*
* This file is read by WordPress to generate the plugin information in the plugin
* admin area. This file also includes all of the dependencies used by the plugin,
* registers the activation and deactivation functions, and defines a function
* that starts the plugin.
*
* @link http://example.com
@bdeleasa
bdeleasa / dequeue-easy-testimonials-scripts-styles.php
Created August 25, 2016 13:39
Functions for dequeueing unneeded scripts and styles outputted by the Easy Testimonials plugin.
<?php
add_action( 'wp_enqueue_scripts', 'themename_dequeue_easy_testimonials_style', 999 );
/**
* Removes the Easy Testimonials CSS style because we're styling the testimonials
* in our stylesheet.
*
* @since 1.0.0
*
* @param none
@bdeleasa
bdeleasa / upw-query-only-posts-with-featured-image.php
Created September 4, 2016 18:02
Filter the Ultimate Posts Widget posts to only include posts with a featured image.
@bdeleasa
bdeleasa / the-events-calendar-show-all-events.php
Last active February 22, 2021 18:11
Modifies the event archive provided by The Events Calendar plugin to include both present and past events.
<?php
/**
* The plugin bootstrap file
*
* This file is read by WordPress to generate the plugin information in the plugin
* admin area. This file also includes all of the dependencies used by the plugin,
* registers the activation and deactivation functions, and defines a function
* that starts the plugin.
*
* @link http://example.com
@bdeleasa
bdeleasa / search-filter-only-posts.php
Created December 13, 2016 15:59
Wordpress plugin that filters the Wordpress search results to show only posts, no other post types.
<?php
/**
* The plugin bootstrap file
*
* This file is read by WordPress to generate the plugin information in the plugin
* admin area. This file also includes all of the dependencies used by the plugin,
* registers the activation and deactivation functions, and defines a function
* that starts the plugin.
*
* @since 1.0.0
@bdeleasa
bdeleasa / dequeue-upw-styles.php
Created January 23, 2017 19:06
Dequeues the default stylesheet from the Ultimate Posts Widget plugin.
<?php
add_action( 'wp_enqueue_scripts', 'themename_dequeue_upw_styles', 999 );
/**
* Dequeues the default stylesheet from the Ultimate Posts Widget plugin.
*
* We're going to style the widget ourselves, so instead of loading and
* overriding unnecessary styles, we're just going to remove the stylesheet.
*
* @since 1.0.0
*
@bdeleasa
bdeleasa / dequeue-easy-testimonials-scripts.php
Created February 12, 2017 17:11
Dequeues the default styles provided by the Easy Testimonials plugin.
<?php
add_action( 'wp_enqueue_scripts', 'themename_dequeue_easy_testimonials_scripts' );
/**
* Dequeues the default styles provided by the Easy Testimonials plugin.
*
* We're styling the widgets and posts ourselves, so we don't need their
* extra stylesheet.
*
* @since 1.0.0