Skip to main content

Questions tagged [heartbeat-api]

Communication between browser and WordPress per AJAX in fixed intervals.

Filter by
Sorted by
Tagged with
0 votes
1 answer
411 views

Content including hooks inside wp-settings.php are being called twice in WordPress

I found that init hook is being called twice and then I try to trace and find out wp-settings.php is also being called twice. I originally want to post a question to find out why. And after some code ...
西門 正 Code Guy - JingCodeGuy's user avatar
0 votes
0 answers
93 views

Disabled Heartbeat but i think it's still working. Is there a plugin or script to check it?

I just disabled Heartbeat with the plugin Heartbeat control and also adding this script in function.php of my child-theme add_action( 'init', 'stop_heartbeat', 1 ); function stop_heartbeat() { ...
JoJo's user avatar
  • 1
0 votes
2 answers
341 views

Wordpress Heartbeat API cannot parse data

I want to use WP-API heartbeat to open a connection to two displays and have them reflect what the other is saying with each send and tick. It used to work when the heartbeat API came out in 3.6 - ...
markb's user avatar
  • 299
3 votes
2 answers
548 views

How to link Wordpress heartbeat to ajax form

I have a form that $_POSTs an input value, and user's ID that saves the data to the database: // frontend form <form id="form"> <input type="radio" name="location" id="name1" value="1"&...
markb's user avatar
  • 299
3 votes
0 answers
111 views

How can change heartbeat hasFocus option to false

After I check heartbeat.js file I found that by default WordPress set heartbeat hasFocuse option to true, I want to change this option to false what can I do? What am I trying to achieve? I have a ...
John's user avatar
  • 31
1 vote
1 answer
824 views

How can check if heartbeat is disabled?

I want a code to check if the heartbeat is disabled from a WordPress site or not.
Mido's user avatar
  • 77
2 votes
1 answer
622 views

Why is the Ajax heartbeat included in my cached frontend pages? Is it OK to get rid of it?

I recently thought I'd protect a WP site's /wp-admin folder with Apache's basic auth to provide a crude but somewhat effective additional layer of security (as a second line of defense should the WP ...
Pekka's user avatar
  • 542
0 votes
1 answer
97 views

Is there any way to fire heartbeat API from for website visitors?

I saw that Heartbeat API is fired when someone is logged in the Wordpress. Is there any way to fire it for website visitors?
learning_13's user avatar
1 vote
1 answer
414 views

Heartbeat API NOT disabling

I’m hoping this is something easy to fix although from my tests (very new to WordPress so please go easy with me if these tests are not very good!) doesn’t appear to be. I have a site hosted on ...
Mark Bowen's user avatar
1 vote
0 answers
2k views

admin-ajax.php + load-scripts.php hanging for minutes

My issue is that when I do a simple Admin Dashboard change, like updating a post or page, I sometimes wait up to 10 minutes for the request to finish. I have tried restarting the process and my ...
David Rhoderick's user avatar
6 votes
3 answers
2k views

Stop/Pause WordPress Heartbeat using Javascript

I use the WordPress heartbeat to check a setting on my server from the front-end. If that setting has a specific value I want to stop bothering the server. There for I want to stop/pause the heartbeat....
Drivingralle's user avatar
3 votes
1 answer
213 views

Log of Heartbeat Calls

I've read that Heartbeat can slow a WP site down and I'm assuming if our admins/store managers have a lot of admin windows/tabs open, this will exacerbate the issue. If yes, is there a condition to ...
Pat Gilmour's user avatar
0 votes
0 answers
1k views

Bruteforce attack from 127.0.0.1?

I've got a very strange problem. Actually my server is being attacked by a brute force on wp-login.php. But when I look into the access log file I see that it's from 127.0.0.1... www.*.fr:80 127.0.0....
axelparatre's user avatar
3 votes
0 answers
1k views

CPU usage: AJAX and Heartbeat API on admin pages

My (shared) web host recently sent me this: "Our server monitoring systems keep indicating high server load persistently maintained by your website (...). Most of the hits are to the /www/www/wp-...
TheMediumUTM's user avatar
6 votes
1 answer
2k views

Heartbeat API long polling

I recently noticed that in Heartbeat API js client there was added option for speed of ticks called "long polling" with 0 interval. I pretty much understand what they try to achieve but I'm confused ...
user3562259's user avatar
1 vote
1 answer
362 views

Heartbeat API: How to access data already enqueued?

I'm having problems when trying to access data that I've queued using the Heartbeat API. I'm queuing data using wp.heartbeat.enqueue(). For example: var data = { my_key: 'value' }; wp.heartbeat....
henrywright's user avatar
  • 3,107
4 votes
2 answers
1k views

How to check if new posts have been published since page load?

My aim is to use the Heartbeat API to check if new posts have been published since the blog's homepage was loaded. If new posts have been published, I will display a link at the top of the screen "16 ...
henrywright's user avatar
  • 3,107
15 votes
1 answer
647 views

Are WordPress Heartbeat API 'beats' staggered or do they occur simultaneously for all users?

The WordPress Heartbeat API uses admin-ajax.php to run AJAX calls. If User X leaves their browser open, many calls will be made to the server, with each call happening when there is a 'beat'. Now if ...
henrywright's user avatar
  • 3,107
3 votes
1 answer
1k views

Why does Wordpress Heartbeat login not refresh the nonces?

Here's an interesting experiment: Go to wordpress plugins listing page, notice the activate, deactivate links all have a nonce part in the request. In a second tab, log out of the site, and go back ...
NoBugs's user avatar
  • 452
4 votes
2 answers
742 views

Heartbeat API oEmbed

By default running content through the_content filter automatically checks for oEmbed content. However when returning data through heartbeat_received the filter for oEmbed doesn't seem to work. For ...
Elliott's user avatar
  • 542
16 votes
4 answers
18k views

How to disable the "Post Lock/Edit Lock"?

I want to disable this just for one Post Type, as it doesn't really matters if there's another user editing it (the main content editing area is Ajaxified and non-admins can only see that). I looked ...
brasofilo's user avatar
  • 22.1k
3 votes
2 answers
3k views

How to create notification on frontend using heartbeat api for multiple custom post types

How can I get correct action hook on publish_posts for multiple custom types ? I have a following problem, I can use this hook for posts or single custom post_type, but I don't know correct hook for ...
Daniel Foltynek's user avatar