Skip to content

Instantly share code, notes, and snippets.

@joshfeck
Last active March 7, 2017 22:28
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save joshfeck/b4aa84c0938afdec2c5d to your computer and use it in GitHub Desktop.
Save joshfeck/b4aa84c0938afdec2c5d to your computer and use it in GitHub Desktop.
DE-disallows WPEngine's disallowing of the WordPress Heartbeat API
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
add_filter( 'wpe_heartbeat_allowed_pages', 'my_wpe_add_allowed_pages' );
function my_wpe_add_allowed_pages( $heartbeat_allowed_pages ) {
$heartbeat_allowed_pages = array(
'index.php',
'admin.php',
'edit.php',
'post.php',
'post-new.php',
);
return $heartbeat_allowed_pages;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment