Below is a detailed description of the action hooks and filter hooks available in the Version Info plugin, tailored for advanced developers. Each hook includes its name, purpose, and usage example.

Hooks & Filters

Version Info 2.1.2 exposes five action hooks and fourteen filter hooks documented below. Add your callbacks in a small custom plugin, a must-use plugin, or your theme's functions.php. The one exception is vi_fs_loaded, which must be registered earlier (see its entry).

Hooks marked PRO fire only when a PRO or Agency license, or a trial, is active. The examples avoid return types, scalar type declarations and str_contains(), so they run on every PHP version Version Info supports (PHP 5.6 and later). Replace the my_ prefix with your own.

Quick Reference

Hook Type Plan Runs on
vi_fs_loaded Action All Plugin load, once per request
version_info_version_changed Action PRO WP-Admin requests and plugin or theme updates
version_info_before_resource_render Action PRO System Resources tab
version_info_after_resource_render Action PRO System Resources tab
version_info_render_tab_{$tab_id} Action All Settings > Version Info, active tab
version_info_footer_details Filter All Admin footer
version_info_admin_bar_nodes Filter All Admin bar (WP-Admin and front end)
version_info_dashboard_widget_items Filter All Dashboard widget
version_info_wp_version Filter All Footer, admin bar, Dashboard widget, Copy as Markdown
version_info_php_version Filter All Footer, admin bar, Dashboard widget, Copy as Markdown
version_info_mysql_version Filter All Footer, admin bar, Dashboard widget, Copy as Markdown
version_info_server_software Filter All Footer, admin bar, Dashboard widget, Copy as Markdown
version_info_settings_tabs Filter All Settings > Version Info
version_info_system_export_data Filter PRO System Export tab and JSON download
version_info_allowed_roles Filter All Every visibility check
version_info_cache_ttl Filter PRO CPU, memory, environment and network overview caches
version_info_db_cache_ttl Filter PRO Database size cache
version_info_widget_extras_ttl Filter PRO Dashboard widget extras cache
version_info_ssl_cache_ttl Filter PRO SSL certificate expiry cache

Action Hooks

vi_fs_loaded

Plan: All plans. Fired in: version-info.php

Fires once per request, right after Version Info creates its Freemius SDK instance, vi_fs(). Use it to read the license state as early as possible.

When it fires: while WordPress loads the Version Info main file, before plugins_loaded. If two copies of Version Info are active (for example the free and the PRO plugin), only the copy that loads first fires it.

Parameters: none.

  • Register the callback before Version Info loads: in a must-use plugin, or in a plugin that loads before the Version Info plugin file (version-info/version-info.php for the free plugin). A callback added from a theme's functions.php or from a plugin that loads later never runs. Code that may load later should check did_action( 'vi_fs_loaded' ) first, as the example does, or use plugins_loaded instead.
  • At this point the Version Info classes and constants are not loaded yet, and neither is the current user, so do not call plugin classes or current_user_can() here.
  • To check whether PRO features are available, use vi_fs()->can_use_premium_code(), which is true for a valid license and during a trial. This is the check Version Info itself uses. vi_fs()->is_paying() is false during a trial.
<?php
// wp-content/mu-plugins/my-version-info-license.php
// Must-use plugins load before regular plugins, so the callback is registered in time.
function my_vi_license_check() {
    // True for a valid PRO or Agency license and during a trial.
    if ( vi_fs()->can_use_premium_code() ) {
        // Your PRO-only logic here.
    }
}

// Also safe in code that loads after Version Info: run now if the action already fired.
if ( did_action( 'vi_fs_loaded' ) ) {
    my_vi_license_check();
} else {
    add_action( 'vi_fs_loaded', 'my_vi_license_check' );
}

version_info_version_changed

Plan: PRO. Fired in: includes/pro/VersionHistory.php

Fires when Version Info records one or more version changes in the Version History audit log. Use it for logging, notifications or maintenance scripts.

