PluginProbe
BeyondWords – AI audio for publishers / 6.3.0
BeyondWords – AI audio for publishers v6.3.0
7.1.0 trunk 4.0.0 4.0.1 4.0.2 4.0.3 4.0.4 4.0.5 4.0.6 4.1.0 4.1.1 4.1.2 4.2.0 4.2.1 4.2.2 4.2.3 4.2.4 4.3.0 4.4.0 4.5.0 4.5.1 4.6.0 4.6.1 4.6.2 4.7.0 All 43 releases
speechkit / src / Component / Post / ErrorNotice / ErrorNotice.php

ErrorNotice.php in BeyondWords – AI audio for publishers 6.3.0, at src/Component/Post/ErrorNotice/ErrorNotice.php

56 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 declare(strict_types=1);
4
5 /**
6 * BeyondWords Post ErrorNotice.
7 *
8 * @package Beyondwords\Wordpress
9 * @author Stuart McAlpine <stu@beyondwords.io>
10 * @since 3.0.0
11 */
12
13 namespace Beyondwords\Wordpress\Component\Post\ErrorNotice;
14
15 use Beyondwords\Wordpress\Core\CoreUtils;
16
17 /**
18 * ErrorNotice
19 *
20 * @since 3.0.0
21 */
22 defined('ABSPATH') || exit;
23
24 class ErrorNotice
25 {
26 /**
27 * Init.
28 *
29 * @since 4.0.0
30 * @since 6.0.0 Make static.
31 */
32 public static function init()
33 {
34 add_action('enqueue_block_assets', [self::class, 'enqueueBlockAssets']);
35 }
36
37 /**
38 * Enqueue Block Editor assets.
39 *
40 * @since 6.0.0 Make static.
41 */
42 public static function enqueueBlockAssets()
43 {
44 // Only enqueue for Gutenberg screens
45 if (CoreUtils::isGutenbergPage()) {
46 // Register the Block Editor "Error Notice" CSS
47 wp_enqueue_style(
48 'beyondwords-ErrorNotice',
49 BEYONDWORDS__PLUGIN_URI . 'src/Component/Post/ErrorNotice/error-notice.css',
50 [],
51 BEYONDWORDS__PLUGIN_VERSION
52 );
53 }
54 }
55 }
56