PluginProbe
Version Info – Server Health Monitor, PHP & MySQL Version Display, Environment Indicators / 2.0.1
Version Info – Server Health Monitor, PHP & MySQL Version Display, Environment Indicators v2.0.1
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.1, at version-info.php

85 lines 3.2 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.1
10 * License: GPLv3
11 * License URI: https://www.gnu.org/licenses/gpl-3.0.html
12 * Text Domain: version-info
13 * Requires PHP: 5.6
14 * Requires at least: 4.7
15 * Tested up to: 7.0
16 *
17 */
18 if ( !defined( 'ABSPATH' ) ) {
19 exit;
20 }
21 if ( function_exists( 'vi_fs' ) ) {
22 vi_fs()->set_basename( false, __FILE__ );
23 } else {
24 if ( !function_exists( 'vi_fs' ) ) {
25 function vi_fs() {
26 global $vi_fs;
27 if ( !isset( $vi_fs ) ) {
28 // Activate multisite network integration.
29 if ( !defined( 'WP_FS__PRODUCT_24628_MULTISITE' ) ) {
30 define( 'WP_FS__PRODUCT_24628_MULTISITE', true );
31 }
32 // Include Freemius SDK.
33 require_once dirname( __FILE__ ) . '/vendor/freemius/start.php';
34 $vi_fs = fs_dynamic_init( array(
35 'id' => '24628',
36 'slug' => 'version-info',
37 'type' => 'plugin',
38 'public_key' => 'pk_0aab3921d653db1046b13586d75f7',
39 'is_premium' => false,
40 'premium_suffix' => 'PRO',
41 'has_addons' => false,
42 'has_paid_plans' => true,
43 'is_org_compliant' => true,
44 'menu' => array(
45 'slug' => 'version-info',
46 'parent' => array(
47 'slug' => 'options-general.php',
48 ),
49 ),
50 'is_live' => true,
51 ) );
52 }
53 return $vi_fs;
54 }
55
56 vi_fs();
57 vi_fs()->add_filter( 'pricing/show_annual_in_monthly', '__return_false' );
58 vi_fs()->add_filter( 'plugin_icon', function () {
59 return dirname( __FILE__ ) . '/assets/plugin-icon.png';
60 } );
61 do_action( 'vi_fs_loaded' );
62 }
63 define( 'VERSION_INFO_VERSION', '2.0.1' );
64 define( 'VERSION_INFO_FILE', __FILE__ );
65 define( 'VERSION_INFO_DIR', plugin_dir_path( __FILE__ ) );
66 spl_autoload_register( function ( $class ) {
67 $prefix = 'GauchoPlugins\\VersionInfo\\';
68 // Replaces str_starts_with() (PHP 8.0+) for PHP 5.6 compatibility.
69 if ( 0 !== strpos( $class, $prefix ) ) {
70 return;
71 }
72 $relative = substr( $class, strlen( $prefix ) );
73 $pro_prefix = 'Pro\\';
74 if ( 0 === strpos( $relative, $pro_prefix ) ) {
75 $relative = substr( $relative, strlen( $pro_prefix ) );
76 $file = VERSION_INFO_DIR . 'includes/pro/' . str_replace( '\\', '/', $relative ) . '.php';
77 } else {
78 $file = VERSION_INFO_DIR . 'includes/' . str_replace( '\\', '/', $relative ) . '.php';
79 }
80 if ( file_exists( $file ) ) {
81 require_once $file;
82 }
83 } );
84 ( new GauchoPlugins\VersionInfo\Plugin() )->init();
85 }