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

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

84 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 defined('ABSPATH') || exit;
22
23 class Summarization
24 {
25 /**
26 * Init
27 *
28 * @since 5.3.0
29 * @since 6.0.0 Make static.
30 */
31 public static function init()
32 {
33 add_action('admin_init', [self::class, 'addSettingsSection'], 5);
34 }
35
36 /**
37 * Add Settings sections.
38 *
39 * @since 5.3.0
40 * @since 6.0.0 Make static.
41 */
42 public static function addSettingsSection()
43 {
44 add_settings_section(
45 'summarization',
46 __('Summarization', 'speechkit'),
47 [self::class, 'sectionCallback'],
48 'beyondwords_summarization',
49 );
50 }
51
52 /**
53 * Section callback
54 *
55 * @since 5.3.0
56 * @since 6.0.0 Make static.
57 *
58 * @return void
59 **/
60 public static function sectionCallback()
61 {
62 $linkUrl = sprintf(
63 '%s/dashboard/project/%s/settings?tab=summarization',
64 Environment::getDashboardUrl(),
65 get_option('beyondwords_project_id'),
66 );
67 ?>
68 <p class="description">
69 <?php
70 esc_html_e(
71 'Generate summarized versions of your audio articles.',
72 'speechkit'
73 );
74 ?>
75 </p>
76 <p class="description">
77 <a href="<?php echo esc_url($linkUrl); ?>" target="_blank" class="button button-primary">
78 <?php esc_html_e('Manage summarization', 'speechkit'); ?>
79 </a>
80 </p>
81 <?php
82 }
83 }
84