How to Manage Wordpress Pluse through Programmatically
Do you like this story?

Which beats every 15 seconds. Also you can change the interval of beat. You can also stop beating for low processors. because it will take few CPU usage which is avoided on low processors.
Manage time gap :
<?php
/**
* Plugin Name: MyWP Tuts - Set Heartbeat pulse
*/
! defined( 'ABSPATH' ) and exit;
add_filter( 'heartbeat_settings', 'mywp_tuts_heartbeat_settings' );
function mywp_tuts_heartbeat_settings( $settings = array() ) {
$settings['interval'] = 60;
return $settings;
}
?>
remove the action by using the following code.
<?php
/**
* Plugin Name: MyWP Tuts - Set Heartbeat pulse
*/
! defined( 'ABSPATH' ) and exit;
remove_action( 'admin_init', 'wp_auth_check_load' );
?>
Debugging of the Tool
if you want to debug the tools. wp.heartbeat.debug of javascript function will give you the debugging informations and tools make it as TRUE we will debug heartbeat.
<?php
if ( typeof console !== 'undefined' )
wp.heartbeat.debug = true; // Show debugging info of heartbeat
?>
Subscribe to:
Post Comments (Atom)
0 Responses to “How to Manage Wordpress Pluse through Programmatically”
Post a Comment