PluginProbe
BeyondWords – AI audio for publishers / 4.6.0
BeyondWords – AI audio for publishers v4.6.0
7.2.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 All 44 releases
speechkit / src / Compatibility / Elementor / Controls / Player.php

Player.php in BeyondWords – AI audio for publishers 4.6.0, at src/Compatibility/Elementor/Controls/Player.php

66 lines 1.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 // phpcs:disable PSR1.Methods.CamelCapsMethodName
3 // phpcs:disable WordPressVIPMinimum.TemplatingEngines.UnescapedOutputMustache.OutputNotation
4
5 namespace Beyondwords\Wordpress\Compatibility\Elementor\Controls;
6
7 use Elementor\Base_Control;
8 use Elementor\Controls_Manager;
9
10 /**
11 * Elementor BeyondWords Player control.
12 *
13 * @codeCoverageIgnore
14 *
15 * @since 3.10.0
16 */
17 class Player extends Base_Control
18 {
19 public function get_type()
20 {
21 return 'beyondwords_player';
22 }
23
24 public function get_default_settings()
25 {
26 $postId = get_the_ID();
27
28 return [
29 'label_block' => true,
30 'separator' => 'before',
31 'post_id' => $postId,
32 'project_id' => null,
33 'content_id' => null,
34 'generate_audio' => null,
35 'display_player' => null,
36 ];
37 }
38
39 public function content_template()
40 {
41 // phpcs:disable
42 ?>
43 <div class="elementor-control-field">
44 <div class="elementor-control-input-wrapper elementor-control-unit-5">
45 <div id="beyondwords-elementor-player" data-post-id="{{ data.post_id }}">
46 <div
47 id="beyondwords-elementor-editor-player"
48 data-beyondwords-player="true"
49 data-beyondwords-project-id="{{ data.project_id }}"
50 data-beyondwords-content-id="{{ data.content_id }}"
51 contenteditable="false"
52 ></div>
53 </div>
54
55 <script type="text/javascript">
56 if (window.$e) {
57 window.$e.run('beyondwords/panel-open');
58 }
59 </script>
60 </div>
61 </div>
62 <?php
63 // phpcs:enable
64 }
65 }
66