[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@3.138.105.176: ~ $
<?php
/**
 * Utilities class file.
 *
 * @package LearnDash\Integrity
 */

namespace LearnDash\Integrity;

use LearnDash\Integrity\Prevent_Hotlinking;

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

/**
 * Class for plugin utilities
 */
class Utilities {
	/**
	 * Init hooks
	 * @return void
	 */
	public static function init() {
		register_activation_hook( LEARNDASH_INTEGRITY_PLUGIN_FILE, array( __CLASS__, 'activation' ) );
		register_deactivation_hook( LEARNDASH_INTEGRITY_PLUGIN_FILE, array( __CLASS__, 'deactivation' ) );
		register_uninstall_hook( LEARNDASH_INTEGRITY_PLUGIN_FILE, array( __CLASS__, 'uninstall' ) );
	}

	/**
	 * Run this function on plugin activation
	 * @return void
	 */
	public static function activation() {
		// Set up default options
		$default = array(
			'prevent_hotlinking' => 'yes',
			'prevent_concurrent_login' => 'yes',
			'prevent_content_copy' => 'no',
		);

		$options = get_option( 'learndash_settings_ld_integrity' );

		if ( $options === false ) {
			$options = $default;
			update_option( 'learndash_settings_ld_integrity', $default );
		}

		if (
			isset( $options['prevent_hotlinking'] )
			&& $options['prevent_hotlinking'] === 'yes'
		) {
			Prevent_Hotlinking::update_htaccess_on_activation();
		}
	}

	/**
	 * Run this function on plugin deactivation
	 * @return void
	 */
	public static function deactivation()
	{
		Prevent_Hotlinking::remove_htaccess_rule();
	}

	/**
	 * Run this function on plugin uninstall
	 * @return void
	 */
	public static function uninstall() {
		// Remove plugin option
		delete_option( 'learndash_settings_ld_integrity' );

		// Prevent hotlinking
		Prevent_Hotlinking::update_htaccess_on_uninstall();
	}
}

Utilities::init();

Filemanager

Name Type Size Permission Actions
admin Folder 0755
class-dependency-check.php File 295 B 0644
class-prevent-concurrent-login.php File 7.29 KB 0644
class-prevent-content-copy.php File 1.14 KB 0644
class-prevent-hotlinking.php File 2.64 KB 0644
class-recaptcha-v2.php File 5.1 KB 0644
class-recaptcha-v3.php File 4.34 KB 0644
class-recaptcha.php File 8.57 KB 0644
class-utilities.php File 1.66 KB 0644