| Server IP : 185.252.147.100 / Your IP : 216.73.217.33 Web Server : nginx/1.27.3 System : Linux mitrofanov.ru 6.1.0-37-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.140-1 (2025-05-22) x86_64 User : mitr ( 1000) PHP Version : 8.2.29 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /www/html/auto.mitrofanov.ru/public/wp-content/plugins/tools4wp/ |
Upload File : |
<?php
/**
* Plugin Name: Tools4WP
* Plugin URI: https://tools4wp.com/t4wp/
* Description: Add functions to other WordPress plugins/themes.
* Version: 2.8.0
* Author: Tools4WP
* Author URI: https://tools4wp.com/
*/
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) )
{
exit;
}
// Version Number
$plugin_data = get_file_data(__FILE__, array('Version' => 'Version'), false);
$plugin_version = $plugin_data['Version'];
// get the current value of the option
$tools4wp_options = get_option('tools4wp_options');
// check if $tools4wp_options is an array
if (is_array($tools4wp_options)) {
// check if the key exists
if (array_key_exists('tools4wp_version', $tools4wp_options)) {
// compare the current version with the new version
if ($tools4wp_options['tools4wp_version'] !== $plugin_version) {
// update the value of the option
$tools4wp_options['tools4wp_version'] = $plugin_version;
}
} else {
// update the value of the option
$tools4wp_options['tools4wp_version'] = $plugin_version;
}
// save the updated option to the database
update_option('tools4wp_options', $tools4wp_options);
} else {
$tools4wp_options = array('tools4wp_version' => $plugin_version);
update_option('tools4wp_options', $tools4wp_options);
}
if (is_admin())
{
$url = $_SERVER['REQUEST_URI'];
if (strpos($url, 'localhost') !== false)
{
die('This plugin cannot be used on localhost.');
}
}
if ( ! class_exists('Tools4WP'))
{
class Tools4WP
{
public function __construct()
{
define('MY_PLUGIN_PATH' , plugin_dir_path( __FILE__ ));
define('MY_PLUGIN_ADDONS', plugin_dir_path(__FILE__) . 'addons');
}
public function setup()
{
require MY_PLUGIN_PATH . 'includes/updates.php';
require MY_PLUGIN_PATH . 'includes/install.php';
include MY_PLUGIN_PATH . 'includes/whitelabel.php';
require MY_PLUGIN_PATH . 'includes/utilities.php';
require MY_PLUGIN_PATH . 'includes/options-page.php';
require MY_PLUGIN_PATH . 'includes/premium.php';
// require MY_PLUGIN_PATH . 'includes/standard.php';
}
}
$tools4wp = new Tools4WP;
$tools4wp->setup();
}
?>