Skip to content

Instantly share code, notes, and snippets.

Simon Prosser Pross

Block or report user

Report or block Pross

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View wp-query-ref.php
// This gist is now maintained on github at
* WordPress Query Comprehensive Reference
* Compiled by luetkemj -
* Source:
View bb-global-js-reset.php
Plugin Name: Beaver Builder Global JS Reset
Description: Resets global JS and self deactivates.
Author: <Simon>
Version: 1.0
class BB_Global_JS_Reset {
function __construct() {
include_once ABSPATH . '/wp-admin/includes/plugin.php';
View gist:ae7f81249c5f61b33fd06c2a35284ad9

Allow Beaver Builder to update to 2.2 from 2.1 before auto updates are enabled.

To start with auto updates are disabled when 2.2 is released and you have to update manually by downloading the zip from your account area. With this simple file edit you can let WP do the update as if auto updates were enabled.

!Caution! Please make sure you do a backup before ANY WP plugin updates

View jquery.paste_image_reader.js
// Created by STRd6
// MIT License
// jquery.paste_image_reader.js
(function($) {
var defaults;
$.event.fix = (function(originalFix) {
return function(event) {
event = originalFix.apply(this, arguments);
if (event.type.indexOf('copy') === 0 || event.type.indexOf('paste') === 0) {
event.clipboardData = event.originalEvent.clipboardData;
JeremyEnglert / beaver.php
Last active Oct 2, 2019
Set BeaverBuilder as Default Editor
View beaver.php
// Sets Beaver Builder as the default editor.
function make_beaver_builder_default( $post_ID, $post, $update ) {
if ( ! $update ) {
update_post_meta( $post_ID, '_fl_builder_enabled', true );
add_action( 'wp_insert_post', 'make_beaver_builder_default', 10, 3 );
Pross / js.js
Created Jan 21, 2019
How to paste random jQuery from the internet.
View js.js
// This runs on ready function
// Add Copy+Pasta here
Pross / functions.php
Created Jul 17, 2018
Font Awesome Five.
View functions.php
add_action( 'wp_enqueue_scripts', function() {
wp_enqueue_style( 'font-awesome-5' );
} );
mikejolley / ipn-test.php
Last active Jan 2, 2019
Quick snippet/plugin/dropin to test IPN support
View ipn-test.php
* Plugin Name: PayPal Sandbox IPN Tester
* Description: Pings the IPN endpoint to see if your server can connect. Just head to <a href="/?ipn-test=1"></a> whilst logged in as admin.
* Version: 1.0.0
* Author: WooThemes
* Requires at least: 4.1
* Tested up to: 4.3
if ( ! defined( 'ABSPATH' ) ) {
markjaquith / .all
Last active Oct 10, 2018
Bash stuff
View .all
for f in ~/Dropbox/bash/*; do source $f; done
markjaquith / activate-deactivate-uninstall-example.php
Created Mar 6, 2011
Example code for doing activate/deactivate/uninstall hooks in a WordPress plugin
View activate-deactivate-uninstall-example.php
// Change /*CUSTOMIZE_THIS*/ to a unique name (two places). Go ahead, make it long.
// Like, your initials, and your full plugin name.
// e.g. MTJ_Some_Awesome_Plugin_Controller
class /*CUSTOMIZE_THIS*/_Controller {
function init() {
You can’t perform that action at this time.