HEX
Server: Apache
System: Linux sg241.singhost.net 2.6.32-896.16.1.lve1.4.51.el6.x86_64 #1 SMP Wed Jan 17 13:19:23 EST 2018 x86_64
User: honghock (909)
PHP: 8.0.30
Disabled: passthru,system,shell_exec,show_source,exec,popen,proc_open
Upload Files
File: /home/honghock/www/wp-content/plugins/broken-link-checker-seo/app/Standalone/Highlighter.php
<?php
namespace AIOSEO\BrokenLinkChecker\Standalone;

// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * Handles highlighting broken links.
 *
 * @since 1.2.0
 */
class Highlighter {
	/**
	 * Class constructor.
	 *
	 * @since 1.2.0
	 */
	public function __construct() {
		add_action( 'init', [ $this, 'init' ] );
	}

	/**
	 * Initializes the class.
	 *
	 * @since 1.2.0
	 *
	 * @return void
	 */
	public function init() {
		if (
			is_admin() ||
			! is_user_logged_in() ||
			! current_user_can( 'edit_posts' )
		) {
			return;
		}

		if ( ! aioseoBrokenLinkChecker()->options->general->highlightBrokenLinks ) {
			return;
		}

		add_action( 'wp_enqueue_scripts', [ $this, 'enqueueScript' ] );
	}

	/**
	 * Enqueues the script.
	 *
	 * @since 1.2.0
	 *
	 * @return void
	 */
	public function enqueueScript() {
		$scriptHandle = 'src/vue/standalone/highlighter/main.js';
		aioseoBrokenLinkChecker()->core->assets->load( $scriptHandle, [], aioseoBrokenLinkChecker()->helpers->getVueData( 'highlighter' ) );
	}
}