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/Admin/Menus/

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


OR Upload from URL:
URL: Save as:

📄 File: Welcome_Menu.php

Path: //home2/gazetufm/pelasgus.al/wp-content/plugins/code-snippets/php/Admin/Menus/Welcome_Menu.php

Size: 1.67 KB

Permissions: 0644

<?php

namespace Code_Snippets\Admin\Menus;

use Code_Snippets\Client\Welcome_Client;
use function Code_Snippets\code_snippets;
use const Code_Snippets\PLUGIN_FILE;
use const Code_Snippets\PLUGIN_VERSION;

/**
 * This class handles the welcome menu.
 *
 * @since   3.7.0
 * @package Code_Snippets
 */
class Welcome_Menu extends Admin_Menu {

	/**
	 * Client instance.
	 *
	 * @var Welcome_Client
	 */
	protected Welcome_Client $client;

	/**
	 * Class constructor
	 *
	 * @param Welcome_Client $client Client instance.
	 */
	public function __construct( $client ) {
		parent::__construct(
			'welcome',
			_x( "What's New", 'menu label', 'code-snippets' ),
			__( 'Resources and Updates', 'code-snippets' )
		);

		$this->client = $client;
	}

	/**
	 * Load the welcome menu.
	 *
	 * @return void
	 */
	public function render() {
		echo '<div id="code-snippets-welcome-container" class="wrap"></div>';
	}

	/**
	 * Enqueue assets necessary for the welcome menu.
	 *
	 * @return void
	 */
	public function enqueue_assets() {
		$handle = 'code-snippets-welcome';

		wp_enqueue_style(
			$handle,
			plugins_url( 'dist/welcome.css', PLUGIN_FILE ),
			self::$style_deps,
			PLUGIN_VERSION
		);

		wp_enqueue_script(
			$handle,
			plugins_url( 'dist/welcome.js', PLUGIN_FILE ),
			self::$script_deps,
			PLUGIN_VERSION,
			true
		);

		code_snippets()->localize_script( $handle );

		wp_localize_script(
			$handle,
			'CODE_SNIPPETS_WELCOME',
			[
				'banner'    => $this->client->get_banner(),
				'hero'      => $this->client->get_hero_item(),
				'changelog' => $this->client->get_changelog(),
				'features'  => $this->client->get_features(),
				'partners'  => $this->client->get_partners(),
			]
		);
	}
}

← Back to Directory Edit File 🔒 Chmod

WP File Manager