|
Server : Apache System : Linux s1230 5.15.0-139-generic #149~20.04.1 SMP Tue Jul 14 11:21:49 UTC 2026 x86_64 User : p141464 ( 418825) PHP Version : 7.4.33.12 Disable Function : NONE Directory : /html/relaunch-kmu/wp-content/plugins/wpforms-lite/src/Admin/Builder/ |
Upload File : |
<?php
namespace WPForms\Admin\Builder;
/**
* Context Menu class.
*
* @since 1.8.6
*/
class ContextMenu {
/**
* Init class.
*
* @since 1.8.6
*/
public function init() {
$this->hooks();
}
/**
* Register hooks.
*
* @since 1.8.6
*/
protected function hooks() {
add_action( 'wpforms_builder_enqueues', [ $this, 'enqueues' ] );
add_action( 'wpforms_admin_page', [ $this, 'output' ], 20 );
}
/**
* Enqueue assets.
*
* @since 1.8.6
*/
public function enqueues() {
$min = wpforms_get_min_suffix();
wp_enqueue_script(
'wpforms-builder-context-menu',
WPFORMS_PLUGIN_URL . "assets/js/admin/builder/context-menu{$min}.js",
[ 'wpforms-builder' ],
WPFORMS_VERSION,
true
);
}
/**
* Output context menu markup.
*
* @since 1.8.6
*/
public function output() {
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
echo wpforms_render( 'builder/field-context-menu' );
}
}