PluginProbe
BeyondWords – AI audio for publishers / 6.0.3
BeyondWords – AI audio for publishers v6.0.3
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 / Settings / Tabs / Content / Content.php

Content.php in BeyondWords – AI audio for publishers 6.0.3, at src/Component/Settings/Tabs/Content/Content.php

82 lines 2.0 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 * Settings > BeyondWords > Content
7 *
8 * @package Beyondwords\Wordpress
9 * @author Stuart McAlpine <stu@beyondwords.io>
10 * @since 5.0.0
11 */
12
13 namespace Beyondwords\Wordpress\Component\Settings\Tabs\Content;
14
15 use Beyondwords\Wordpress\Component\Settings\Fields\AutoPublish\AutoPublish;
16 use Beyondwords\Wordpress\Component\Settings\Fields\IncludeExcerpt\IncludeExcerpt;
17 use Beyondwords\Wordpress\Component\Settings\Fields\IncludeTitle\IncludeTitle;
18 use Beyondwords\Wordpress\Component\Settings\Fields\IntegrationMethod\IntegrationMethod;
19 use Beyondwords\Wordpress\Component\Settings\Fields\PreselectGenerateAudio\PreselectGenerateAudio;
20
21 /**
22 * "Content" settings tab
23 * @since 5.0.0
24 */
25 class Content
26 {
27 /**
28 * Init
29 *
30 * @since 5.0.0 Introduced.
31 * @since 6.0.0 Make static and add IntegrationMethod.
32 */
33 public static function init()
34 {
35 (new IntegrationMethod())::init();
36 (new IncludeTitle())::init();
37 (new AutoPublish())::init();
38 (new IncludeExcerpt())::init();
39 (new PreselectGenerateAudio())::init();
40
41 add_action('admin_init', [self::class, 'addSettingsSection'], 5);
42 }
43
44 /**
45 * Add Settings sections.
46 *
47 * @since 5.0.0
48 * @since 6.0.0 Make static.
49 */
50 public static function addSettingsSection()
51 {
52 add_settings_section(
53 'content',
54 __('Content', 'speechkit'),
55 [self::class, 'sectionCallback'],
56 'beyondwords_content',
57 );
58 }
59
60 /**
61 * Section callback
62 *
63 * @since 5.0.0
64 * @since 6.0.0 Make static.
65 *
66 * @return void
67 **/
68 public static function sectionCallback()
69 {
70 ?>
71 <p class="description">
72 <?php
73 esc_html_e(
74 'Only future content will be affected. To apply changes to existing content, please regenerate each post.', // phpcs:ignore Generic.Files.LineLength.TooLong
75 'speechkit'
76 );
77 ?>
78 </p>
79 <?php
80 }
81 }
82