When it fires:

  • On any WP-Admin request, including admin-ajax.php requests such as the Heartbeat, when the running WordPress, PHP or MySQL version differs from the last one recorded. All changes found on that request are passed together.
  • After a plugin or theme update that WordPress runs as a bulk update finishes (upgrader_process_complete): the Update Now links on the Plugins and Themes screens (AJAX), Dashboard > Updates, and WP-CLI. Background auto-updates of plugins and themes, and the single-item update links WordPress uses when JavaScript is off, are not recorded and do not fire this action.
  • A WordPress core update is reported on the next WP-Admin request after the update, not when the update finishes: WordPress keeps the old version number in memory for the rest of the update request.

It fires after the changes are saved to the version_info_history option, which keeps the latest 50 entries.

Parameter Type Description
$changes array List of one or more changes. Each change is an array with the keys below.
Key Description
version_type wordpress, php, mysql, plugin:{Plugin Name} or theme:{Theme Name} (the Name header, not the slug)
old_version The previous version
new_version The new version
detected_at When the change was detected, in site-local time (Y-m-d H:i:s)
  • The key is version_type. There is no type key.
  • It never fires on the first WP-Admin request after activation, which only records the starting versions. Front-end traffic does not run the check, so a PHP upgrade by your host is reported on the next WP-Admin request.
  • It compares the real versions, not the values returned by the version_info_*_version display filters.
  • A plugin or theme change is reported only when an earlier version of that item is on record, and Version Info records it during the item's previous update. The first update of each plugin or theme after activation, or after any WordPress, PHP or MySQL change, is saved as the new baseline without firing the action.
  • It can run inside AJAX or JSON responses and WP-CLI, so never print output from a callback.
  • The built-in Email Alerts feature listens to this action and emails WordPress, PHP and MySQL changes only.
add_action( 'version_info_version_changed', 'my_vi_log_version_changes' );

function my_vi_log_version_changes( $changes ) {
    foreach ( $changes as $change ) {
        error_log(
            sprintf(
                '[Version Info] %s changed from %s to %s at %s',
                $change['version_type'],
                $change['old_version'],
                $change['new_version'],
                $change['detected_at']
            )
        );
    }
}

version_info_before_resource_render

Plan: PRO. Fired in: includes/pro/ProFeatures.php

Fires at the start of the System Resources tab. Use it to print content above the resource data.

When it fires: on Settings > Version Info > System Resources, once per page load, when a PRO license or trial is active. Your output appears below the tab bar and above the System Resources section.

Parameters: none.

  • Your output is printed once. The Heartbeat updates on this tab refresh only the built-in values.
  • Do not print a plain class="notice" box: WordPress admin JavaScript moves every .notice element without the inline class to the top of the page, above the tab bar. Add inline, as the example does, or use your own wrapper.
  • Escape everything you print.
add_action( 'version_info_before_resource_render', 'my_vi_resource_note' );

function my_vi_resource_note() {
    // "inline" keeps WordPress from moving the notice above the tab bar.
    echo '<div class="notice notice-info inline"><p>'
        . esc_html__( 'Questions about these numbers? Contact your hosting team.', 'my-textdomain' )
        . '</p></div>';
}

version_info_after_resource_render

Plan: PRO. Fired in: includes/pro/ProFeatures.php

Fires at the end of the System Resources tab. Use it to append your own metrics below the built-in resource display.

When it fires: on the same page and under the same license condition as version_info_before_resource_render, after the System Resources section and its scripts.

Parameters: none.

  • Your output sits outside the #vi-system-resources section and is not refreshed by the Heartbeat.
  • Guard filesystem calls. Many hosts restrict disk_free_space() with open_basedir or disable it, so the example checks before it prints.
  • Escape everything you print.
add_action( 'version_info_after_resource_render', 'my_vi_free_disk_space' );

