public function coreHeartbeat($location)
    {
        add_action('init', function () use ($location) {
            if ('all' === $location) {
                wp_deregister_script('heartbeat');
            } else if (OL_ZEUS_ISADMIN) {
                global $pagenow;

                if (('admin' === $location && 'post.php' !== $pagenow && 'post-new.php' !== $pagenow) ||
                    ('dashboard' === $location && 'index.php' === $pagenow)
                ) {
                    wp_deregister_script('heartbeat');
                }
            }
        }, 1);
    }
public function coreHeartbeat($location)
    {
        add_action('init', function () use ($location) {
            if ('all' === $location) {
                wp_deregister_script('heartbeat');
            } else if (OL_ZEUS_ISADMIN) {
                global $pagenow;

                if (('admin' === $location && 'post.php' !== $pagenow && 'post-new.php' !== $pagenow) ||
                    ('dashboard' === $location && 'index.php' === $pagenow)
                ) {
                    wp_deregister_script('heartbeat');
                }
            }
        }, 1);
    }
public function coreHeartbeat ( $ location ) { add_action ( 'init' , function ( ) use ( $ location ) { if ( 'all' === $ location ) { wp_deregister_script ( 'heartbeat' ) ; } else if ( OL_ZEUS_ISADMIN ) { global $ pagenow ; if ( ( 'admin' === $ location && 'post.php' !== $ pagenow && 'post-new.php' !== $ pagenow ) || ( 'dashboard' === $ location && 'index.php' === $ pagenow ) ) { wp_deregister_script ( 'heartbeat' ) ; } } } , 1 ) ; }
Remove HeartBeat scripts
Remove HeartBeat scripts