Skip to content

Commit 8e48c34

Browse files
authored
Merge pull request #16 from getshifter/subdir_hb
Subdir hb
2 parents 7ef42e5 + d79992b commit 8e48c34

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

admin/class-shifter-admin.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,11 @@ public function shifter_heartbert_on_sitepreview_write_script() {
115115
<script>
116116
function shifter_heartbert_getajax() {
117117
var xhr= new XMLHttpRequest();
118-
xhr.open("GET","/wp-admin/admin-ajax.php?action=nopriv_heartbeat");
118+
xhr.open("GET","<?php echo esc_url(add_query_arg('action','nopriv_heartbeat',site_url('/wp-admin/admin-ajax.php')));?>");
119119
xhr.send();
120120
}
121-
setInterval("shifter_heartbert_getajax()", 30000);
121+
var shifterHB = setInterval("shifter_heartbert_getajax()", 30000);
122+
setTimeout(function(){clearInterval(shifterHB)}, 1500000);
122123
</script>
123124
<?php
124125
}

includes/class-shifter.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ private function define_admin_hooks() {
176176

177177
// Shifter Heartbeat.
178178
$this->loader->add_action( 'wp_footer', $plugin_admin, 'shifter_heartbert_on_sitepreview_write_script', 999 );
179+
$this->loader->add_action( 'admin_footer', $plugin_admin, 'shifter_heartbert_on_sitepreview_write_script', 999 );
179180

180181
// Shifter Mail From Helper.
181182
$this->loader->add_filter( 'wp_mail_from', $plugin_admin, 'shifter_mail_from' );

shifter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* Plugin Name: Shifter
1616
* Plugin URI: https://github.com/getshifter/shifter-wp-mu
1717
* Description: Helper functions for WordPress sites on Shifter.
18-
* Version: 1.0.10
18+
* Version: 1.0.12
1919
* Author: DigitalCube
2020
* Author URI: https://www.getshifter.io
2121
* License: GPL-2.0+

0 commit comments

Comments
 (0)