function my_vi_free_disk_space() {
    if ( ! function_exists( 'disk_free_space' ) ) {
        return;
    }
    // @ hides the warning some hosts raise (open_basedir); a failed call returns false.
    $free = @disk_free_space( ABSPATH );
    if ( ! is_numeric( $free ) ) {
        return;
    }
    echo '<h3>' . esc_html__( 'Free disk space', 'my-textdomain' ) . '</h3>';
    echo '<p>' . esc_html( size_format( $free, 1 ) ) . '</p>';
}

version_info_render_tab_{$tab_id}

Plan: All plans. Fired in: includes/SettingsPage.php

Dynamic action that prints the body of a tab on Settings > Version Info. {$tab_id} is the tab's id from the version_info_settings_tabs filter. Use the two together to add your own tab, or add a callback to a built-in tab to append content to it.

When it fires: on Settings > Version Info (users with the manage_options capability), once per page load, for the active tab. It does not fire for the General tab, which Version Info renders itself, so version_info_render_tab_general never runs. A built-in PRO or Agency tab fires only when that plan, or its trial, is active; otherwise a locked preview is shown instead.

Parameters: none. Echo the tab content.

  • Tab ids must be unchanged by sanitize_key(): lowercase letters, digits, underscores and hyphens only. Any other id (for example one with capital letters) silently opens the General tab instead.
  • Custom tabs show on every plan. Do not reuse a built-in id, because your tab would inherit that tab's lock.
  • Built-in tabs rendered through this action: system_resources, environment, server_location, version_history, health_advisor, system_export, white_label, access_control, email_alerts and error_log. To append to one, add a second callback at priority 20, for example on version_info_render_tab_health_advisor.
  • If your tab has a settings form that posts to options.php, give it its own register_setting() group. Options registered to a group whose form does not print them are reset when that form is saved.
  • Escape all output.
// 1. Add the tab. The id must survive sanitize_key(): lowercase a-z, 0-9, _ and -.
add_filter( 'version_info_settings_tabs', 'my_vi_add_tab' );

function my_vi_add_tab( $tabs ) {
    $tabs['my_custom_tab'] = __( 'My Custom Tab', 'my-textdomain' );
    return $tabs;
}

// 2. Print its content.
add_action( 'version_info_render_tab_my_custom_tab', 'my_vi_render_tab' );

function my_vi_render_tab() {
    echo '<h2>' . esc_html__( 'Custom Tab Content', 'my-textdomain' ) . '</h2>';
    echo '<p>' . esc_html__( 'This is a custom settings tab.', 'my-textdomain' ) . '</p>';
}

Filter Hooks

Plan: All plans. Applied in: includes/Plugin.php

Filters the complete admin footer line before WordPress prints it. Use it to modify, append to, or replace the footer output.

When it runs: on every WP-Admin page, inside the WordPress update_footer filter (Version Info hooks it at priority 11), when Show Version Info in Footer is on (the default) and the current user's role is allowed. Never on the front end.

Parameter Type Description
$details string The footer HTML: WordPress version (followed by a Get Version X.Y.Z link when a core update is available), PHP, Web Server and MySQL versions, then Memory and IP when Show Memory & Server IP is on, and a PHP end-of-life alert when PHP is past end of life or within 365 days of it. All values are already escaped.

Returns: string (HTML). WordPress prints it without further escaping, so escape anything you add.

  • The returned string is the whole bottom-right footer text: Version Info replaces WordPress's own "Version X.Y.Z" text there. Returning an empty string leaves that area blank.
  • When a custom plugin name is set, the Agency White Label feature also uses this filter (priority 10) to replace the text "Version Info" with that name.
add_filter( 'version_info_footer_details', 'my_vi_footer_hostname' );

function my_vi_footer_hostname( $footer ) {
    $host = gethostname();
    if ( false === $host ) {
        return $footer;
    }
    // The footer is printed as HTML, so escape what you add.
    return $footer . ' | Server: ' . esc_html( $host );
}

version_info_admin_bar_nodes

Plan: All plans. Applied in: includes/AdminBar.php

Filters the admin bar (toolbar) nodes Version Info adds, before each one is passed to WP_Admin_Bar::add_node(). Use it to add, remove or change nodes.

