# speechkit/7.0.0/src/editor/components/content-id/class-assets.php

BeyondWords – AI audio for publishers, version 7.0.0. 67 lines.

- Page: https://pluginprobe.com/plugins/speechkit/7.0.0/code/src/editor/components/content-id/class-assets.php
- Raw: https://pluginprobe.com/plugins/speechkit/7.0.0/raw/src/editor/components/content-id/class-assets.php
- Modified: 2026-08-12T09:46:22+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/speechkit/7.0.0/code/src/editor/components/content-id/class-assets.php#L10-L20`.

```php
<?php
/**
 * BeyondWords Content ID — asset enqueue.
 *
 * @package BeyondWords\Editor\Components\ContentId
 * @since   7.0.0
 */

declare( strict_types = 1 );

namespace BeyondWords\Editor\Components\ContentId;

defined( 'ABSPATH' ) || exit;

/**
 * Content ID asset enqueue.
 *
 * @since 7.0.0
 */
class Assets {

	/**
	 * Register WordPress hooks.
	 */
	public static function init(): void {
		add_action( 'admin_enqueue_scripts', [ self::class, 'admin_enqueue_scripts' ] );
	}

	/**
	 * Enqueue the Content ID JS on classic-editor post screens.
	 *
	 * @param string $hook Current admin page hook.
	 */
	public static function admin_enqueue_scripts( $hook ): void {
		if ( \BeyondWords\Core\Utils::is_gutenberg_page() ) {
			return;
		}

		if ( 'post.php' !== $hook && 'post-new.php' !== $hook ) {
			return;
		}

		if ( ! in_array( get_post_type(), \BeyondWords\Settings\Utils::get_compatible_post_types(), true ) ) {
			return;
		}

		wp_register_script(
			'beyondwords-metabox--content-id',
			BEYONDWORDS__PLUGIN_URI . 'src/editor/components/content-id/classic-metabox.js',
			[ 'wp-i18n' ],
			BEYONDWORDS__PLUGIN_VERSION,
			true
		);

		wp_localize_script(
			'beyondwords-metabox--content-id',
			'beyondwordsData',
			[
				'nonce' => wp_create_nonce( 'wp_rest' ),
				'root'  => esc_url_raw( rest_url() ),
			]
		);

		wp_enqueue_script( 'beyondwords-metabox--content-id' );
	}
}

```
