Server : LiteSpeed
System : Linux quebec.us.hostns.io 5.14.0-687.42.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Aug 27 11:55:12 EDT 2026 x86_64
User : gazetufm ( 1431)
PHP Version : 8.1.35
Disable Function : NONE
Directory :  /home2/gazetufm/pelasgus.al/wp-content/plugins/code-snippets/php/Utils/

📁 Create New:
⬆️ Upload File:
Current Dir [ Writable ] Root [ Writable ]


OR Upload from URL:
URL: Save as:

📄 File: Code_Highlighter.php

Path: //home2/gazetufm/pelasgus.al/wp-content/plugins/code-snippets/php/Utils/Code_Highlighter.php

Size: 1.01 KB

Permissions: 0644

<?php

namespace Code_Snippets\Utils;

use const Code_Snippets\PLUGIN_FILE;
use const Code_Snippets\PLUGIN_VERSION;

/**
 * This class handles the integration of the PrismJS syntax highlighter.
 *
 * @package Code_Snippets
 */
class Code_Highlighter {

	/**
	 * Handle to use for the PrismJS library.
	 */
	public const PRISM_HANDLE = 'code-snippets-prism';

	/**
	 * Enqueue the styles and scripts for the Prism syntax highlighter.
	 *
	 * @return void
	 */
	public static function register_prism_assets() {
		wp_register_script(
			self::PRISM_HANDLE,
			plugins_url( 'dist/prism.js', PLUGIN_FILE ),
			[],
			PLUGIN_VERSION,
			[ 'in_footer' => true ]
		);

		wp_register_style(
			self::PRISM_HANDLE,
			plugins_url( 'dist/prism.css', PLUGIN_FILE ),
			[],
			PLUGIN_VERSION
		);
	}


	/**
	 * Enqueue all available Prism themes.
	 *
	 * @return void
	 */
	public static function enqueue_all_prism_themes() {
		self::register_prism_assets();

		wp_enqueue_style( self::PRISM_HANDLE );
		wp_enqueue_script( self::PRISM_HANDLE );
	}
}

← Back to Directory Edit File 🔒 Chmod

WP File Manager