Skip to content

Instantly share code, notes, and snippets.

@joshfeck
Created July 22, 2014 01:18
Show Gist options
  • Save joshfeck/1afd180884f9c603d4f5 to your computer and use it in GitHub Desktop.
Save joshfeck/1afd180884f9c603d4f5 to your computer and use it in GitHub Desktop.
This can be installed as a plugin or if you have a site specific plugin already installed you can copy the add_action and the callback function to your plugin.
<?php
/**
* @package Payment Settings Fixer
* @version 0.1
*/
/*
Plugin Name: Payment Settings Fixer
Plugin URI: https://github.com/joshfeck
Description: A little patch to fix a strange issue in some WPEngine sites' admin for the Event Espresso 3 Payment settings page
Author: Josh Feck
Version: 0.1
Author URI: https://github.com/joshfeck
*/
add_action( 'action_hook_espresso_display_gateway_settings', 'ee_display_gateway_settings_on_wpengine' );
function ee_display_gateway_settings_on_wpengine() { ?>
<script>
jQuery(document).ready(function($){
$('.postbox h3, .handlediv').click( function() {
$($(this).parent().get(0)).toggleClass('closed');
});
});
</script>
<?php }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment