# tableberg/0.3.3/includes/Assets.php

Tableberg – Simple Gutenberg Table Block, version 0.3.3. 83 lines.

- Page: https://pluginprobe.com/plugins/tableberg/0.3.3/code/includes/Assets.php
- Raw: https://pluginprobe.com/plugins/tableberg/0.3.3/raw/includes/Assets.php
- Modified: 2024-02-17T06:44:40+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/tableberg/0.3.3/code/includes/Assets.php#L10-L20`.

```php
<?php

/**
 * The file register assets for the plugin
 *
 *  @package Tableberg
 */

namespace Tableberg;

/**
 * Handle plugin assets
 */
class Assets {
	/**
	 * Register blocks assets
	 */
	public function register_blocks_assets() {
		wp_register_script(
			'tableberg-script',
			TABLEBERG_URL . 'build/tableberg.build.js',
			array(
				'lodash',
				'react',
				'wp-block-editor',
				'wp-blocks',
				'wp-components',
				'wp-data',
				'wp-element',
				'wp-i18n',
				'wp-primitives',
			),
			Constants::plugin_version(),
			false
		);
		wp_register_style(
			'tableberg-editor-style',
			TABLEBERG_URL . 'build/tableberg-editor-style.css',
			array(),
			Constants::plugin_version(),
			false
		);
		wp_register_style(
			'tableberg-style',
			TABLEBERG_URL . 'build/tableberg-frontend-style.css',
			array(),
			Constants::plugin_version(),
			false
		);
	}
	/**
	 * Enqueue Admin assets
	 */
	public function register_admin_assets() {
		wp_enqueue_script(
			'tableberg-admin-script',
			TABLEBERG_URL . 'build/tableberg-admin.build.js',
			array(
				'lodash',
				'react',
				'wp-block-editor',
				'wp-blocks',
				'wp-components',
				'wp-data',
				'wp-element',
				'wp-i18n',
				'wp-primitives',
			),
			Constants::plugin_version(),
			true
		);
		$frontend_script_data = apply_filters('tableberg/filter/admin_settings_menu_data', array());
		wp_localize_script('tableberg-admin-script', 'tablebergAdminMenuData', $frontend_script_data);
		wp_enqueue_style(
			'tableberg-admin-style',
			TABLEBERG_URL . 'build/tableberg-admin-style.css',
			array(),
			Constants::plugin_version(),
			'all'
		);
	}
}

```
