403Webshell
Server IP : 31.214.179.3  /  Your IP : 216.73.216.84
Web Server : Apache
System : Linux hostingsrv125.dondominio.com 6.12.96+deb13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.96-1 (2026-07-20) x86_64
User :  ( 1156851)
PHP Version : 8.5.8
Disable Function : system,passthru,popen,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,exec,ini_alter,show_source,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_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,mail,eval
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /hosting/www/thermatron.es/public/wp-content/plugins/duplicate-post/src/ui/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /hosting/www/thermatron.es/public/wp-content/plugins/duplicate-post/src/ui/asset-manager.php
<?php

namespace Yoast\WP\Duplicate_Post\UI;

/**
 * Duplicate Post class to manage assets.
 */
class Asset_Manager {

	/**
	 * Adds hooks to integrate with WordPress.
	 *
	 * @return void
	 */
	public function register_hooks() {
		\add_action( 'init', [ $this, 'register_styles' ] );
		\add_action( 'init', [ $this, 'register_scripts' ] );
	}

	/**
	 * Registers the styles.
	 *
	 * @return void
	 */
	public function register_styles() {
		\wp_register_style( 'duplicate-post', \plugins_url( '/css/duplicate-post.css', \DUPLICATE_POST_FILE ), [], \DUPLICATE_POST_CURRENT_VERSION );
		\wp_register_style( 'duplicate-post-options', \plugins_url( '/css/duplicate-post-options.css', \DUPLICATE_POST_FILE ), [], \DUPLICATE_POST_CURRENT_VERSION );
	}

	/**
	 * Registers the scripts.
	 *
	 * @return void
	 */
	public function register_scripts() {
		\wp_register_script(
			'duplicate_post_edit_script',
			\plugins_url( 'js/dist/duplicate-post-edit.js', \DUPLICATE_POST_FILE ),
			[
				'wp-api-fetch',
				'wp-components',
				'wp-element',
				'wp-i18n',
			],
			\DUPLICATE_POST_CURRENT_VERSION,
			true,
		);
		\wp_set_script_translations( 'duplicate_post_edit_script', 'duplicate-post' );

		\wp_register_script(
			'duplicate_post_strings',
			\plugins_url( 'js/dist/duplicate-post-strings.js', \DUPLICATE_POST_FILE ),
			[
				'wp-components',
				'wp-element',
				'wp-i18n',
			],
			\DUPLICATE_POST_CURRENT_VERSION,
			true,
		);
		\wp_set_script_translations( 'duplicate_post_strings', 'duplicate-post' );

		\wp_register_script(
			'duplicate_post_quick_edit_script',
			\plugins_url( 'js/dist/duplicate-post-quick-edit.js', \DUPLICATE_POST_FILE ),
			[ 'jquery' ],
			\DUPLICATE_POST_CURRENT_VERSION,
			true,
		);

		\wp_register_script(
			'duplicate_post_options_script',
			\plugins_url( 'js/dist/duplicate-post-options.js', \DUPLICATE_POST_FILE ),
			[ 'jquery' ],
			\DUPLICATE_POST_CURRENT_VERSION,
			true,
		);
	}

	/**
	 * Enqueues the styles.
	 *
	 * @return void
	 */
	public function enqueue_styles() {
		\wp_enqueue_style( 'duplicate-post' );
	}

	/**
	 * Enqueues the styles for the options page.
	 *
	 * @return void
	 */
	public function enqueue_options_styles() {
		\wp_enqueue_style( 'duplicate-post-options' );
	}

	/**
	 * Enqueues the script for the Block editor and passes object via localization.
	 *
	 * @param array $data_object The object to pass to the script.
	 *
	 * @return void
	 */
	public function enqueue_edit_script( $data_object = [] ) {
		$handle = 'duplicate_post_edit_script';
		\wp_enqueue_script( $handle );
		\wp_add_inline_script(
			$handle,
			'let duplicatePostNotices = {};',
			'before',
		);
		\wp_localize_script(
			$handle,
			'duplicatePost',
			$data_object,
		);
	}

	/**
	 * Enqueues the script for the Javascript strings and passes object via localization.
	 *
	 * @param array $data_object The object to pass to the script.
	 *
	 * @return void
	 */
	public function enqueue_strings_script( $data_object = [] ) {
		$handle = 'duplicate_post_strings';
		\wp_enqueue_script( $handle );
		\wp_localize_script(
			$handle,
			'duplicatePostStrings',
			$data_object,
		);
	}

	/**
	 * Enqueues the script for the Quick Edit.
	 *
	 * @return void
	 */
	public function enqueue_quick_edit_script() {
		\wp_enqueue_script( 'duplicate_post_quick_edit_script' );
	}

	/**
	 * Enqueues the script for the Options page.
	 *
	 * @return void
	 */
	public function enqueue_options_script() {
		\wp_enqueue_script( 'duplicate_post_options_script' );
	}

	/**
	 * Enqueues the script for the Elementor plugin.
	 *
	 * @param array $data_object The object to pass to the script.
	 *
	 * @return void
	 */
	public function enqueue_elementor_script( $data_object = [] ) {
		$handle = 'duplicate_post_elementor_script';

		\wp_register_script(
			$handle,
			\plugins_url( 'js/dist/duplicate-post-elementor.js', \DUPLICATE_POST_FILE ),
			[ 'jquery' ],
			\DUPLICATE_POST_CURRENT_VERSION,
			true,
		);
		\wp_enqueue_script( $handle );
		\wp_localize_script(
			$handle,
			'duplicatePost',
			$data_object,
		);
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit