| 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/includes/ |
Upload File : |
<?php
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) )
{
exit;
}
// get the current value of the option
$tools4wp_license = get_option('tools4wp_license');
// check if $tools4wp_license is an array
if (is_array($tools4wp_license)) {
// check if the key exists
if (!(array_key_exists('tools4wp_licensed', $tools4wp_license))) {
// update the value of the option
$tools4wp_license['tools4wp_licensed'] = 'false';
}
// save the updated option to the database
update_option('tools4wp_license', $tools4wp_license);
} else {
// create a new key with the value of 'false'
$tools4wp_license = array('tools4wp_licensed' => 'false');
update_option('tools4wp_license', $tools4wp_license);
}
add_filter( 'plugin_action_links', 'add_license_link', 10, 2 );
function add_license_link( $links, $file ) {
$t4wp_name = get_option('t4wp_white');
$short_name = $t4wp_name['short_name'] ?? 'tools4wp';
if ( strpos( $file, 'tools4wp' ) !== false ) {
$links[] = '<a href="' . admin_url( 'tools.php?page=' . $short_name . '_options' ) . '">Settings</a>';
}
return $links;
}