When it runs: on every request that shows the toolbar to a user whose role is allowed, in WP-Admin and on the front end (admin_bar_menu, priority 100). It runs even when Show Version Info in Admin Bar is off; the array is then empty unless the PRO environment badge adds its node.

Parameter Type Description
$nodes array Node definitions keyed by node id. With Show Version Info in Admin Bar on: version_info_admin_bar (title is the version string, parent top-secondary) and its child version_info_copy_md (Copy as Markdown). With the PRO environment badge on: version_info_environment.

Returns: array of node arrays. Each node needs an id and should have a title. Array keys are ignored.

  • Always return an array. On PRO and Agency, a typed callback that runs after yours throws a fatal TypeError if it gets anything else; otherwise the toolbar item breaks with a PHP warning.
  • The title is printed as HTML, so escape dynamic values.
  • A node without a parent goes to the left side of the toolbar. Use 'parent' => 'top-secondary' for the right side, or 'parent' => 'version_info_admin_bar' to add an item to the Version Info drop-down.
  • If you change the version_info_copy_md node, keep its id: the copy script looks for it.
  • Your callback runs on front-end page loads too, so keep it cheap.
add_filter( 'version_info_admin_bar_nodes', 'my_vi_admin_bar_host' );

function my_vi_admin_bar_host( $nodes ) {
    // Only add the item when the Version Info toolbar item itself is shown.
    if ( ! isset( $nodes['version_info_admin_bar'] ) ) {
        return $nodes;
    }
    $host = gethostname();
    if ( false === $host ) {
        return $nodes;
    }
    // A child of version_info_admin_bar appears in its drop-down, next to Copy as Markdown.
    $nodes['my_vi_host'] = array(
        'id'     => 'my_vi_host',
        'parent' => 'version_info_admin_bar',
        'title'  => esc_html( 'Host: ' . $host ),
    );
    return $nodes;
}

version_info_dashboard_widget_items

Plan: All plans. Applied in: includes/DashboardWidget.php

Filters the rows of the Version Info Dashboard widget. Use it to add, remove or reorder rows.

When it runs: when the widget renders on the Dashboard, which requires Show Version Info as Dashboard Widget (off by default) and an allowed role.

Parameter Type Description
$items array Rows keyed by row id, in display order. Each row is an array with label, value and optionally html. Free rows: wordpress, php, server, mysql, memory and server_ip (when Show Memory & Server IP is on), php_eol. PRO adds environment and database_size, or, with Show Live System Resources in Dashboard Widget on, a full set of live rows (for example uptime, cpu_load, disk_usage and timezone).

Returns: array of rows. Each row needs a label and a value, both printed as plain text. An optional non-empty html replaces value and is filtered with wp_kses() to span, div, strong, code, em, br, svg and polyline (no links, buttons or images).

  • PRO adds its rows at priority 10 and overwrites the keys it owns (such as uptime, server_ip and environment). Use priority 20 and your own key names so your rows are not replaced.
  • Rows are static. The PRO live refresh only updates its own values.
  • Built-in labels end with a colon (for example WordPress Version:).
  • Custom rows are not included in Copy as Markdown.
// Priority 20 runs after PRO adds its rows (priority 10), so this row is not replaced.
add_filter( 'version_info_dashboard_widget_items', 'my_vi_widget_language_row', 20 );

function my_vi_widget_language_row( $items ) {
    $items['my_site_language'] = array(
        'label' => __( 'Site Language:', 'my-textdomain' ),
        'value' => get_locale(),
    );
    return $items;
}

version_info_wp_version

Plan: All plans. Applied in: includes/Plugin.php, includes/AdminBar.php, includes/DashboardWidget.php, includes/SystemInfo.php

Filters the WordPress version Version Info displays.

When it runs: whenever the footer, the admin bar item, the Dashboard widget or the Copy as Markdown table is built for an allowed user. It can run several times per request.

Parameter Type Description
$version string The WordPress version from get_bloginfo( 'version' ), for example 6.9.4

