Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [heartbeat-api]

Communication between browser and WordPress per AJAX in fixed intervals.

1
vote
2answers
74 views
+50

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"&...
0
votes
0answers
69 views

Live Notifications Heartbeat API

I have a user following system which allows my users to essentially subscribe to each other's posts which is fine and it works now no problem but I am trying to figure out how to implement a live ...
3
votes
0answers
51 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 ...
1
vote
1answer
174 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.
1
vote
1answer
216 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 ...
0
votes
1answer
34 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?
0
votes
1answer
165 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 ...
1
vote
0answers
631 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 ...
-1
votes
0answers
96 views

Is there any way to detect session expiration in WordPress?

I am one of the developers of WP App Studio WordPress plugin which is used to design custom WordPress plugins. All of our calls for data go through AJAX requests. I sometimes leave my plugin designs ...
6
votes
2answers
879 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....
2
votes
1answer
80 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 ...
0
votes
0answers
533 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....
3
votes
0answers
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-...
5
votes
1answer
1k 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 ...
1
vote
1answer
245 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....
4
votes
2answers
884 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 ...
14
votes
1answer
520 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 ...
1
vote
1answer
635 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 ...
4
votes
2answers
625 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 ...
15
votes
4answers
12k 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 ...
3
votes
2answers
2k 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 ...