How to Manage Wordpress Pluse through Programmatically
Do you like this story?
With the new feature of wordpress 3.6 Heartbeat to trac all discussions and information's of your blog and pages. Heartbeat will help to organise all the comments and discussions of your blog. Also it interduces several features like AutoSave, Lock a article, and notifications of logon and logoff .
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