Returns: string (plain text; it is escaped on output).

In the footer, the filtered value is also compared with the available WordPress core updates to decide whether to show the Get Version link. PHP ranks a value such as 6.8.2 (Multisite) lower than 6.8.2, so appending text to the version, or replacing it with a value PHP ranks lower, makes an up-to-date site show a false "Get Version" link. Leave the footer value unchanged, as the example does with doing_filter( 'update_footer' ), and add footer notes with version_info_footer_details instead.

  • Display only. Version History, System Export and the Multisite Network Dashboard read the real version.
add_filter( 'version_info_wp_version', 'my_vi_label_multisite' );

function my_vi_label_multisite( $version ) {
    // Leave the footer value alone: the footer compares it with available core updates.
    if ( ! is_multisite() || doing_filter( 'update_footer' ) ) {
        return $version;
    }
    return $version . ' (Multisite)';
}

version_info_php_version

Plan: All plans. Applied in: includes/Plugin.php, includes/AdminBar.php, includes/DashboardWidget.php, includes/SystemInfo.php

Filters the PHP version Version Info displays.

When it runs: on the same four displays as version_info_wp_version: footer, admin bar item, Dashboard widget and Copy as Markdown table.

Parameter Type Description
$version string The PHP version from phpversion(), for example 8.3.12

Returns: string (plain text; it is escaped on output).

  • Display only. The PHP end-of-life alert, Health Advisor, Version History and System Export use the real PHP version, so changing this string does not change their results.
add_filter( 'version_info_php_version', 'my_vi_php_sapi' );

function my_vi_php_sapi( $version ) {
    // "8.3.12" becomes "8.3.12 (fpm-fcgi)".
    return $version . ' (' . php_sapi_name() . ')';
}

version_info_mysql_version

Plan: All plans. Applied in: includes/Plugin.php, includes/AdminBar.php, includes/DashboardWidget.php, includes/SystemInfo.php

Filters the database server version Version Info displays.

When it runs: on the same four displays as version_info_wp_version.

Parameter Type Description
$version string The footer, admin bar and Copy as Markdown table pass the full SELECT VERSION() result, for example 8.0.36 or 10.6.12-MariaDB-log. The Dashboard widget passes $wpdb->db_version(), which WordPress cuts to the numeric part (10.6.12; on older PHP builds that report MariaDB with a 5.5.5- prefix, this is 5.5.5).

Returns: string (plain text; it is escaped on output).

  • Because the widget passes only the numeric part, a check for "MariaDB" never matches there. The example returns that value unchanged.
  • The footer, admin bar and Copy as Markdown table each run an uncached SELECT VERSION() query just before this filter.
  • Display only. Version History, Health Advisor and System Export use the real value.
add_filter( 'version_info_mysql_version', 'my_vi_tidy_mariadb' );

function my_vi_tidy_mariadb( $version ) {
    // "10.6.12-MariaDB-log" becomes "10.6.12 (MariaDB)".
    if ( false !== stripos( $version, 'mariadb' ) && preg_match( '/^[0-9.]+/', $version, $matches ) ) {
        return $matches[0] . ' (MariaDB)';
    }
    return $version;
}

version_info_server_software

Plan: All plans. Applied in: includes/Plugin.php, includes/AdminBar.php, includes/DashboardWidget.php, includes/SystemInfo.php

Filters the web server software string Version Info displays.

When it runs: on the same four displays as version_info_wp_version.

Parameter Type Description
$server string The server's sanitized SERVER_SOFTWARE value, for example nginx/1.25.3, or Unknown when it is missing

Returns: string (plain text; it is escaped on output).

  • Display only. The System Export JSON reads SERVER_SOFTWARE directly, so this filter does not hide the server banner there.
add_filter( 'version_info_server_software', 'my_vi_short_server' );

function my_vi_short_server( $server ) {
    // "Apache/2.4.58 (Ubuntu)" becomes "Apache".
    if ( false !== stripos( $server, 'apache' ) ) {
        return 'Apache';
    }
    return $server;
}

