PluginProbe
BeyondWords – AI audio for publishers / 4.0.6
BeyondWords – AI audio for publishers v4.0.6
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 / Compatibility / Elementor / Controls / Player.php

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

68 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 use Beyondwords\Wordpress\Component\Post\PostMetaUtils;
11
12 /**
13 * Elementor BeyondWords Player control.
14 *
15 * @codeCoverageIgnore
16 *
17 * @since 3.10.0
18 */
19 class Player extends Base_Control
20 {
21 public function get_type()
22 {
23 return 'beyondwords_player';
24 }
25
26 public function get_default_settings()
27 {
28 $postId = get_the_ID();
29
30 return [
31 'label_block' => true,
32 'separator' => 'before',
33 'post_id' => $postId,
34 'project_id' => null,
35 'content_id' => null,
36 'generate_audio' => null,
37 'display_player' => null,
38 ];
39 }
40
41 public function content_template()
42 {
43 // phpcs:disable
44 ?>
45 <div class="elementor-control-field">
46 <div class="elementor-control-input-wrapper elementor-control-unit-5">
47 <div id="beyondwords-elementor-player" data-post-id="{{ data.post_id }}">
48 <div
49 id="beyondwords-elementor-editor-player"
50 data-beyondwords-player="true"
51 data-beyondwords-project-id="{{ data.project_id }}"
52 data-beyondwords-content-id="{{ data.content_id }}"
53 contenteditable="false"
54 ></div>
55 </div>
56
57 <script type="text/javascript">
58 if (window.$e) {
59 window.$e.run('beyondwords/panel-open');
60 }
61 </script>
62 </div>
63 </div>
64 <?php
65 // phpcs:enable
66 }
67 }
68