#31164

Anonymous
@

I've removed wordpress heartbeat (except when editing new post) — and the Add Photo upload is not disappearing anymore! This is what I added to the function.php

function deregister_heartbeat() {
	global $my_currentpage;
	if ( $my_currentpage != 'post.php' && $my_currentpage != 'post-new.php' )
     wp_deregister_script('heartbeat');
}
add_action( 'init', 'deregister_heartbeat', 1 );