version_info_settings_tabs

Plan: All plans. Applied in: includes/SettingsPage.php

Filters the tabs on Settings > Version Info. Use it to add, remove or rename tabs.

When it runs: each time Settings > Version Info renders for a user with manage_options.

Parameter Type Description
$tabs array Tab id => label. Built-in ids, in order: general, system_resources, environment, server_location, version_history, health_advisor, system_export, white_label, access_control, email_alerts, error_log.

Returns: array of tab id => label. Labels are escaped on output. Ids must be unchanged by sanitize_key().

  • Pair a new tab with version_info_render_tab_{$tab_id}, which has a complete example.
  • Removing a tab hides its link, and ?tab= with that id opens the General tab instead. General is always used as the fallback.
  • Custom tabs are never locked. Only the built-in PRO and Agency ids get lock icons and previews.
  • When the Agency White Label tab is locked to one user, Version Info removes the white_label tab for everyone else through this same filter.
add_filter( 'version_info_settings_tabs', 'my_vi_hide_error_log_tab' );

function my_vi_hide_error_log_tab( $tabs ) {
    // Hides the Error Log tab; ?tab=error_log then opens General.
    unset( $tabs['error_log'] );
    return $tabs;
}

version_info_system_export_data

Plan: PRO. Applied in: includes/pro/SystemExport.php

Filters the system snapshot used by System Info Export. Use it to add your own sections or remove data.

When it runs: every time the snapshot is built: the System Export tab preview and the JSON download.

Parameter Type Description
$info array The snapshot: generated_at, site_url, site_name, multisite, wordpress (version, environment type, debug mode, memory limit, upload size, permalinks, timezone, language), php (version, SAPI, limits, extensions), database (version, client, prefix, charset, collation), server (software, os, hostname), active_theme, active_plugins.

Returns: array of scalar values and arrays (no objects). It is JSON-encoded for the download and shown as dotted keys in the tab preview.

The snapshot can be downloaded or shared. Keep credentials, personal data and secrets out of any fields you add.

add_filter( 'version_info_system_export_data', 'my_vi_export_hosting' );

function my_vi_export_hosting( $info ) {
    // Include only values suitable for a shared support report.
    $info['custom'] = array(
        'hosting_provider' => 'Kinsta',
        'cdn'              => 'Cloudflare',
    );
    return $info;
}

version_info_allowed_roles

Plan: All plans. Applied in: includes/Plugin.php

Filters the role slugs that may see the Version Info footer, admin bar item and Dashboard widget. Use it to grant or restrict access in code.

When it runs: on every visibility check, several times per request: the footer, the admin bar nodes, the Dashboard widget, and the Copy as Markdown script, which is checked on every front-end page view, including visitors who are not logged in. Keep it cheap.

Parameter Type Description
$roles string[] Role slugs from the version_info_allowed_roles option (default array( 'administrator' )), which the Agency Access Control tab edits

Returns: array of role slugs. The current user needs at least one of them.

  • The filter works on every plan, not only with Agency Access Control.
  • It does not open Settings > Version Info, the System Export download or the AJAX actions to other roles: those require manage_options.
  • If you return a list without administrator, administrators lose the displays, even though the Access Control screen says administrators always have access.
  • Matching is by role only. A multisite super admin who has no role on a subsite sees nothing there.
add_filter( 'version_info_allowed_roles', 'my_vi_allow_shop_managers' );

function my_vi_allow_shop_managers( $roles ) {
    // Also allow shop managers to see version info. Keep 'administrator' in the list.
    $roles[] = 'shop_manager';
    return array_unique( $roles );
}

version_info_cache_ttl

Plan: PRO. Applied in: includes/pro/CpuProvider.php, includes/pro/MemoryProvider.php, includes/pro/EnvironmentProvider.php, includes/pro/NetworkDashboard.php

Filters how long CPU load, memory usage and environment detection results are cached, and how long the Agency Multisite Network Dashboard overview is cached.

