| Server IP : 87.98.154.146 / Your IP : 216.73.216.165 Web Server : Apache System : Linux webm004.cluster126.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64 User : ohklomafyi ( 52085) PHP Version : 7.4.33 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/ohklomafyi/www/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' );
}
}