Filter
rpress_command_center_refresh_interval
On this page
Filters the Command Center auto-refresh interval, in seconds.
Used when the Command Center script is localized on the admin screen that loads it. The value is cast to an integer, multiplied by 1000 and passed as rpCommandCenter.interval. The script ignores values below 5000 milliseconds (5 seconds) and uses 30 seconds instead.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$seconds | int | Seconds between live refreshes. Defaults to 30. |
Return value#
int. Number of seconds between refreshes. Values under 5 fall back to 30.
Example#
function my_command_center_interval( $seconds ) {
return 60;
}
add_filter( 'rpress_command_center_refresh_interval', 'my_command_center_interval' );
Source#
Applied in:
includes/admin/class-rp-admin-assets.php(line 483), inRP_Admin_Assets::admin_scripts()
Was this page helpful?
