HEX
Server: Apache/2
System: Linux server-27-254-144-72.da.direct 5.10.0-33-amd64 #1 SMP Debian 5.10.226-1 (2024-10-03) x86_64
User: bannong (1179)
PHP: 8.1.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/bannong/domains/bannongsaischool.com/public_html/wp-content/plugins/waves/blocks/waves.php
<?php

add_action( 'init', function() {
	register_block_type( 'a8c/waves', [
		'editor_script' => 'a8c-waves',
		'style' => 'a8c-waves',
		'editor_style' => 'a8c-waves-editor',
		'render_callback' => function( $attribs, $content ) {
			wp_enqueue_script( 'a8c-waves-js' );
			return $content;
		},
	] );
	wp_register_script(
		'a8c-twgl-js',
		plugins_url( 'twgl/twgl.js', __FILE__ ),
		[], // no dependencies
		filemtime( plugin_dir_path( __FILE__ ) . 'twgl/twgl.js' ),
		true // in footer
	);
	wp_register_script(
		'a8c-waves-js',
		plugins_url( 'waves.js', __FILE__ ),
		[ 'a8c-twgl-js', 'wp-dom-ready' ],
		filemtime( plugin_dir_path( __FILE__ ) . 'waves.js' ),
		true // in footer
	);
} );

add_action( 'enqueue_block_editor_assets', function() {
	wp_enqueue_script( 'a8c-waves-js' );
} );