When it runs: each time one of those values is collected: the System Resources tab and its Heartbeat updates, the Dashboard widget, the PRO environment badge and admin bar highlight, and the Network Dashboard.

Parameter Type Description
$seconds int Cache lifetime in seconds. Default: 60.

Returns: int number of seconds.

  • A new value applies once the current cache entry expires, or after Purge VI Caches on the System Resources tab (which does not clear the network overview).
  • Returning 0 makes the cache never expire. It does not turn caching off.
  • This is not the Heartbeat interval. The System Resources tab switches the Heartbeat to fast (5-second) updates, which WordPress keeps for about 2.5 minutes before going back to the standard interval.
  • One value covers all four caches; there is no context argument.
add_filter( 'version_info_cache_ttl', 'my_vi_cache_ttl' );

function my_vi_cache_ttl( $seconds ) {
    return 2 * MINUTE_IN_SECONDS; // Cache CPU, memory and environment data for 2 minutes.
}

version_info_db_cache_ttl

Plan: PRO. Applied in: includes/pro/DatabaseProvider.php

Filters how long the database size and database server variables are cached.

When it runs: when database data is collected: the System Resources tab, the Dashboard widget and the Scan Now button.

Parameter Type Description
$seconds int Cache lifetime in seconds. Default: 43200 (12 hours).

Returns: int number of seconds.

  • Returning 0 makes the cache never expire.
  • A new value applies once the cached entry expires. Scan Now and Purge VI Caches force a fresh scan.
  • An uncached scan queries information_schema, which can be slow on large databases.
add_filter( 'version_info_db_cache_ttl', 'my_vi_db_cache_ttl' );

function my_vi_db_cache_ttl( $seconds ) {
    return HOUR_IN_SECONDS; // Cache database size for 1 hour.
}

version_info_widget_extras_ttl

Plan: PRO. Applied in: includes/pro/ProFeatures.php

Filters how long the extra live rows of the Dashboard widget are cached: disk usage, active theme, plugins, themes, WordPress core update status, cron, health summary, PHP limits, HTTPS, SSL certificate expiry, WP_DEBUG, uptime, OS, hostname, IP, port, document root, database variables, PHP modules, object cache and timezone.

When it runs: when the Dashboard widget renders with Show Live System Resources in Dashboard Widget on.

Parameter Type Description
$seconds int Cache lifetime in seconds. Default: 300 (5 minutes).

Returns: int number of seconds.

  • Returning 0 makes the cache never expire.
  • Detect now on the Server Location tab and Purge VI Caches on the System Resources tab clear this cache.
add_filter( 'version_info_widget_extras_ttl', 'my_vi_widget_extras_ttl' );

function my_vi_widget_extras_ttl( $seconds ) {
    return 15 * MINUTE_IN_SECONDS; // Refresh the extra widget rows every 15 minutes.
}

version_info_ssl_cache_ttl

Plan: PRO. Applied in: includes/pro/HealthAdvisor.php

Filters how long a successful SSL certificate expiry check is cached.

When it runs: only after a successful live check of the site's own certificate, when no cached result exists. That check runs from the Health Advisor tab and from the SSL Certificate Expiry test in Tools > Site Health, and never when the site address (home URL) does not use https. The Dashboard widget reads the cached result.

Parameter Type Description
$seconds int Cache lifetime in seconds. Default: 43200 (12 hours).

Returns: int number of seconds.

  • A failed check is cached for 1 hour, and that time cannot be filtered.
  • Returning 0 makes the cache never expire.
  • Purge VI Caches clears this cache.
add_filter( 'version_info_ssl_cache_ttl', 'my_vi_ssl_cache_ttl' );

function my_vi_ssl_cache_ttl( $seconds ) {
    return DAY_IN_SECONDS; // Re-check the certificate once a day.
}

This section provides advanced developers with a detailed understanding of the available hooks and filters in the Version Info plugin. If you need further elaboration on any specific hook or filter, feel free to contact support.