HEX
Server: LiteSpeed
System: Linux server318.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
User: sahadove (2893)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: //proc/thread-self/root/home/sahadove/wp-content/plugins/jetpack/extensions/blocks/latex/latex.php
<?php
/**
 * LaTeX Block.
 *
 * @since 15.0
 *
 * @package automattic/jetpack
 */

namespace Automattic\Jetpack\Extensions\Latex;

use Automattic\Jetpack\Blocks;
use Jetpack_Gutenberg;

/**
 * Register the block.
 */
function latex_formula_block_init() {
	Blocks::jetpack_register_block(
		__DIR__,
		array( 'render_callback' => __NAMESPACE__ . '\load_assets' )
	);
}

add_action( 'init', __NAMESPACE__ . '\latex_formula_block_init' );

/**
 * Load the assets for the block.
 *
 * @param array  $attr    The attributes of the block.
 * @param string $content The content of the block.
 *
 * @return string The content of the block.
 */
function load_assets( $attr, $content ) {
	/*
	 * Enqueue necessary scripts and styles.
	 */
	Jetpack_Gutenberg::load_assets_as_required( __DIR__ );

	return $content;
}