PluginProbe
Force Refresh / 2.12.0
Force Refresh v2.12.0
3.2.1 3.2.0 3.1.2 3.1.1 3.1.0 trunk 1.0.0 1.1.0 1.1.1 1.1.2 1.2.0 2.0.0 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.10.0 2.10.1 2.10.2 2.11.0 2.11.1 2.12.0 All 54 releases
force-refresh / includes / actions / admin / inc-troubleshooting.php

inc-troubleshooting.php in Force Refresh 2.12.0, at includes/actions/admin/inc-troubleshooting.php

33 lines 802 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Functions to help troubleshoot installations of Force Refresh.
4 *
5 * @package ForceRefresh
6 */
7
8 namespace JordanLeven\Plugins\ForceRefresh;
9
10 if ( ! function_exists( 'plugins_api' ) ) {
11 require_once ABSPATH . 'wp-admin/includes/plugin-install.php';
12 }
13
14 /**
15 * Function to get the latest version of Force Refresh from the WordPress repository.
16 *
17 * @return mixed Either null (if unable to get the version) or a string.
18 */
19 function get_latest_plugin_version() {
20 $args = array(
21 'slug' => WP_FORCE_REFRESH_REPOSITORY_SLUG,
22 'fields' => array( 'version' => true ),
23 );
24
25 $call_api = plugins_api( 'plugin_information', $args );
26
27 if ( ! is_wp_error( $call_api ) && ! empty( $call_api->version ) ) {
28 return $call_api->version;
29 }
30
31 return null;
32 }
33