heartbeat_settings
The WordPress Core heartbeat settings hook.
Description
Parameters (1)
- 0. $wp_heartbeat_set_suspension (string) =>
'wp_heartbeat_set_suspension'
- The
wp
heartbeat set suspension.
Usage
- To run the hook, copy the example below.
- $wp_heartbeat_set_suspension = apply_filters( 'heartbeat_settings', $wp_heartbeat_set_suspension );
- if ( !empty( $wp_heartbeat_set_suspension ) ) {
- // everything has led up to this point...
- }
- The following example is for adding a hook callback.
- // define the heartbeat_settings callback
- function filter_heartbeat_settings( $wp_heartbeat_set_suspension ) {
- // make filter magic happen here...
- return $wp_heartbeat_set_suspension;
- };
- // add the filter
- add_filter( 'heartbeat_settings', 'filter_heartbeat_settings', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the filter
- remove_filter( 'heartbeat_settings', 'filter_heartbeat_settings', 10, 1 );
Defined (3)
The filter is defined in the following location(s).
- /wp-admin/includes/admin-filters.php
- add_filter( 'heartbeat_settings', 'wp_heartbeat_set_suspension' );
- /wp-includes/default-filters.php
- add_filter( 'heartbeat_settings', 'wp_heartbeat_settings' );
- /wp-includes/script-loader.php
- apply_filters( 'heartbeat_settings', array() )