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 / Plugin.php

Plugin.php in BeyondWords – AI audio for publishers 6.3.0, at src/Plugin.php

95 lines 2.8 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 namespace Beyondwords\Wordpress;
6
7 use Beyondwords\Wordpress\Compatibility\WPGraphQL\WPGraphQL;
8 use Beyondwords\Wordpress\Core\Core;
9 use Beyondwords\Wordpress\Core\Player\Player;
10 use Beyondwords\Wordpress\Core\Updater;
11 use Beyondwords\Wordpress\Component\Post\AddPlayer\AddPlayer;
12 use Beyondwords\Wordpress\Component\Post\BlockAttributes\BlockAttributes;
13 use Beyondwords\Wordpress\Component\Post\ContentId\ContentId;
14 use Beyondwords\Wordpress\Component\Post\DisplayPlayer\DisplayPlayer;
15 use Beyondwords\Wordpress\Component\Post\ErrorNotice\ErrorNotice;
16 use Beyondwords\Wordpress\Component\Post\GenerateAudio\GenerateAudio;
17 use Beyondwords\Wordpress\Component\Post\Metabox\Metabox;
18 use Beyondwords\Wordpress\Component\Post\Panel\Inspect\Inspect;
19 use Beyondwords\Wordpress\Component\Post\PlayerContent\PlayerContent;
20 use Beyondwords\Wordpress\Component\Post\PlayerStyle\PlayerStyle;
21 use Beyondwords\Wordpress\Component\Post\Post;
22 use Beyondwords\Wordpress\Component\Post\SelectVoice\SelectVoice;
23 use Beyondwords\Wordpress\Component\Posts\Column\Column;
24 use Beyondwords\Wordpress\Component\Posts\BulkEdit\BulkEdit;
25 use Beyondwords\Wordpress\Component\Posts\BulkEdit\Notices as BulkEditNotices;
26 use Beyondwords\Wordpress\Component\Settings\Settings;
27 use Beyondwords\Wordpress\Component\Settings\SettingsUtils;
28 use Beyondwords\Wordpress\Component\SiteHealth\SiteHealth;
29
30 /**
31 * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
32 */
33 defined('ABSPATH') || exit;
34
35 class Plugin
36 {
37 /**
38 * Constructor.
39 *
40 * @since 3.0.0
41 * @since 4.5.1 Disable plugin features if we don't have valid API settings.
42 * @since 6.0.0 Make static.
43 */
44 public static function init()
45 {
46 // Run plugin update checks before anything else
47 Updater::run();
48
49 // Third-party plugin/theme compatibility
50 WPGraphQL::init();
51
52 // Core
53 Core::init();
54
55 // Site health
56 SiteHealth::init();
57
58 // Player
59 Player::init();
60
61 // Post
62 Post::init();
63
64 // Settings
65 Settings::init();
66
67 /**
68 * To prevent browser JS errors we skip adding admin UI components until
69 * we have a valid REST API connection.
70 */
71 if (SettingsUtils::hasValidApiConnection()) {
72 // Posts screen
73 BulkEdit::init();
74 BulkEditNotices::init();
75 Column::init();
76
77 // Post screen
78 AddPlayer::init();
79 BlockAttributes::init();
80 ErrorNotice::init();
81 Inspect::init();
82
83 // Post screen metabox
84 ContentId::init();
85 GenerateAudio::init();
86 DisplayPlayer::init();
87 SelectVoice::init();
88 PlayerContent::init();
89 PlayerStyle::init();
90 PlayerContent::init();
91 Metabox::init();
92 }
93 }
94 }
95