PluginProbe
Version Info – Server Health Monitor, PHP & MySQL Version Display, Environment Indicators / 2.0.0
Version Info – Server Health Monitor, PHP & MySQL Version Display, Environment Indicators v2.0.0
2.1.0 2.0.3 2.0.2 trunk 1.0.0 1.0.1 1.0.2 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.2.0 1.2.1 1.3.0 1.3.1 1.3.2 1.3.3 2.0.0 2.0.1
version-info / version-info.php

version-info.php in Version Info – Server Health Monitor, PHP & MySQL Version Display, Environment Indicators 2.0.0, at version-info.php

83 lines 3.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Plugin Name: Version Info
5 * Plugin URI: https://versioninfoplugin.com
6 * Description: Show current WordPress, PHP, Web Server, and MySQL versions optionally in the admin footer, WP-Admin bar, or dashboard widget.
7 * Author: Gaucho Plugins
8 * Author URI: https://gauchoplugins.com
9 * Version: 2.0.0
10 * License: GPLv3
11 * License URI: https://www.gnu.org/licenses/gpl-3.0.html
12 * Text Domain: version-info
13 * Requires PHP: 8.1
14 * Requires at least: 5.5
15 *
16 */
17 if ( !defined( 'ABSPATH' ) ) {
18 exit;
19 }
20 if ( function_exists( 'vi_fs' ) ) {
21 vi_fs()->set_basename( false, __FILE__ );
22 } else {
23 if ( !function_exists( 'vi_fs' ) ) {
24 function vi_fs() {
25 global $vi_fs;
26 if ( !isset( $vi_fs ) ) {
27 // Activate multisite network integration.
28 if ( !defined( 'WP_FS__PRODUCT_24628_MULTISITE' ) ) {
29 define( 'WP_FS__PRODUCT_24628_MULTISITE', true );
30 }
31 // Include Freemius SDK.
32 require_once dirname( __FILE__ ) . '/vendor/freemius/start.php';
33 $vi_fs = fs_dynamic_init( array(
34 'id' => '24628',
35 'slug' => 'version-info',
36 'type' => 'plugin',
37 'public_key' => 'pk_0aab3921d653db1046b13586d75f7',
38 'is_premium' => false,
39 'premium_suffix' => 'PRO',
40 'has_addons' => false,
41 'has_paid_plans' => true,
42 'is_org_compliant' => true,
43 'menu' => array(
44 'slug' => 'version-info',
45 'parent' => array(
46 'slug' => 'options-general.php',
47 ),
48 ),
49 'is_live' => true,
50 ) );
51 }
52 return $vi_fs;
53 }
54
55 vi_fs();
56 vi_fs()->add_filter( 'pricing/show_annual_in_monthly', '__return_false' );
57 vi_fs()->add_filter( 'plugin_icon', function () {
58 return dirname( __FILE__ ) . '/assets/plugin-icon.png';
59 } );
60 do_action( 'vi_fs_loaded' );
61 }
62 define( 'VERSION_INFO_VERSION', '2.0.0' );
63 define( 'VERSION_INFO_FILE', __FILE__ );
64 define( 'VERSION_INFO_DIR', plugin_dir_path( __FILE__ ) );
65 spl_autoload_register( function ( string $class ) : void {
66 $prefix = 'GauchoPlugins\\VersionInfo\\';
67 if ( !str_starts_with( $class, $prefix ) ) {
68 return;
69 }
70 $relative = substr( $class, strlen( $prefix ) );
71 $pro_prefix = 'Pro\\';
72 if ( str_starts_with( $relative, $pro_prefix ) ) {
73 $relative = substr( $relative, strlen( $pro_prefix ) );
74 $file = VERSION_INFO_DIR . 'includes/pro/' . str_replace( '\\', '/', $relative ) . '.php';
75 } else {
76 $file = VERSION_INFO_DIR . 'includes/' . str_replace( '\\', '/', $relative ) . '.php';
77 }
78 if ( file_exists( $file ) ) {
79 require_once $file;
80 }
81 } );
82 ( new GauchoPlugins\VersionInfo\Plugin() )->init();
83 }