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

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

82 lines 1.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 /**
6 * Settings > BeyondWords > Summarization
7 *
8 * @package Beyondwords\Wordpress
9 * @author Stuart McAlpine <stu@beyondwords.io>
10 * @since 5.3.0
11 */
12
13 namespace Beyondwords\Wordpress\Component\Settings\Tabs\Summarization;
14
15 use Beyondwords\Wordpress\Core\Environment;
16
17 /**
18 * "Summarization" settings tab
19 * @since 5.3.0
20 */
21 class Summarization
22 {
23 /**
24 * Init
25 *
26 * @since 5.3.0
27 * @since 6.0.0 Make static.
28 */
29 public static function init()
30 {
31 add_action('admin_init', [self::class, 'addSettingsSection'], 5);
32 }
33
34 /**
35 * Add Settings sections.
36 *
37 * @since 5.3.0
38 * @since 6.0.0 Make static.
39 */
40 public static function addSettingsSection()
41 {
42 add_settings_section(
43 'summarization',
44 __('Summarization', 'speechkit'),
45 [self::class, 'sectionCallback'],
46 'beyondwords_summarization',
47 );
48 }
49
50 /**
51 * Section callback
52 *
53 * @since 5.3.0
54 * @since 6.0.0 Make static.
55 *
56 * @return void
57 **/
58 public static function sectionCallback()
59 {
60 $linkUrl = sprintf(
61 '%s/dashboard/project/%s/settings?tab=summarization',
62 Environment::getDashboardUrl(),
63 get_option('beyondwords_project_id'),
64 );
65 ?>
66 <p class="description">
67 <?php
68 esc_html_e(
69 'Generate summarized versions of your audio articles.',
70 'speechkit'
71 );
72 ?>
73 </p>
74 <p class="description">
75 <a href="<?php echo esc_url($linkUrl); ?>" target="_blank" class="button button-primary">
76 <?php esc_html_e('Manage summarization', 'speechkit'); ?>
77 </a>
78 </p>
79 <?php
80 }
81 }
82