# force-refresh/2.12.0/includes/actions/admin/inc-troubleshooting.php

Force Refresh, version 2.12.0. 33 lines.

- Page: https://pluginprobe.com/plugins/force-refresh/2.12.0/code/includes/actions/admin/inc-troubleshooting.php
- Raw: https://pluginprobe.com/plugins/force-refresh/2.12.0/raw/includes/actions/admin/inc-troubleshooting.php
- Modified: 2024-05-27T19:35:52+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/force-refresh/2.12.0/code/includes/actions/admin/inc-troubleshooting.php#L10-L20`.

```php
<?php
/**
 * Functions to help troubleshoot installations of Force Refresh.
 *
 * @package ForceRefresh
 */

namespace JordanLeven\Plugins\ForceRefresh;

if ( ! function_exists( 'plugins_api' ) ) {
    require_once ABSPATH . 'wp-admin/includes/plugin-install.php';
}

/**
 * Function to get the latest version of Force Refresh from the WordPress repository.
 *
 * @return  mixed Either null (if unable to get the version) or a string.
 */
function get_latest_plugin_version() {
    $args = array(
        'slug'   => WP_FORCE_REFRESH_REPOSITORY_SLUG,
        'fields' => array( 'version' => true ),
    );

    $call_api = plugins_api( 'plugin_information', $args );

    if ( ! is_wp_error( $call_api ) && ! empty( $call_api->version ) ) {
        return $call_api->version;
    }

    return null;
}

```
